:root {
    --bg-dark: #0f172a;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --win-color: #10b981;
    --lose-color: #ef4444;
    --draw-color: #f59e0b;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    /* Subtle background gradient */
    background: radial-gradient(circle at top left, #1e1b4b, var(--bg-dark) 40%),
                radial-gradient(circle at bottom right, #31113d, var(--bg-dark) 40%);
}

.app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.user-info span {
    font-weight: 600;
    font-size: 1.1rem;
}

.title {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Screens */
.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.screen.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.screen.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Menu */
.hero-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

#screen-menu h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

#screen-menu p {
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.primary-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.secondary-btn {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.secondary-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.05);
}

/* Searching */
.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
    margin-top: 50px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Game */
.matchup {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 40%;
}

.player span {
    font-weight: 600;
    font-size: 1.1rem;
}

.status {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 10px;
}

.status.ready {
    color: var(--win-color);
    background: rgba(16, 185, 129, 0.2);
}

.vs {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.game-instruction {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 600;
}

.choices {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 15px;
}

.choice-btn {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    color: white;
}

.choice-btn .emoji {
    font-size: 2.5rem;
    transition: transform 0.2s;
}

.choice-btn .label {
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
}

.choice-btn:hover, .choice-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.choice-btn:hover .emoji, .choice-btn:active .emoji {
    transform: scale(1.1);
}

.choice-btn.selected {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Result */
.result-emoji {
    font-size: 5rem;
    margin-bottom: 10px;
    margin-top: 20px;
}

#result-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.result-details {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 50px;
}

.result-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.result-player span {
    color: var(--text-muted);
    font-weight: 600;
}

.result-choice {
    font-size: 4rem;
    background: var(--glass-bg);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}
