:root {
    --bg-color: #1a1a2e;
    --accent-color: #e94560;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --font-main: 'Inter', sans-serif;
    
    --rock-color: #e74c3c;
    --paper-color: #3498db;
    --scissors-color: #f1c40f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

#app {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    position: relative;
    min-height: 100vh;
}

/* Screens - FIXED LAYOUT */
.screen {
    position: relative;
    min-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    width: 100%;
    margin: 0 auto;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.screen.active {
    opacity: 1;
    z-index: 10;
    position: relative;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(10px);
}

h1 {
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

h2 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.instruction {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

/* Mode Selection */
.mode-selection {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.mode-btn:hover:not(:disabled) {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.mode-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mode-btn .emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.mode-btn small {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* Difficulty Options */
.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.difficulty-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.difficulty-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent-color);
}

.difficulty-btn.selected {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.diff-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.diff-desc {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Stats Box */
.stats-box {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

/* Settings */
.settings-group {
    margin-bottom: 1rem;
    text-align: left;
}

.settings-group label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 5px;
    opacity: 0.8;
}

select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-family: var(--font-main);
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
    color: #333;
}

/* Buttons */
.primary-btn {
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.1s;
    margin-top: 1rem;
}

.primary-btn:active {
    transform: scale(0.98);
}

.secondary-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.toggle-btn {
    background: #444;
    color: white;
    width: auto;
    padding: 5px 15px;
    float: right;
}

.toggle-btn.on {
    background: #2ecc71;
    color: black;
}

/* Choice Buttons */
.choice-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.choice-btn {
    padding: 15px 25px;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

.choice-btn:hover {
    transform: scale(1.05);
}

.choice-btn[data-choice="rock"]:hover {
    border-color: var(--rock-color);
    background: rgba(231, 76, 60, 0.2);
}

.choice-btn[data-choice="paper"]:hover {
    border-color: var(--paper-color);
    background: rgba(52, 152, 219, 0.2);
}

.choice-btn[data-choice="scissors"]:hover {
    border-color: var(--scissors-color);
    background: rgba(241, 196, 15, 0.2);
}

/* Scoreboard */
.scoreboard {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
}

.player-score {
    text-align: center;
}

.player-score .name {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}

.player-score .score {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
}

.vs {
    font-size: 1.5rem;
    font-weight: 800;
    opacity: 0.5;
}

/* Game Info */
.game-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Choices Display */
.choices-display {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.choice-card {
    text-align: center;
    padding: 2rem;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    min-width: 120px;
}

.choice-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.choice-icon {
    font-size: 4rem;
    display: block;
}

/* Result Message */
.result-message {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
}

.result-message.win {
    background: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.result-message.lose {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.result-message.draw {
    background: rgba(241, 196, 15, 0.3);
    color: #f1c40f;
}

/* Loader */
.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Final Score */
.final-score {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    margin: 1.5rem 0;
}

.stats-summary {
    background: rgba(0,0,0,0.3);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.stats-summary p {
    margin: 0.5rem 0;
}

/* Responsive */
@media (max-width: 600px) {
    .mode-selection {
        flex-direction: column;
    }
    
    .choices-display {
        gap: 1rem;
    }
    
    .choice-card {
        min-width: 80px;
        padding: 1rem;
    }
    
    .choice-icon {
        font-size: 3rem;
    }
    
    .scoreboard {
        gap: 1rem;
    }
    
    .player-score .score {
        font-size: 2rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}