/* ========================================
   THE MANIPULATION DETECTOR - @realitasmara
   Gold + Dark Premium Design System
   ======================================== */

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

:root {
    --bg-primary: #0D0D0D;
    --bg-card: #1A1A1A;
    --bg-card-hover: #222222;
    --border: #2A2A2A;
    --border-hover: #3A3A3A;
    --text-primary: #F5F5F5;
    --text-secondary: rgba(245, 245, 245, 0.7);
    --text-muted: rgba(245, 245, 245, 0.4);
    --accent: #C9A96E;
    --accent-glow: rgba(201, 169, 110, 0.3);
    --accent-soft: rgba(201, 169, 110, 0.12);
    --danger: #E53E3E;
    --danger-glow: rgba(229, 62, 62, 0.3);
    --clear: #2D6A4F;
    --yellow: #B7791F;
    --red-zone: #9B1C1C;
    --threat: #111111;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 660px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === SCREENS === */
.screen {
    min-height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.screen.active {
    display: flex;
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes countUp {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(229, 62, 62, 0.3); }
    50% { box-shadow: 0 0 40px rgba(229, 62, 62, 0.6); }
}

/* === HERO / LANDING === */
#landing {
    position: relative;
    text-align: center;
}

.hero-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.3;
}

.logo-wrapper {
    margin-bottom: 48px;
    animation: slideUp 0.6s ease;
    text-align: center;
    display: flex;
    justify-content: center;
}

.hero-content {
    animation: slideUp 0.8s ease;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(201, 169, 110, 0.25);
    border-radius: 100px;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(28px, 6vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #E8D5A8 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    animation: slideUp 1s ease;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 800;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 4px 20px var(--danger-glow);
}

.btn-primary:hover {
    background: #C53030;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--danger-glow);
}

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

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.btn-gold {
    color: var(--bg-primary);
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-gold:hover {
    background: #B89858;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

/* === SECTION TITLES === */
.section-title {
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* === FORM === */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

/* === QUIZ === */
.quiz-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.progress-bar {
    flex: 1;
    height: 3px;
    background: var(--border);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #E8D5A8);
    border-radius: 100px;
    transition: width 0.4s ease;
    width: 10%;
}

.quiz-question-label {
    text-align: center;
    margin-bottom: 24px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
}

.question-container {
    animation: fadeIn 0.4s ease;
}

.question-text {
    font-size: clamp(18px, 3.5vw, 22px);
    font-weight: 700;
    margin-bottom: 32px;
    line-height: 1.5;
    text-align: center;
}

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

.option-btn {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    padding: 18px 20px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    line-height: 1.5;
}

.option-btn .option-letter {
    font-weight: 800;
    color: var(--accent);
    flex-shrink: 0;
    font-size: 15px;
    min-width: 20px;
}

.option-btn:hover {
    background: var(--bg-card-hover);
    border-left-color: var(--accent);
    color: var(--text-primary);
}

.option-btn.selected {
    background: rgba(201, 169, 110, 0.08);
    border-color: var(--accent);
    border-left-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--accent-glow);
}

.option-btn:disabled {
    pointer-events: none;
}

/* === LOADING === */
.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

/* === RESULT === */
#result {
    padding-top: 40px;
}

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

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 28px;
    margin-bottom: 20px;
    animation: slideUp 0.5s ease backwards;
}

.result-card:nth-child(2) { animation-delay: 0.1s; }
.result-card:nth-child(3) { animation-delay: 0.2s; }

.card-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
}

/* Score Card */
.score-card {
    text-align: center;
}

.score-number {
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -3px;
    animation: countUp 0.8s ease;
}

.score-max-label {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-muted);
}

.verdict-level {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 8px;
}

.gold-divider {
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin: 20px auto;
}

/* High Severity Alert */
.severity-alert {
    background: #2D0000;
    border: 1px solid var(--danger);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    animation: pulseGlow 2s ease-in-out infinite;
}

.severity-alert .alert-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.severity-alert .alert-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--danger);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.severity-alert .alert-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Theory Block */
.theory-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid currentColor;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

.theory-block .theory-detected {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.theory-block .theory-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.theory-block .theory-ref {
    font-size: 12px;
    color: var(--accent);
    font-style: italic;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.theory-block .theory-why {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.theory-block .theory-phrases-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.theory-block .theory-phrase {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    padding-left: 4px;
}

.theory-block .theory-phrase .arrow {
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

/* Action Plan */
.action-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.action-step .step-num {
    font-size: 28px;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    flex-shrink: 0;
    min-width: 32px;
}

.action-step .step-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-top: 4px;
}

/* CTA Button Full Width */
.cta-full {
    display: block;
    width: 100%;
    padding: 18px 24px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--danger);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px var(--danger-glow);
}

.cta-full:hover {
    background: #C53030;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--danger-glow);
}

/* Download Story Button */
.btn-download-story {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 12px;
}

.btn-download-story:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

/* === FOOTER === */
.footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--border);
}

.footer-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-copy {
    font-size: 11px;
    color: rgba(245, 245, 245, 0.15);
}

/* === FLOATING WARNING === */
.floating-warning {
    background: var(--danger) !important;
}

/* === STORY CARD TEMPLATE (hidden, for generation) === */
.story-template {
    width: 1080px;
    height: 1920px;
    position: absolute;
    top: -99999px;
    left: -99999px;
    padding: 120px 80px 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    font-family: var(--font);
}

.story-template .story-logo img {
    max-width: 180px;
    height: auto;
    filter: brightness(1.5);
}

.story-template .story-label {
    font-size: 64px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.story-template .story-score {
    font-size: 36px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-bottom: 32px;
}

.story-template .story-divider {
    width: 80px;
    height: 2px;
    background: var(--accent);
    margin: 0 auto 32px;
}

.story-template .story-narrative {
    font-size: 28px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    max-width: 800px;
}

.story-template .story-footer-text {
    font-size: 22px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
}

.story-template .story-url {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.story-template .story-handle {
    font-size: 24px;
    color: rgba(255,255,255,0.6);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-num {
        font-size: 24px;
    }

    .result-card {
        padding: 24px 20px;
    }

    .score-number {
        font-size: 56px;
    }

    .question-text {
        font-size: 18px;
    }

    .option-btn {
        padding: 16px 16px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 28px;
    }

    .score-number {
        font-size: 48px;
    }

    .verdict-level {
        font-size: 18px;
    }

    .theory-block .theory-name {
        font-size: 16px;
    }
}
