:root {
    --accent-blue: #007AFF;
    --accent-red: #FF3B30;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-muted: rgba(255, 255, 255, 0.5);
    --font-main: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

body {
    background: #000;
    color: #fff;
    font-family: var(--font-main);
    margin: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.hud-grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(0, 122, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

.meta-tag {
    position: fixed;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #222;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 5;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 3.5rem 3rem;
    width: 100%;
    max-width: 680px;
    text-align: center;
    box-shadow: 0 50px 100px rgba(0,0,0,0.9);
    position: relative;
    z-index: 10;
    max-height: 95vh;
    max-height: 95dvh;
    overflow-y: auto;
}
@media (max-width: 768px) {
    .glass-card, .warning-box, .legal-box, .form-group, .choice-grid, .btn-action, .minimal-btn {
        box-sizing: border-box;
    }
    .glass-card {
        padding: 2rem 1.2rem;
        max-height: 95dvh;
        width: 92%;
    }
    h1 { font-size: 1.6rem; }
    .question-main, .question-text, .gateway-title { font-size: 1.5rem; margin-bottom: 1.5rem; }
    .meta-tag { display: none; }
    .warning-box { padding: 1.2rem; }
}
.glass-card::-webkit-scrollbar { width: 4px; }
.glass-card::-webkit-scrollbar-thumb { background: rgba(0, 122, 255, 0.3); border-radius: 10px; }

.glass-card.clean-mode {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.screen { display: none; width: 100%; padding: 0; margin: 0; }
.screen.active { display: flex; flex-direction: column; align-items: center; justify-content: center; animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

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

h1 { font-weight: 800; letter-spacing: -2px; margin-bottom: 1.2rem; font-size: 2.22rem; line-height: 1.1; color: #fff; }
p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; font-weight: 300; margin-bottom: 1.5rem; max-width: 440px; margin-left: auto; margin-right: auto; }

.tag-label { 
    font-size: 0.6rem; font-weight: 800; letter-spacing: 5px; color: var(--accent-blue); 
    text-transform: uppercase; margin-bottom: 1.5rem; display: block;
    text-shadow: 0 0 10px rgba(0, 122, 255, 0.3);
}

.warning-box {
    background: rgba(0, 122, 255, 0.03);
    border: 1px solid rgba(0, 122, 255, 0.1);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2.2rem;
    text-align: left;
}
.warning-box p { color: var(--accent-blue); margin: 0; font-weight: 400; font-size: 0.85rem; line-height: 1.5; }

.legal-box {
    background: rgba(255,255,255,0.015); 
    padding: 2.2rem; 
    border-radius: 20px; 
    margin-bottom: 2.2rem; 
    max-height: 260px; 
    overflow-y: auto; 
    border: 1px solid var(--glass-border);
}
.legal-clause {
    display: grid;
    grid-template-columns: 28px 1fr;
    margin-bottom: 1.5rem;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #888;
    text-align: left;
}
.legal-clause span { color: var(--accent-blue); font-weight: 800; font-family: var(--font-mono); }
.legal-clause b { color: #ccc; font-weight: 600; }
.legal-box::-webkit-scrollbar { width: 3px; }
.legal-box::-webkit-scrollbar-thumb { background: rgba(0, 122, 255, 0.2); border-radius: 10px; }

.form-group { width: 100%; max-width: 380px; margin-bottom: 1.8rem; text-align: left; }
.form-group label { display: block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 2px; color: var(--accent-blue); margin-bottom: 0.7rem; font-weight: 800; }

input, select, textarea {
    width: 100%;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    padding: 1.1rem;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
input:focus { border-color: var(--accent-blue); background: rgba(255,255,255,0.06); box-shadow: 0 0 20px rgba(0, 122, 255, 0.2); outline: none; }

.btn-action {
    width: 100%;
    max-width: 380px;
    background: #fff;
    color: #000;
    border: none;
    padding: 1.2rem;
    border-radius: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.btn-action:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 15px 35px rgba(0, 122, 255, 0.4); 
    background: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: 0.3s;
}
.btn-outline:hover { 
    border-color: var(--accent-blue); 
    color: #fff; 
    background: rgba(0, 122, 255, 0.05);
    box-shadow: 0 0 25px rgba(0, 122, 255, 0.2);
}
.minimal-btn {
    background: transparent;
    border: 1px solid rgba(0, 122, 255, 0.3);
    color: var(--accent-blue);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    cursor: pointer;
    transition:all 0.3s;
}
.minimal-btn:hover { background: rgba(0, 122, 255, 0.1); border-color: var(--accent-blue); }

/* Dilemma UI */
.clean-question-container { text-align: center; width: 100%; max-width: 680px; animation: fadeIn 1.2s ease; }
.phase-tag { font-family: var(--font-mono); font-size: 0.6rem; color: #444; letter-spacing: 5px; margin-bottom: 1.5rem; text-transform: uppercase; }
.question-main { font-size: 2.1rem; font-weight: 300; line-height: 1.35; color: #fff; margin-bottom: 2rem; letter-spacing: -1px; }

.choice-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.btn-choice {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    min-width: 130px;
}
.btn-choice:hover { 
    background: rgba(255,255,255,0.05); 
    border-color: var(--accent-blue); 
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 122, 255, 0.2);
}

/* Area Grid */
.area-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}
@media (max-width: 600px) {
    .area-grid { grid-template-columns: 1fr; }
}

/* Flash Overlay */
.flash-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.05s ease;
}
.flash-overlay.active { opacity: 1; }
.flash-word { font-size: 15vw; font-weight: 900; color: #000; letter-spacing: -5px; text-transform: uppercase; }

/* HUD Top */
.hud-header {
    position: fixed;
    top: 2rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #444;
    letter-spacing: 2px;
    z-index: 100;
    pointer-events: none;
}

/* Voice Box */
.voice-decree-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin: 0 auto 2rem;
    max-width: 500px;
}
.voice-decree-text {
    font-size: 1.5rem;
    font-weight: 300;
    font-style: italic;
    color: #fff;
    margin-bottom: 2rem;
    line-height: 1.4;
}
.voice-btn {
    background: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}
.voice-btn.recording {
    background: rgba(255, 59, 48, 0.1);
    animation: pulse-border 1.5s infinite;
}
@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* Progress bar */
.progress-bar-container {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    height: 4px;
    background: #111;
    z-index: 100;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}
