* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.4s ease;
    background: linear-gradient(135deg, #3a0642, #60a5fa); /* soft blue */
}

/* HEADER */
.top {
    margin-top: 40px;
    text-align: center;
}

.top h1 {
    font-size: 42px;
    letter-spacing: 5px;
    color: #f0f9ff;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
}

.turn {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 18px;
    color: #f0f9ff;
    font-weight: 600;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255,255,255,0.6);
}

.dot.x { background: #2563eb; }
.dot.o { background: #31225c; }

/* BOARD */
.board {
    margin: 60px 0;
    display: grid;
    grid-template-columns: repeat(3, 120px);
    gap: 20px;
}

.cell {
    width: 120px;
    height: 120px;
    background: #bfdbfe; /* light blue cell */
    border-radius: 22px;
    font-size: 56px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.cell:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 25px rgba(59,130,246,0.5);
}

/* PLAYER COLORS + Glow */
.cell.x {
    color: #a216de;
    text-shadow: 0 0 15px rgba(6, 204, 102, 0.7);
}
.cell.o {
    color: #2d0eddd7;
    text-shadow: 0 0 15px rgba(73, 8, 21, 0.7);
}

/* WIN HIGHLIGHT */
.cell.win.x {
    background: linear-gradient(135deg, #440812, #1d4ed8);
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(21, 60, 68, 0.7);
}
.cell.win.o {
    background: linear-gradient(135deg, #59065c, #c2410c);
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(249,115,22,0.7);
}

/* FOOTER */
.bottom {
    width: 100%;
    max-width: 500px;
    padding: 0 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score {
    font-size: 19px;
    display: flex;
    gap: 25px;
    color: #f0f9ff;
    font-weight: 600;
}

.actions button {
    margin-left: 12px;
    transition: all 0.2s ease;
}

/* BUTTON */
button {
    padding: 12px 20px;
    border: none;
    border-radius: 14px;
    background: #8b5cf6; /* purple button */
    color: #f0f9ff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(139,92,246,0.5);
}

button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 25px rgba(139,92,246,0.8);
}

/* BUTTON CLICK GLOW */
button:active {
    box-shadow: 0 0 25px rgb(16, 4, 44);
}

/* CELEBRATION / DRAW */
.celebrate {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.celebrate h2 {
    font-size: 52px;
    font-weight: 700;
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.4s ease;
}

.celebrate.show h2 {
    opacity: 1;
    transform: scale(1);
}

.celebrate.x h2 { color: #a41947; text-shadow: 0 0 25px rgba(37,99,235,0.8); }
.celebrate.o h2 { color: #1467c6; text-shadow: 0 0 25px rgba(249,115,22,0.8); }
.celebrate.draw h2 { color: #131353; text-shadow: 0 0 25px rgba(250,204,21,0.8); }
