:root {
    --color-bg-dark: #050505;
    --color-bg-card: #0c0a09;
    --color-bg-card-inner: #111010;
    --color-blood: #a01010;
    --color-blood-bright: #d42a4a;
    --color-blood-light: #c04040;
    --color-ember: #ff4500;
    --color-gold: #d4a020;
    --color-gold-light: #e8b830;
    --color-parchment: #f0e6d0;
    --color-parchment-dark: #d8cdb8;
    --color-text: #f4efe8;
    --color-text-muted: #b8a898;
    --color-border: #2a2520;
    --color-border-light: #3a3530;

    --font-heading: 'Cinzel', serif;
    --font-body: 'Crimson Text', serif;

    --transition-fast: 0.15s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.8s ease;
}

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

html {
    font-size: 19px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.75;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(139, 0, 0, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(139, 0, 0, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    overflow-x: hidden;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(139, 0, 0, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 20%, rgba(139, 0, 0, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 70%, rgba(139, 0, 0, 0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 80%, rgba(139, 0, 0, 0.2) 0%, transparent 100%);
    animation: embers 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes embers {
    0% { transform: translateY(0); opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-100vh); opacity: 0.5; }
}

#app {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Main card container */
.page {
    max-width: 720px;
    width: 100%;
    padding: 3.5rem 3rem;
    background:
        linear-gradient(135deg, rgba(20, 18, 16, 0.95) 0%, rgba(12, 10, 9, 0.98) 100%);
    border: 1px solid var(--color-border);
    position: relative;
    animation: fadeIn var(--transition-medium);
    box-shadow:
        0 0 0 1px rgba(139, 0, 0, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.5),
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Ornate corner decorations */
.page::before,
.page::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-color: var(--color-blood);
    border-style: solid;
    opacity: 0.6;
}

.page::before {
    top: 12px;
    left: 12px;
    border-width: 2px 0 0 2px;
}

.page::after {
    bottom: 12px;
    right: 12px;
    border-width: 0 2px 2px 0;
}

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

/* Decorative Ornaments */
.ornament {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ornament::before,
.ornament::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to var(--direction), transparent, var(--color-blood) 30%, var(--color-gold) 50%, var(--color-blood) 70%, transparent);
}

.ornament::before { --direction: right; }
.ornament::after { --direction: left; }

.ornament-top {
    top: 20px;
}

.ornament-top::after {
    content: none;
}

.ornament-top::before {
    flex: none;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-blood) 20%, var(--color-gold) 50%, var(--color-blood) 80%, transparent);
}

.ornament-bottom {
    bottom: 20px;
}

.ornament-bottom::after {
    content: none;
}

.ornament-bottom::before {
    flex: none;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-blood) 20%, var(--color-gold) 50%, var(--color-blood) 80%, transparent);
}

/* Central ornament diamond */
.ornament-top::after,
.ornament-bottom::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-gold);
    box-shadow: 0 0 10px rgba(184, 134, 11, 0.3);
}

/* Typography */
.title {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    text-align: center;
    color: var(--color-parchment);
    letter-spacing: 0.08em;
    margin: 2.5rem 0 0.5rem;
    text-shadow:
        0 0 40px rgba(139, 0, 0, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
}

.subtitle {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.25rem;
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    letter-spacing: 0.15em;
}

/* Welcome Page */
.welcome-page {
    text-align: center;
}

/* Gates of Hell SVG */
.gates-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0 0.5rem;
}

.gates-svg {
    width: 180px;
    height: auto;
    color: var(--color-blood);
    filter: drop-shadow(0 0 20px rgba(139, 0, 0, 0.4));
    animation: gatesGlow 4s ease-in-out infinite;
}

@keyframes gatesGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(139, 0, 0, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(139, 0, 0, 0.6));
    }
}

/* Divider SVG */
.divider-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.divider-svg {
    width: 160px;
    height: auto;
    color: var(--color-blood);
    opacity: 0.7;
}

.intro {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1.5rem;
}

.intro p:first-child {
    font-style: italic;
    font-size: 1.4rem;
    color: var(--color-blood-light);
    margin-bottom: 2rem;
    position: relative;
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.4);
}

.intro p:first-child::before,
.intro p:first-child::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-blood));
    vertical-align: middle;
    margin: 0 1rem;
}

.intro p:first-child::after {
    background: linear-gradient(90deg, var(--color-blood), transparent);
}

.intro-text {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1.9;
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    padding: 1.2rem 2.8rem;
    border: 1px solid var(--color-border-light);
    background: transparent;
    color: var(--color-parchment);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    border-color: var(--color-blood);
    color: var(--color-parchment);
    box-shadow:
        0 0 30px rgba(139, 0, 0, 0.4),
        inset 0 0 20px rgba(139, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background:
        linear-gradient(180deg, rgba(139, 0, 0, 0.3) 0%, rgba(139, 0, 0, 0.1) 50%, transparent 100%);
    border-color: var(--color-blood);
    box-shadow:
        0 0 20px rgba(139, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-primary:hover {
    background:
        linear-gradient(180deg, rgba(139, 0, 0, 0.5) 0%, rgba(139, 0, 0, 0.2) 50%, rgba(139, 0, 0, 0.1) 100%);
    box-shadow:
        0 0 40px rgba(139, 0, 0, 0.5),
        0 5px 20px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(139, 0, 0, 0.2);
}

.btn-secondary {
    font-size: 0.9rem;
    margin-top: 2.5rem;
    padding: 0.9rem 2rem;
}

/* Question Page */
.question-page {
    padding: 2.5rem 2rem;
}

.question-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-blood);
    text-align: center;
    opacity: 0.3;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.progress-container {
    margin: 0 0.5rem 2rem;
    height: 2px;
    background: var(--color-border);
    border-radius: 1px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-blood), var(--color-blood-bright));
    box-shadow: 0 0 10px var(--color-blood);
    border-radius: 1px;
    transition: width 0.3s ease-out;
}

