:root {
    --primary: #FFD700;
    --primary-glow: rgba(255, 215, 0, 0.4);
    --bg-dark: #0F172A;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --accent-red: #EF4444;
    --accent-green: #10B981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
}

h1,
.value,
.label {
    font-family: 'Outfit', sans-serif;
}

#app {
    width: 100%;
    max-width: 500px;
    height: 90vh;
    max-height: 800px;
    position: relative;
    padding: 20px;
}

.glass-container {
    background: var(--glass);
    background-size: cover;
    background-position: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: background-image 0.5s ease-in-out;
}

header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.stats {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.stat-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.value {
    font-size: 18px;
    font-weight: 600;
}

.meter-bg,
.patience-bg {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.meter-fill {
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 0.5s ease;
}

.patience-fill {
    height: 100%;
    background: var(--accent-red);
    transition: width 0.3s ease;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.scene-intro h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(to bottom, #fff, #94A3B8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scenario-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.primary-btn {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--primary-glow);
}

#dialogue-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#speaker-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 8px;
}

#dialogue-text {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 16px;
}

#choices-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 10px;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

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

#game-controls {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.control-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--primary);
}

.control-btn:disabled {
    cursor: not-allowed;
}

.control-btn.secondary:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.hidden {
    display: none;
}