/* ==========================================
   GO DEEPER - DARK & INTENSE
   A confrontational quiz experience
   ========================================== */

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

:root {
    /* Dark theme */
    --bg-black: #050505;
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #161616;

    /* Accent colors */
    --red: #dc2626;
    --red-dark: #991b1b;
    --red-glow: rgba(220, 38, 38, 0.3);
    --orange: #ea580c;
    --amber: #d97706;

    /* Text */
    --text-white: #fafafa;
    --text-gray: #a3a3a3;
    --text-muted: #525252;

    /* Borders */
    --border: #262626;
    --border-light: #333333;

    /* Status */
    --success: #22c55e;
    --warning: #eab308;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-black);
    color: var(--text-white);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   BACKGROUND EFFECTS
   ========================================== */

.bg-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(220, 38, 38, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(220, 38, 38, 0.08), transparent),
        linear-gradient(180deg, var(--bg-black) 0%, var(--bg-dark) 100%);
}

.bg-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

.bg-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--bg-black) 100%);
    pointer-events: none;
}

/* ==========================================
   LAYOUT
   ========================================== */

.screen {
    display: none;
    min-height: 100vh;
    min-height: 100dvh;
}

.screen.active {
    display: block;
}

.container {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ==========================================
   AGE GATE
   ========================================== */

.age-gate-box {
    text-align: center;
    padding: 48px 24px;
}

.skull-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    color: var(--red);
    opacity: 0.8;
}

.skull-icon svg {
    width: 100%;
    height: 100%;
}

.age-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    letter-spacing: 8px;
    color: var(--text-white);
    margin-bottom: 16px;
}

.age-line {
    width: 60px;
    height: 2px;
    background: var(--red);
    margin: 0 auto 24px;
}

.age-text {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 32px;
    line-height: 1.8;
}

.age-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger {
    background: var(--red);
    color: white;
}

.btn-danger:hover {
    background: var(--red-dark);
    box-shadow: 0 0 30px var(--red-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text-gray);
    border-color: var(--border-light);
}

.btn-start {
    width: 100%;
    max-width: 320px;
    padding: 18px 40px;
    background: transparent;
    color: var(--red);
    border: 2px solid var(--red);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.btn-start:hover {
    background: var(--red);
    color: white;
    box-shadow: 0 0 40px var(--red-glow);
}

.btn-start .btn-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.btn-start:hover .btn-icon {
    transform: translateX(4px);
}

/* ==========================================
   WELCOME SCREEN
   ========================================== */

.welcome-box {
    text-align: center;
}

.welcome-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--red);
    background: rgba(220, 38, 38, 0.1);
    padding: 8px 16px;
    border-radius: 2px;
    margin-bottom: 16px;
}

.welcome-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    letter-spacing: 6px;
    color: var(--text-white);
    margin-bottom: 8px;
    line-height: 1;
}

.welcome-subtitle {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.welcome-intro {
    margin-bottom: 32px;
}

.intro-lead {
    font-size: 1.1rem;
    color: var(--text-white);
    margin-bottom: 16px;
}

.intro-text {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 12px;
    line-height: 1.7;
}

.intro-highlight {
    font-size: 1rem;
    color: var(--red);
    font-weight: 500;
    margin-top: 20px;
}

/* Warning Card */
.warning-card {
    display: flex;
    gap: 16px;
    text-align: left;
    background: rgba(220, 38, 38, 0.05);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 32px;
}

.warning-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50%;
}

.warning-content h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 8px;
}

.warning-content p {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.6;
}

/* Topics Preview */
.topics-preview {
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 40px;
}

.topics-preview h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.topics-list {
    list-style: none;
}

.topics-list li {
    position: relative;
    padding-left: 16px;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 10px;
    line-height: 1.5;
}

.topics-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    background: var(--red);
    border-radius: 50%;
}

.privacy-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 24px;
}

/* ==========================================
   QUIZ SCREEN
   ========================================== */

.quiz-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.quiz-header {
    padding-top: 20px;
    margin-bottom: 32px;
}

.progress-container {
    width: 100%;
}

.progress-bar {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red), var(--orange));
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 2px;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.category-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--red);
    background: rgba(220, 38, 38, 0.1);
    padding: 6px 12px;
    border-radius: 2px;
}

.category-badge:empty,
.category-badge.hidden {
    display: none;
}

/* Question Card */
.quiz-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.question-card {
    margin-bottom: 32px;
    animation: fadeIn 0.4s ease;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-white);
    line-height: 1.4;
    margin-bottom: 12px;
}

.question-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.question-subtext:empty {
    display: none;
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.options-container.hidden {
    display: none;
}

.option-btn {
    width: 100%;
    padding: 18px 20px;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-white);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.5;
    animation: slideIn 0.3s ease;
    animation-fill-mode: both;
}

.option-btn:nth-child(1) { animation-delay: 0.05s; }
.option-btn:nth-child(2) { animation-delay: 0.1s; }
.option-btn:nth-child(3) { animation-delay: 0.15s; }
.option-btn:nth-child(4) { animation-delay: 0.2s; }
.option-btn:nth-child(5) { animation-delay: 0.25s; }
.option-btn:nth-child(6) { animation-delay: 0.3s; }

