:root {
    --bg-color: #0f172a;
    --board-bg: rgba(30, 41, 59, 0.7);
    --cell-bg: rgba(51, 65, 85, 0.8);
    --cell-hover: rgba(71, 85, 105, 0.9);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --x-color: #38bdf8;
    --o-color: #f43f5e;
    --btn-bg: #6366f1;
    --btn-hover: #4f46e5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--bg-color), #000000);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: var(--board-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
    color: var(--text-secondary);
    min-height: 1.5rem;
    transition: color 0.3s ease;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 10px;
    margin-bottom: 2rem;
}

.cell {
    background: var(--cell-bg);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cell:hover {
    background: var(--cell-hover);
    transform: translateY(-2px);
}

.cell.x {
    color: var(--x-color);
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.cell.o {
    color: var(--o-color);
    text-shadow: 0 0 15px rgba(244, 63, 94, 0.5);
}

.cell.winner {
    animation: pulse 1s infinite;
    background: rgba(255, 255, 255, 0.1);
}

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

button {
    background: var(--btn-bg);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

button:hover {
    background: var(--btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

button:active {
    transform: translateY(0);
}
