* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/**/
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #21243b 0%, #21243b 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #f8f9fa;
    overflow-x: hidden;
}

.game-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 32px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    transform: translateY(0);
    animation: slideIn 0.8s ease-out;
    max-width: 450px;
    width: 100%;
}

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

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 24px;
    font-weight: 700;
    color: #f8f9fa;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.06);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-info {
    text-align: center;
    flex: 1;
}

.player-info h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-weight: 500;
}

.score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #46f9ff;
    text-shadow: 0 2px 4px rgba(96, 165, 250, 0.3);
}

.current-player {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: rgba(96, 165, 250, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(96, 165, 250, 0.2);
    color: #e2e8f0;
    font-weight: 500;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    aspect-ratio: 1;
}

.cell {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.cell:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.cell.x {
    color: #ff4a77;
    text-shadow: 0 2px 8px rgb(255, 43, 114);
    animation: popIn 0.3s ease-out;
}

.cell.o {
    color: #00ffd5;
    text-shadow: 0 2px 8px rgb(40, 255, 147);
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cell.winning {
    animation: winningCell 1.5s ease-in-out infinite;
}

@keyframes winningCell {
    0%, 100% {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
    }
    50% {
        background: rgba(96, 165, 250, 0.2);
        border-color: rgba(96, 165, 250, 0.4);
    }
}

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

.btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #4696ff, #3b82f6);
    color: white;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

.game-status {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.victory-message {
    animation: victoryPulse 0.5s ease-out;
    color: #20deff;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(2, 217, 255, 0.3);
}

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

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #27d4ff;
    border-radius: 50%;
    pointer-events: none;
    animation: particle 1.5s ease-out forwards;
}

@keyframes particle {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(0);
    }
}

@media (max-width: 600px) {
    .game-container {
        padding: 20px;
        margin: 16px;
        max-width: 380px;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .game-info {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .current-player {
        font-size: 1rem;
        padding: 10px 12px;
        margin-bottom: 20px;
    }
    
    .cell {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}