: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-x: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    width: 100%;
    max-width: 800px;
}

header {
    text-align: center;
    width: 100%;
}

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;
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 2rem;
    background: var(--board-bg);
    border-radius: 20px;
    border: 2px solid var(--board-border);
    backdrop-filter: blur(10px);
    margin-bottom: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.score {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

#score-p1 span:first-child { color: var(--p1-color); }
#score-p2 span:first-child { color: var(--p2-color); }

.score span:last-child {
    font-size: 2.5rem;
    font-weight: 800;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

main {
    width: 100%;
    display: flex;
    justify-content: center;
}

.screen {
    display: none;
    background: var(--board-bg);
    border-radius: 20px;
    border: 2px solid var(--board-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    padding: 2.5rem;
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.screen.active {
    display: block;
    animation: dropIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes dropIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.screen.hidden {
    display: none !important;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.instruction {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.7);
}

.lock-icon {
    font-size: 2rem;
    vertical-align: middle;
}

.choices {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.choice-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--board-border);
    border-radius: 20px;
    width: 120px;
    height: 120px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    outline: none;
}

.choice-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.3);
}

.choice-btn:active {
    transform: scale(0.95);
}

.emoji {
    font-size: 3.5rem;
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

.choice-btn:hover .emoji {
    transform: scale(1.15) rotate(5deg);
}

.label {
    font-size: 1rem;
    font-weight: 600;
}

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

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn.secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
}

.result-actions {
    margin-top: 2rem;
}

.results {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 2rem 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--board-border);
}

.player-result h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chosen-emoji {
    font-size: 4.5rem;
    animation: bounce 2s infinite ease-in-out alternate;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.2));
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.vs {
    font-size: 2.5rem;
    font-weight: 800;
    font-style: italic;
    color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    .score-board {
        gap: 1.5rem;
        padding: 1rem;
    }
    .choices {
        gap: 10px;
    }
    .choice-btn {
        width: 100px;
        height: 100px;
    }
    .emoji { font-size: 2.5rem; }
    h1 { font-size: 2.2rem; }
}
