:root {
    /* New Theme: Yellow, Red, White */
    --primary-hue: 45;
    /* Yellow/Gold */
    --primary: #f1c40f;
    /* Vibrant Yellow */
    --primary-dark: #d4ac0d;
    --accent-red: #e74c3c;
    /* Red */
    --bg-dark: #4a0000;
    /* Dark Red Deep Background */
    --bg-grad-1: #920000;
    /* Rich Red */
    --bg-grad-2: #c0392b;
    /* Lighter Red */
    --glass-bg: rgba(0, 0, 0, 0.3);
    /* Darker glass for better contrast on light backgrounds */
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #e0e0e0;
    --success: #2ecc71;
    --error: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    /* Pink, Red, White, Black, Yellow, Blue */
    background: linear-gradient(-45deg, #ff007a, #ff0000, #ffffff, #000000, #ffea00, #0000ff);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    overflow-x: hidden;
    overflow-y: auto;
    /* Enable scrolling if needed */
    position: relative;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Background Animation */
.background-globes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.globe-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -50px;
    left: -50px;
}

.globe-2 {
    width: 400px;
    height: 400px;
    background: #f1c40f;
    /* Gold */
    bottom: -100px;
    right: -100px;
    animation-delay: -2s;
}

.globe-3 {
    width: 200px;
    height: 200px;
    background: #e74c3c;
    /* Red Accent */
    top: 40%;
    left: 40%;
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }
}

/* Main Container */
.app-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 500px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    transition: max-width 0.5s ease;
}

.app-container.wide-mode {
    max-width: 1000px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #b3b3b3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.question-container {
    text-align: center;
    margin-bottom: 2rem;
}

.media-container {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
}

.media-container.hidden {
    display: none;
}

.media-container video,
.media-container img,
#question-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 16px;
    object-fit: contain;
}

.media-container .hidden {
    display: none;
}

#question-text {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* Inputs */
.input-group {
    margin-bottom: 2rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input[type="text"] {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
    background: var(--primary-dark);
}

.secondary-btn {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-top: 1rem;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.text-btn {
    background: transparent;
    color: var(--text-muted);
    margin-top: 1rem;
    width: 100%;
}

.text-btn:hover {
    color: white;
    text-decoration: underline;
}

/* Sections */
section {
    display: none;
    /* Hidden by default */
    width: 100%;
    height: 100%;
    flex-direction: column;
}

section.active-section {
    display: flex;
}

.hidden {
    display: none !important;
}

/* Couples Grid */
.couples-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
}

.couple-card {
    background: rgba(30, 30, 60, 0.4);
    /* Darker glass as in image */
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.couple-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px) scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.couple-img-container {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #00d2ff;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.6), inset 0 0 10px rgba(0, 210, 255, 0.4);
    /* Neon Glow */
}

.couple-card:hover .couple-img-container {
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.9), inset 0 0 15px rgba(0, 210, 255, 0.6);
    transform: scale(1.05);
}

.couple-card:hover .couple-img-container {
    border-color: var(--primary);
}

.couple-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.couple-card h3 {
    margin-bottom: 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.couple-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Quiz UI */
.quiz-header {
    margin-bottom: 2rem;
}

#question-counter {
    display: block;
    text-align: right;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

h3#question-text {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    min-height: 80px;
    /* Prevent jump */
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-btn {
    width: 100%;
    padding: 1rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    transition: all 0.2s;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.option-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
}

/* Result Stats */
.stats-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.stat-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.stat-value.correct {
    color: var(--success);
}

.stat-value.wrong {
    color: var(--error);
}

.stat-value.percentage {
    color: #f1c40f;
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
    margin-bottom: 1rem;
    border-radius: 16px;
}

#result-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-footer {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.8;
}

.site-footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.site-footer a:hover {
    color: #fff;
}

.credit-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Leaderboard Styles */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3);
}

.leaderboard-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: transform 0.2s;
}

.leaderboard-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.1);
}

.rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 50%;
}

.rank-1 {
    background: #ffd700;
    color: #000;
}

.rank-2 {
    background: #c0c0c0;
    color: #000;
}

.rank-3 {
    background: #cd7f32;
    color: #000;
}

.user-info {
    flex: 1;
    margin-left: 1rem;
    text-align: left;
    font-weight: 600;
}

.score {
    font-weight: 800;
    color: var(--success);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-up {
    animation: slideUp 0.8s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .app-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        border: none;
    }

    .glass-panel {
        border-radius: 0;
    }
}