﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*
        body {
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }
            */
.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    max-width: 600px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 5px;
}

    .header h1 {
        color: #333;
        font-size: 1.5em;
        margin-bottom: 10px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }

.controls {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-new {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-solve {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.btn-clear {
    background: linear-gradient(45deg, #FF5722, #E64A19);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    gap: 2px;
    background: #333;
    border: 4px solid #333;
    border-radius: 10px;
    margin: 0 auto;
    max-width: 450px;
    width: 450px;
    height: 450px;
    padding: 0;
}

.cell {
    background: white;
    border: none;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

    .cell:hover {
        background: #e3f2fd;
        transform: scale(1.05);
    }

    .cell:focus {
        outline: 3px solid #2196F3;
        background: #e3f2fd;
    }

    .cell.given {
        background: #f5f5f5;
        color: #666;
        cursor: not-allowed;
    }

    .cell.error {
        background: #ffebee !important;
        color: #d32f2f;
        animation: shake 0.5s ease-in-out;
    }

    .cell.highlight {
        background: #fff3e0 !important;
    }

    /* 3x3 blok sınırları için daha kesin çözüm */
    .cell:nth-child(3), .cell:nth-child(6),
    .cell:nth-child(12), .cell:nth-child(15),
    .cell:nth-child(21), .cell:nth-child(24),
    .cell:nth-child(30), .cell:nth-child(33),
    .cell:nth-child(39), .cell:nth-child(42),
    .cell:nth-child(48), .cell:nth-child(51),
    .cell:nth-child(57), .cell:nth-child(60),
    .cell:nth-child(66), .cell:nth-child(69),
    .cell:nth-child(75), .cell:nth-child(78) {
        border-right: 3px solid #333;
    }

    .cell:nth-child(n+19):nth-child(-n+27),
    .cell:nth-child(n+46):nth-child(-n+54) {
        border-bottom: 3px solid #333;
    }

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.status {
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
    min-height: 30px;
}

.success {
    color: #4CAF50;
    animation: pulse 1s infinite;
}

.number-buttons {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    background: #333;
    border: 4px solid #333;
    border-radius: 10px;
    margin: 20px auto 0;
    max-width: 450px;
    width: 450px;
    height: 45px;
}

.number-btn {
    background: white;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    border-radius: 4px;
}

    .number-btn:hover {
        background: #e3f2fd;
        transform: scale(1.05);
    }

    .number-btn.selected {
        background: #2196F3;
        color: white;
    }

.erase-btn {
    background: #ffebee !important;
    color: #d32f2f !important;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.cell.selected {
    background: #bbdefb !important;
    border: 3px solid #2196F3 !important;
}

.difficulty {
    text-align: center;
    margin-bottom: 20px;
}

    .difficulty select {
        padding: 8px 15px;
        border-radius: 20px;
        border: 2px solid #ddd;
        font-size: 16px;
        background: white;
    }

@media (max-width: 600px) {
    .game-container {
        padding: 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .sudoku-grid {
        width: 350px;
        height: 350px;
        max-width: 350px;
    }

    .number-buttons {
        width: 350px;
        max-width: 350px;
        height: 35px;
    }

    .number-btn {
        font-size: 14px;
    }

    .cell {
        font-size: 16px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
