:root {
    --main-bg: #000;
    --link-color: #fff;
    --main-mauve: #ec008c;
    --main-blue: #00aeef;
    --white: #fff;
    --black: #000;
    --light: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.xo-page {
    background-color: var(--main-bg);
    background-image: url("/imgs/body-bg.png");
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 20px;
}

.xo-container {
    text-align: center;
    padding: 40px;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    background-color: var(--glass-bg);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    grid-column: 2;
    justify-self: center;
    margin: 0 !important;
    width: 100%;
    max-width: 450px;
    z-index: 1;
    position: relative;
}

.xo-container h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, var(--main-blue), var(--main-mauve));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
}

/* Scoreboard Styling */
.scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.score-box {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.score-box.active-x {
    border-color: var(--main-blue);
    background: rgba(0, 174, 239, 0.1);
}
.score-box.active-o {
    border-color: var(--main-mauve);
    background: rgba(236, 0, 140, 0.1);
}

.score-box label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 5px;
}

.score-box strong {
    font-size: 20px;
    color: var(--white);
}

/* Board & Cells */
.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 0 auto 30px;
}

.cell {
    aspect-ratio: 1/1;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    font-size: 54px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--glass-border);
}

.cell:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.cell[data-symbol="X"] {
    color: var(--main-blue) !important;
    text-shadow:
        0 0 10px var(--main-blue),
        0 0 5px var(--main-blue);
}

.cell[data-symbol="O"] {
    color: var(--main-mauve) !important;
    text-shadow:
        0 0 10px var(--main-mauve),
        0 0 5px var(--main-mauve);
}

.mode-select button.active {
    background: var(--main-blue);
    border-color: var(--white);
    box-shadow: 0 0 15px var(--main-blue);
    transform: scale(1.05);
}
.cell.win {
    background: var(--main-blue);
    color: white !important;
    box-shadow: 0 0 30px var(--main-blue);
    animation: winPulse 1s infinite alternate;
}

/* Buttons */
.mode-select {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

button {
    padding: 12px 20px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

button:hover {
    background: var(--main-blue);
    border-color: var(--main-blue);
    box-shadow: 0 10px 20px rgba(0, 174, 239, 0.3);
}

button.active {
    background: var(--main-mauve);
    border-color: var(--main-mauve);
}

#resetBtn {
    width: 100%;
    margin-top: 15px;
    background: transparent;
    border: 1px solid var(--main-mauve);
    color: var(--main-mauve);
}

#resetBtn:hover {
    background: var(--main-mauve);
    color: white;
}

.status p {
    font-weight: 500;
    color: var(--light);
    margin-bottom: 10px;
}

@keyframes winPulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}
.game-page-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    align-items: start;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 90px 40px 40px 40px;
}
@media (min-width: 1200px) {
    .game-page-wrapper {
        grid-template-columns: 300px 1fr 300px;
    }
}

@media (max-width: 1199px) and (min-width: 768px) {
    .game-page-wrapper {
        grid-template-columns: 1fr 300px;
    }
    .puzzle-container {
        grid-column: 1;
    }
    .games-sidebar {
        grid-column: 2;
    }
}

@media (max-width: 767px) {
    .game-page-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 100px 15px 20px;
    }
    .puzzle-container, .games-sidebar {
        grid-column: auto;
        width: 100%;
        max-width: 100%;
    }
    .games-sidebar {
        position: static;
        margin-top: 30px;
    }
}
