/* CSS Styles for Tic Tac Toe Game */

/* Reset and base styles */
* {
    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;
    color: white;
    padding: 20px;
}

/* Main game container */
.game-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    width: 100%;
}

/* Game title */
h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* Score board */
.score-board {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.score {
    text-align: center;
}

.score h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #fff;
}

.score span {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Game information */
.game-info {
    margin: 20px 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.current-player {
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 10px;
}

/* Game board */
.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
    max-width: 300px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Game cells */
.cell {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 10px;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.cell:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.cell:active {
    transform: translateY(0);
}

.cell.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Player X styling */
.cell.x {
    color: #e74c3c;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Player O styling */
.cell.o {
    color: #3498db;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Winning cells highlight */
.winning-cell {
    background: rgba(255, 215, 0, 0.8) !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 8px 16px rgba(255, 215, 0, 0.4);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
}

/* Game status */
.game-status {
    font-size: 1.5rem;
    margin: 20px 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.winner {
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: celebration 2s ease-in-out infinite;
}

.draw {
    color: #ff9800;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes celebration {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
    }
    25% { 
        transform: scale(1.1) rotate(1deg);
    }
    75% { 
        transform: scale(1.05) rotate(-1deg);
    }
}

/* Control buttons */
.controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.reset-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 120px;
}

.reset-btn:hover {
    background: linear-gradient(45deg, #ee5a52, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.reset-btn:active {
    transform: translateY(0);
}

#clearScoreBtn {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}

#clearScoreBtn:hover {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
}

/* Responsive design */
@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .cell {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .game-board {
        max-width: 250px;
    }
    
    .score h3 {
        font-size: 1rem;
    }
    
    .score span {
        font-size: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .reset-btn {
        min-width: 200px;
    }
}