* {
    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: #333;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #4a5568;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.current-player {
    font-weight: bold;
    font-size: 1.1rem;
}

.current-player span {
    color: #667eea;
    font-size: 1.3rem;
}

.game-status {
    font-weight: bold;
    color: #4a5568;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 5px;
    max-width: 300px;
    margin: 0 auto 20px;
    background: #4a5568;
    border-radius: 10px;
    padding: 5px;
}

.cell {
    aspect-ratio: 1;
    background: white;
    border: none;
    border-radius: 5px;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cell:hover {
    background: #f0f4f8;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cell.x {
    color: #e53e3e;
    background: #fed7d7;
}

.cell.o {
    color: #3182ce;
    background: #bee3f8;
}

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

.reset-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.winner {
    animation: celebrate 0.6s ease-in-out;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.winning-line {
    position: relative;
    overflow: hidden;
}

.winning-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    opacity: 0.3;
    animation: flash 1s ease-in-out infinite;
}

@keyframes flash {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

@media (max-width: 480px) {
    .container {
        margin: 20px;
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .cell {
        font-size: 2rem;
    }
}