:root {
    /* Light Mode (Default) */
    --primary-color: #e11d48;
    /* Bollywood Red */
    --secondary-color: #f59e0b;
    /* Gold */
    --bg-gradient: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-color: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --option-bg: #ffffff;
    --option-hover: #fff1f2;
}

body.dark-mode {
    /* Dark Mode - Royal Purple Theme */
    --primary-color: #a855f7;
    /* Purple 500 */
    --secondary-color: #fbbf24;
    /* Amber 400 */
    --bg-gradient: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 100%);
    /* Indigo 950 to Violet 800 */
    --glass-bg: rgba(30, 27, 75, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #f3e8ff;
    /* Purple 50 */
    --text-muted: #c084fc;
    /* Purple 400 */
    --card-bg: rgba(17, 24, 39, 0.8);
    --option-bg: rgba(255, 255, 255, 0.05);
    --option-hover: rgba(168, 85, 247, 0.2);
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

.app-container {
    max-width: 800px;
    /* Narrower for quiz focus */
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.glass-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.back-link {
    justify-self: start;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.logo {
    justify-self: center;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.4rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.theme-btn {
    justify-self: end;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

/* Screens */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

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

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

/* Landing Screen */
.hero-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.stats-preview {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--option-bg);
    display: block;
    /* Changed from inline-block */
    width: fit-content;
    margin: 0 auto 2rem auto;
    /* Centers the block */
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), #be123c);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.6);
}

/* Quiz Screen */
.progress-container {
    height: 6px;
    background: var(--glass-border);
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.question-card {
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.question-number {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.question-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 2rem;
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-btn {
    background: var(--option-bg);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 12px;
    text-align: left;
    font-size: 1.1rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-btn:hover {
    background: var(--option-hover);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.option-emoji {
    font-size: 1.5rem;
}

/* Result Screen */
.result-card {
    background: var(--card-bg);
    /* Opaque for screenshot */
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.result-header {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.character-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.character-reveal h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin: 0;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.character-tagline {
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-top: 0.5rem;
    opacity: 0.8;
}

.character-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 2rem 0;
    color: var(--text-color);
}

.global-stat {
    display: inline-block;
    background: var(--option-bg);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.watermark {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.5;
    display: none;
    /* Only show in screenshot */
}

.action-buttons {
    display: grid;
    gap: 1rem;
}

.action-btn {
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn.share {
    background: var(--primary-color);
    color: white;
}

.action-btn.download {
    background: var(--secondary-color);
    color: white;
}

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

.glass-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}