:root {
    --bg-color: #0f172a;
    --board-bg: rgba(30, 41, 59, 0.7);
    --board-border: rgba(255, 255, 255, 0.1);
    --empty-slot: #020617;
    --p1-color: #f43f5e;
    --p1-glow: rgba(244, 63, 94, 0.5);
    --p2-color: #0ea5e9;
    --p2-glow: rgba(14, 165, 233, 0.5);
    --text-color: #f8fafc;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

header {
    text-align: center;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--p1-color), var(--p2-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.turn-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid var(--board-border);
}

.player-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.p1-current { background-color: var(--p1-color); box-shadow: 0 0 10px var(--p1-glow); }
.p2-current { background-color: var(--p2-color); box-shadow: 0 0 10px var(--p2-glow); }

/* The Board */
.board {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    background: var(--board-bg);
    padding: 16px;
    border-radius: 20px;
    border: 2px solid var(--board-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 10;
}

.cell {
    width: 60px;
    height: 60px;
    background-color: var(--empty-slot);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

.cell:hover {
    transform: scale(1.05);
}

/* The pieces */
.piece {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-800px);
    z-index: -1;
}

.piece.animate-drop {
    animation: dropIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes dropIn {
    to { transform: translateY(0); }
}

.piece.player1 {
    background: radial-gradient(circle at 30% 30%, #fb7185, var(--p1-color));
    box-shadow: 0 0 15px var(--p1-glow), inset 0 -4px 8px rgba(0,0,0,0.3);
}

.piece.player2 {
    background: radial-gradient(circle at 30% 30%, #38bdf8, var(--p2-color));
    box-shadow: 0 0 15px var(--p2-glow), inset 0 -4px 8px rgba(0,0,0,0.3);
}

/* UI Controls */
.btn {
    padding: 12px 24px;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--board-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn.ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 0.9rem;
    padding: 8px 16px;
}

.btn.whatsapp {
    background: #25D366;
    color: white;
    border: none;
    font-weight: 800;
}
.btn.whatsapp:hover {
    background: #1eb956;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
.modal.hidden {
    display: none;
}
.modal-content {
    background: var(--board-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--board-border);
    backdrop-filter: blur(25px);
    text-align: center;
    max-width: 90%;
    box-shadow: 0 10px 50px rgba(0,0,0,0.8);
}
.modal-content h2 {
    margin-bottom: 1rem;
    color: white;
    font-size: 2rem;
}
.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

@media (max-width: 600px) {
    .cell {
        width: 11vw;
        height: 11vw;
    }
    .board {
        gap: 2vw;
        padding: 3vw;
    }
    .modal-buttons {
        flex-direction: column;
    }
}
