:root {
    --bg-color: #050b14;
    --app-bg: rgba(255, 255, 255, 0.15);
    --app-border: rgba(255, 255, 255, 0.3);
    
    /* Default Themes (Will be overridden by JS) */
    --theme-color-1: #4f46e5;
    --theme-color-2: #818cf8;
    --theme-accent: #c7d2fe;
    
    --primary-color: var(--theme-color-1);
    --primary-light: var(--theme-color-2);
    
    --text-main: #ffffff;
    --text-muted: #d1d5db;
    --text-light: #ffffff;
    --border-color: rgba(255, 255, 255, 0.3);
    
    --success-color: #10b981;
    --success-bg: #d1fae5;
    --error-color: #ef4444;
    --error-bg: #fee2e2;

    --color-purple: #8b5cf6;
    --color-yellow: #f59e0b;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-y: auto;
    position: relative;
    margin: 0;
}

/* Aurora Background */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.02) 45%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 55%, transparent 60%),
                linear-gradient(135deg, var(--bg-color), #091020);
    background-size: 200% 200%, 100% 100%;
    animation: bgStreaks 20s linear infinite;
    overflow: hidden;
}

.aurora-bg::before, .aurora-bg::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at 50% 50%, var(--theme-color-1), transparent 60%),
                radial-gradient(circle at 80% 20%, var(--theme-color-2), transparent 50%),
                radial-gradient(circle at 20% 80%, var(--theme-accent), transparent 50%);
    filter: blur(120px);
    opacity: 0.4;
    animation: auroraFlow 25s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
    transition: background 1.5s ease;
    mix-blend-mode: color-dodge;
}

.aurora-bg::after {
    background: radial-gradient(circle at 20% 50%, var(--theme-color-2), transparent 60%),
                radial-gradient(circle at 70% 80%, var(--theme-color-1), transparent 50%);
    animation: auroraFlow 30s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate-reverse;
    opacity: 0.3;
    mix-blend-mode: overlay;
}

@keyframes auroraFlow {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(-5%, 5%) scale(1.05) rotate(2deg); }
    100% { transform: translate(5%, -5%) scale(1) rotate(-2deg); }
}

@keyframes bgStreaks {
    0% { background-position: 200% 0, 0 0; }
    100% { background-position: -200% 0, 0 0; }
}

.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 80vh;
    max-height: 95vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.5s ease;
}

/* Header */
.app-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-btn {
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 12px;
    transition: var(--transition);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px;
    border-radius: 10px;
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.quiz-info h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.quiz-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Quiz Main Area */
.quiz-main {
    flex: 1;
    padding: 30px 24px;
    overflow-y: auto;
}

.quiz-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.quiz-screen.active {
    display: flex;
}

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

/* Start Screen */
.quiz-icon {
    font-size: 4rem;
    color: var(--theme-accent);
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#start-screen h2 {
    margin-bottom: 12px;
    font-weight: 700;
}

#start-screen p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Question Screen */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--theme-color-1), var(--theme-color-2));
    transition: width 0.3s ease;
}

.question-count {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--theme-accent);
    margin-bottom: 12px;
}

#question-text {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 30px;
    font-weight: 600;
}

.options-grid {
    width: 100%;
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.option-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 20px;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.option-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.option-card.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #34d399;
}

.option-card.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

.feedback-text {
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 15px;
    border-radius: 12px;
    margin-top: 10px;
    display: none;
}

.feedback-text.correct, .feedback-text.wrong {
    display: block;
}

.feedback-text.correct {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.feedback-text.wrong {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

/* Results Screen */
.results-header {
    margin-bottom: 30px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-color-1), var(--theme-color-2));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 30px rgba(var(--theme-color-1-rgb, 79, 70, 229), 0.4);
}

#final-score {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.score-circle small {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.8;
}

#result-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
}

#result-message {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Social Sharing Styles */
.share-section {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: var(--theme-accent);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.share-btn.twitter { background: #000000; border: 1px solid rgba(255,255,255,0.2); }
.share-btn.whatsapp { background: #25D366; }
.share-btn.link { background: rgba(255, 255, 255, 0.1); color: white; }

.share-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.copy-link-wrapper {
    position: relative;
}

.tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tooltip.show {
    opacity: 1;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.primary-btn {
    background: linear-gradient(135deg, var(--theme-color-1), var(--theme-color-2));
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(var(--theme-color-1-rgb, 79, 70, 229), 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .app-container {
        min-height: 100vh;
        border-radius: 0;
        border: none;
    }
}
