/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 50%, #fdbb2d 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

header {
    background: linear-gradient(90deg, #1a2a6c, #b21f1f);
    color: white;
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid #0d1b4d;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    justify-content: space-around;
    font-size: 1.2rem;
    font-weight: bold;
}

main {
    padding: 30px;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.screen.active {
    display: flex;
}

.tutorial-content {
    margin: 20px 0;
    text-align: left;
    width: 100%;
}

.tutorial-step {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.tutorial-step h3 {
    color: #1a2a6c;
    margin-bottom: 10px;
}

.example-board {
    display: inline-block;
    margin-top: 10px;
    border: 2px solid #1a2a6c;
    border-radius: 5px;
    overflow: hidden;
}

.board-row {
    display: flex;
}

.cell {
    width: 50px;
    height: 50px;
    border: 1px solid #1a2a6c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.tutorial-step ul {
    padding-left: 20px;
}

.tutorial-step li {
    margin-bottom: 5px;
}

.tutorial-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.game-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.game-board-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 5px;
    background-color: #1a2a6c;
    border: 5px solid #1a2a6c;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cell-game {
    width: 100px;
    height: 100px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cell-game:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.cell-game.x {
    color: #b21f1f;
}

.cell-game.o {
    color: #1a2a6c;
}

.cell-game.win {
    background-color: #ffeb3b;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hint-display {
    min-height: 40px;
    padding: 10px;
    font-style: italic;
    color: #666;
    text-align: center;
    width: 100%;
}

.game-status {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 10px;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #f0f0f0;
}

.final-result {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.score-board {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.score {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    background-color: white;
    border-radius: 5px;
}

.game-over-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    max-width: 500px;
}

.difficulty-option {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.difficulty-option h3 {
    color: #1a2a6c;
    margin-bottom: 10px;
}

.btn-primary, .btn-secondary, .btn-difficulty {
    padding: 12px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(90deg, #1a2a6c, #b21f1f);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 42, 108, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 42, 108, 0.4);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #1a2a6c;
    border: 2px solid #1a2a6c;
}

.btn-secondary:hover {
    background-color: #e6e6ff;
}

.btn-difficulty {
    background: linear-gradient(90deg, #1a2a6c, #b21f1f);
    color: white;
    margin-top: 10px;
    width: 100%;
}

.btn-difficulty:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

footer {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .cell-game {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .tutorial-buttons, .game-over-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary, .btn-difficulty {
        width: 100%;
        margin-bottom: 10px;
    }
}