/* style.css for solotest */
body {
    background-color: #f8fafc;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.game-container {
    max-width: 800px;
    margin: 15px auto;
    padding: 10px 20px;
    text-align: center;
}

.game-header {
    margin-bottom: 15px;
}

.game-title {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 5px;
}

.game-title span {
    color: #3b82f6;
    font-weight: 300;
}

.game-desc {
    color: #64748b;
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto 10px auto;
    line-height: 1.4;
}

.game-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.stat-box {
    background: white;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
}

.stat-value {
    color: #ef4444;
    font-size: 1.2rem;
    margin-left: 8px;
}

.btn-restart {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-restart:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.board-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(7, 50px);
    grid-template-rows: repeat(7, 50px);
    gap: 10px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.cell {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.cell.valid {
    background-color: #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cell.invalid {
    visibility: hidden;
}

.peg {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    box-shadow: 2px 4px 8px rgba(37, 99, 235, 0.4), inset -2px -2px 4px rgba(0,0,0,0.2), inset 2px 2px 4px rgba(255,255,255,0.4);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    position: absolute;
    z-index: 2;
}

.peg:hover {
    transform: scale(1.05);
}

.peg.selected {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.8), inset -2px -2px 4px rgba(0,0,0,0.2), inset 2px 2px 4px rgba(255,255,255,0.4);
    border: 2px solid white;
}

.cell.highlight {
    background-color: #bbf7d0;
    box-shadow: inset 0 0 10px rgba(34, 197, 94, 0.5);
    cursor: pointer;
}

.cell.highlight::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #22c55e;
    border-radius: 50%;
    opacity: 0.6;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: slideUp 0.4s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 26px;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 5px;
}

.modal-close-x:hover {
    color: #475569;
}

.glass-panel h2 {
    color: #1e293b;
    font-size: 2rem;
    margin-bottom: 15px;
}

.result-rank {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3b82f6;
    margin: 20px 0;
    padding: 15px;
    background: #eff6ff;
    border-radius: 10px;
    border: 2px dashed #bfdbfe;
}

#resultDesc {
    color: #475569;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .game-board {
        grid-template-columns: repeat(7, 40px);
        grid-template-rows: repeat(7, 40px);
        gap: 8px;
        padding: 15px;
    }
    .cell {
        width: 40px;
        height: 40px;
    }
    .peg {
        width: 32px;
        height: 32px;
    }
}

/* --- Oyun İçi Dinamik Tasarım Değişkenleri ve Sınıfları --- */
:root {
    --primary-color: #8b5cf6;
    --secondary-color: #ec4899;
    --text-primary: #1e293b;
    --bg-light: #f8fafc;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff !important;
    border: none;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
    color: #ffffff;
}

.btn:active {
    transform: translateY(1px);
}

.btn.hidden {
    display: none !important;
}

/* Oyun Konteynerı ve Ortak Yazı Tipleri */
.game-container {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    margin: 2rem auto;
    max-width: 900px;
}

.game-container h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.game-container h2 {
    color: var(--text-primary);
}

.game-container p {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.6;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 1.5rem 2rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.2s;
    background: rgba(139, 92, 246, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
}
.back-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateX(-5px);
}

.modern-input {
    outline: none;
    transition: all 0.3s;
}
.modern-input:focus {
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
    border-color: var(--primary-color) !important;
}

.hidden {
    display: none !important;
}