.question-container {
    padding: 1rem 0;
}

.question-text {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-parchment);
    text-align: center;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-option {
    width: 100%;
    text-align: left;
    padding: 1.4rem 1.6rem 1.4rem 1.8rem;
    font-family: var(--font-body);
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.6;
    border-color: var(--color-border);
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.btn-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-blood-bright), var(--color-blood));
    transform: scaleY(0);
    transition: transform var(--transition-fast);
    box-shadow: 0 0 10px var(--color-blood);
}

.btn-option::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(139, 0, 0, 0.15), transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.btn-option:hover {
    border-color: var(--color-blood);
    background: rgba(139, 0, 0, 0.08);
    transform: translateX(4px);
    box-shadow:
        -4px 0 20px rgba(139, 0, 0, 0.2),
        0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-option:hover::before {
    transform: scaleY(1);
}

.btn-option:hover::after {
    opacity: 1;
}

/* Result Page */
.result-page {
    text-align: center;
    padding: 3rem;
}

/* Circle Icon */
.circle-icon-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.circle-icon {
    width: 80px;
    height: 80px;
    color: var(--color-blood);
    filter: drop-shadow(0 0 15px rgba(139, 0, 0, 0.5));
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(139, 0, 0, 0.5));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 25px rgba(139, 0, 0, 0.7));
    }
}

.circle-number {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 700;
    color: var(--color-blood);
    text-shadow:
        0 0 60px rgba(139, 0, 0, 0.8),
        0 0 120px rgba(139, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.5);
    margin: 1rem 0 0.5rem;
    letter-spacing: 0.3em;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        text-shadow:
            0 0 60px rgba(139, 0, 0, 0.8),
            0 0 120px rgba(139, 0, 0, 0.4),
            0 4px 8px rgba(0, 0, 0, 0.5);
    }
    50% {
        text-shadow:
            0 0 80px rgba(196, 30, 58, 0.9),
            0 0 150px rgba(139, 0, 0, 0.6),
            0 4px 8px rgba(0, 0, 0, 0.5);
    }
}

.circle-name {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-parchment);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.circle-subtitle {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    letter-spacing: 0.1em;
}

/* Decorative divider after subtitle */
.circle-subtitle::after {
    content: '';
    display: block;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-blood), var(--color-gold), var(--color-blood), transparent);
    margin: 1.5rem auto 0;
}

.result-content {
    text-align: left;
    margin: 2.5rem 0;
}

.result-section {
    margin-bottom: 2rem;
    padding: 1.2rem 1.5rem;
    border-left: 2px solid var(--color-blood);
    background: linear-gradient(90deg, rgba(139, 0, 0, 0.08), transparent 70%);
    position: relative;
}

.result-section::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-blood-bright), var(--color-blood), var(--color-blood-bright));
}

.section-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-gold-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.8rem;
}

.section-text {
    font-size: 1.1rem;
    color: var(--color-text);
    line-height: 1.9;
}

.result-quote {
    margin: 2.5rem 0;
    padding: 2rem;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-blood);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--color-parchment-dark);
    line-height: 1.8;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.result-quote::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--color-blood);
    opacity: 0.3;
    line-height: 1;
}

.result-quote cite {
    display: block;
    margin-top: 1.2rem;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-style: normal;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 600px) {
    html {
        font-size: 17px;
    }

    #app {
        padding: 0.75rem;
    }

    .page {
        padding: 2rem 1.25rem;
    }

    .page::before,
    .page::after {
        width: 30px;
        height: 30px;
    }

    .title {
        font-size: 1.4rem;
        letter-spacing: 0.02em;
    }

    .subtitle {
        font-size: 1rem;
    }

    .gates-svg {
        width: 130px;
    }

    .circle-icon {
        width: 60px;
        height: 60px;
    }

    .question-number {
        font-size: 1.8rem;
    }

    .circle-number {
        font-size: 2.5rem;
    }

    .circle-name {
        font-size: 1.6rem;
        letter-spacing: 0.08em;
    }

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

    .btn-option {
        padding: 1.2rem 1rem 1.2rem 1.2rem;
        font-size: 1.05rem;
    }

    .ornament {
        width: 160px;
    }

    .divider-svg {
        width: 100px;
    }

    .result-page {
        padding: 1.5rem 1rem;
    }

    .result-quote {
        padding: 1.25rem;
        font-size: 1.05rem;
    }

    .result-quote::before {
        font-size: 2.5rem;
        top: 5px;
        left: 10px;
    }

    .section-text {
        font-size: 1.05rem;
    }

    .intro p:first-child::before,
    .intro p:first-child::after {
        display: none;
    }

    .intro p:first-child {
        font-size: 1.2rem;
    }

    .intro-text {
        font-size: 1rem;
    }
}

/* Subtle animations */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.95; }
    94% { opacity: 1; }
    96% { opacity: 0.97; }
    97% { opacity: 1; }
}

.title {
    animation: flicker 8s infinite;
}

/* Vignette overlay */
#app::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 0;
}