.option-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateX(4px);
}

.option-btn:active {
    transform: translateX(4px) scale(0.99);
}

/* Intensity indicators */
.option-btn.intensity-low {
    border-left: 3px solid var(--success);
}

.option-btn.intensity-mid {
    border-left: 3px solid var(--warning);
}

.option-btn.intensity-high {
    border-left: 3px solid var(--red);
}

/* Slider */
.slider-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}

.slider-container.hidden {
    display: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.slider {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--red);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--red);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.slider-value {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--red);
    margin: 24px 0;
}

.btn-slider {
    width: 100%;
    background: var(--red);
    color: white;
}

/* Multi-select */
.multi-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}

.multi-container.hidden {
    display: none;
}

.multi-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.multi-option {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-black);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.multi-option:hover {
    border-color: var(--border-light);
}

.multi-option.selected {
    border-color: var(--red);
    background: rgba(220, 38, 38, 0.1);
}

.multi-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.multi-option.selected .multi-checkbox {
    border-color: var(--red);
    background: var(--red);
}

.multi-checkbox svg {
    width: 12px;
    height: 12px;
    stroke: white;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.multi-option.selected .multi-checkbox svg {
    opacity: 1;
}

.multi-label {
    color: var(--text-white);
    font-size: 0.95rem;
}

.btn-multi {
    width: 100%;
    background: var(--red);
    color: white;
}

/* Text Input */
.text-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}

.text-container.hidden {
    display: none;
}

.text-input {
    width: 100%;
    background: var(--bg-black);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    color: var(--text-white);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 16px;
}

.text-input:focus {
    outline: none;
    border-color: var(--red);
}

.text-input::placeholder {
    color: var(--text-muted);
}

.text-input.shake {
    animation: shake 0.5s ease-in-out;
    border-color: var(--red);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-8px); }
    80% { transform: translateX(8px); }
}

.btn-text {
    width: 100%;
    background: var(--red);
    color: white;
}

/* Back Button */
.btn-back {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
}

.btn-back svg {
    width: 20px;
    height: 20px;
}

.btn-back:hover {
    color: var(--text-white);
    border-color: var(--border-light);
}

.btn-back.hidden {
    display: none;
}

/* Feedback Toast */
.feedback-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 24px;
    max-width: 90%;
    text-align: center;
    z-index: 1000;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 1.7s forwards;
}

.feedback-toast.hidden {
    display: none;
}

.feedback-toast .feedback-text {
    font-size: 0.9rem;
    color: var(--text-white);
    font-style: italic;
}

.feedback-toast.intensity-low {
    border-color: var(--success);
}

.feedback-toast.intensity-mid {
    border-color: var(--warning);
}

.feedback-toast.intensity-high {
    border-color: var(--red);
}

/* ==========================================
   RESULTS SCREEN
   ========================================== */

.result-box {
    padding: 40px 0;
}

.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.score-ring {
    position: relative;
    width: 140px;
    height: 140px;
}

.score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 6;
}

.ring-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke: var(--red);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1.5s ease;
}

.score-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1;
}

.score-unit {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.score-percent {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Result Level */
.result-level {
    text-align: center;
    margin-bottom: 32px;
}

.level-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 3px;
    color: var(--red);
    margin-bottom: 16px;
}

.level-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    max-width: 200px;
    margin: 0 auto;
}

.level-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red), var(--orange));
    width: 0%;
    transition: width 1s ease 0.5s;
}

/* Result Description */
.result-description {
    text-align: center;
    margin-bottom: 32px;
}

.result-description p {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.8;
}

/* Insights */
.result-insights {
    margin-bottom: 32px;
}

.insight-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--red);
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.insight-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.insight-value {
    font-size: 0.95rem;
    color: var(--text-white);
}

/* Verdict */
.result-verdict {
    background: rgba(220, 38, 38, 0.05);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: center;
}

.result-verdict h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--red);
    margin-bottom: 12px;
}

.result-verdict p {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.7;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
}

.btn-restart,
.btn-share {
    padding: 14px 28px;
    font-size: 0.8rem;
    background: transparent;
    color: var(--text-gray);
    border: 1px solid var(--border);
}

.btn-restart:hover,
.btn-share:hover {
    color: var(--text-white);
    border-color: var(--border-light);
}

/* Confession Box */
.confession-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.confession-box h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 8px;
}

.confession-box > p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.confession-box textarea {
    width: 100%;
    height: 100px;
    padding: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-white);
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    resize: vertical;
    margin-bottom: 16px;
}

.confession-box textarea::placeholder {
    color: var(--text-muted);
}

.confession-box textarea:focus {
    outline: none;
    border-color: var(--red);
}

.btn-confess {
    width: 100%;
    background: var(--red);
    color: white;
}

/* ==========================================
   ANIMATIONS
   ========================================== */

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (min-width: 480px) {
    .age-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .welcome-title {
        font-size: 5rem;
    }

    .question-text {
        font-size: 1.75rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 32px;
    }

    .age-title {
        font-size: 4rem;
    }

    .welcome-title {
        font-size: 6rem;
    }

    .question-text {
        font-size: 2rem;
    }

    .option-btn {
        padding: 20px 24px;
        font-size: 1rem;
    }
}
