/* ============================================
   GENERAL KNOWLEDGE - SUPERSITE
   Expand Your Mind!
   ============================================ */

/* ============================================
   PREMIUM FILTER TABS
   ============================================ */
.filter-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-tabs {
    display: inline-flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 50px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .filter-tabs {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.25);
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 50px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.filter-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 50px;
    z-index: -1;
}

.filter-tab:hover:not(.active) {
    background: rgba(102, 126, 234, 0.12);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.filter-tab.active {
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transform: scale(1.02);
}

.filter-tab.active::before {
    opacity: 1;
}

.filter-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.tab-icon {
    font-size: 1.1rem;
}

.tab-label {
    white-space: nowrap;
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #667eea;
    transition: all 0.3s ease;
}

/* Card Animation for Filtering */
.activity-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, transform 0.4s ease;
}

.activity-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.activity-card.visible {
    animation: cardFadeIn 0.4s ease forwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

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

/* No Results Message */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.no-results-message .emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* Mobile Responsiveness for Filter Tabs */
@media (max-width: 600px) {
    .filter-tabs {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0.4rem;
    }

    .filter-tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .tab-label {
        display: none;
    }

    .tab-icon {
        font-size: 1.2rem;
    }

    .tab-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
}

/* Floating Background */
.floating-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.float-icon {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-size: 2.5rem;
    opacity: 0.15;
    animation: floatAround 8s ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes floatAround {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, -20px) rotate(10deg);
    }

    50% {
        transform: translate(-10px, 20px) rotate(-5deg);
    }

    75% {
        transform: translate(15px, 10px) rotate(5deg);
    }
}

/* Glass Navigation */
.glass-nav {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px);
}

[data-theme="dark"] .glass-nav {
    background: rgba(15, 15, 26, 0.85) !important;
}

.nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-current {
    font-weight: 600;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.xp-display {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* Main Content */
.gk-main {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    min-height: 100vh;
}

/* Hero Section */
.gk-hero {
    padding: 3rem 2rem;
    text-align: center;
}

.hero-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.gk-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-sub {
    display: block;
    font-size: 0.5em;
    opacity: 0.8;
}

.gk-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* Activities Grid */
.activities-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.activity-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    position: relative;
}

/* NEW Badge for recently added activities - Premium Ultra Design */
.new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 50%, #ec4899 100%);
    background-size: 200% auto;
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 10;
    box-shadow:
        0 4px 15px rgba(139, 92, 246, 0.5),
        0 0 30px rgba(217, 70, 239, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: newBadgeShimmer 3s ease infinite, newBadgePulse 2s ease-in-out infinite;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

/* Shimmer animation for NEW badge */
@keyframes newBadgeShimmer {
    0% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }

    100% {
        background-position: 0% center;
    }
}

@keyframes newBadgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 4px 15px rgba(139, 92, 246, 0.5),
            0 0 30px rgba(217, 70, 239, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow:
            0 6px 20px rgba(139, 92, 246, 0.6),
            0 0 40px rgba(217, 70, 239, 0.4);
    }
}

/* Auto-hide class - added by JS after 48 hours */
.new-badge.badge-hidden {
    display: none !important;
}

/* Hover effect for NEW badge */
.activity-card:hover .new-badge {
    transform: scale(1.08);
    box-shadow:
        0 6px 25px rgba(139, 92, 246, 0.65),
        0 0 50px rgba(217, 70, 239, 0.45);
}

/* HOT badge variant - keeps orange/red styling */
.new-badge.hot-badge {
    background: linear-gradient(135deg, #f97316 0%, #ef4444 50%, #dc2626 100%);
    box-shadow:
        0 4px 15px rgba(239, 68, 68, 0.5),
        0 0 30px rgba(249, 115, 22, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.activity-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-emoji {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.meta-xp {
    color: #667eea;
    font-weight: 600;
}

/* Fact Section */
.fact-section {
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.fact-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
}

.fact-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.fact-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.fact-text {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ============================================
   QUIZ MODAL
   ============================================ */

.quiz-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 3000;
    display: none;
    overflow-y: auto;
}

.quiz-modal.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.quiz-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* close-quiz styles are now defined globally in main.css - cute face button */

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-category {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.quiz-title {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
    width: 0%;
}

.quiz-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.question-card {
    text-align: center;
    margin-bottom: 2rem;
}

.question-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: pre-line;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 500px;
}

.option-btn {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.option-btn:hover:not(:disabled) {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.option-btn.correct {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.option-btn.wrong {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.feedback-box {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
}

.feedback-box.visible {
    display: flex;
    animation: popIn 0.3s ease;
}

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

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.feedback-box.correct {
    background: #dcfce7;
    color: #166534;
}

.feedback-box.wrong {
    background: #fee2e2;
    color: #991b1b;
}

.quiz-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-top: 2rem;
}

.quiz-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-icon {
    font-size: 1.25rem;
}

.quiz-stats .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ============================================
   RESULTS MODAL
   ============================================ */

.results-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.results-modal.active {
    display: flex;
}

.results-box {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
    max-width: 420px;
    width: 90%;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.results-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: trophyBounce 1s ease infinite;
}

@keyframes trophyBounce {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg) translateY(-5px);
    }
}

.results-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.results-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-stat {
    display: flex;
    flex-direction: column;
}

.rs-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.rs-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.results-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.btn-explain {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-explain:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-replay,
.btn-menu {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-replay {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-replay:hover {
    transform: scale(1.05);
}

.btn-menu {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .activities-grid {
        grid-template-columns: 1fr;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 1rem;
    }

    .results-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ============================================
   LEADERBOARD MODAL
   ============================================ */
.leaderboard-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.leaderboard-modal.active {
    display: flex;
}

.leaderboard-container {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

/* close-modal styles are now defined globally in main.css */

.leaderboard-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.leaderboard-list {
    margin-bottom: 1rem;
}

.your-rank-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: var(--radius-lg);
}

.your-rank-label {
    font-weight: 600;
}

.your-rank-position {
    font-size: 1.5rem;
    font-weight: 700;
}

.your-rank-score {
    font-weight: 600;
}

/* ============================================
   LEADERBOARD TABS - Premium Glassmorphism Design
   ============================================ */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-full);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.tab-btn {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.tab-btn:hover:not(.active) {
    background: rgba(102, 126, 234, 0.15);
    color: var(--text-primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: scale(1.02);
}

/* ============================================
   DARK MODE FIXES - GK Section
   ============================================ */

/* Option Buttons */
.option-btn {
    color: var(--text-primary);
}

[data-theme="dark"] .option-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

[data-theme="dark"] .option-btn:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

[data-theme="dark"] .option-btn.correct {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    color: #51cf66;
}

[data-theme="dark"] .option-btn.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ff6b6b;
}

/* Feedback Boxes */
[data-theme="dark"] .feedback-box.correct {
    background: rgba(34, 197, 94, 0.2);
    color: #51cf66;
}

[data-theme="dark"] .feedback-box.wrong {
    background: rgba(239, 68, 68, 0.2);
    color: #ff6b6b;
}

/* Activity Cards */
[data-theme="dark"] .activity-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Stat Items */
[data-theme="dark"] .hero-stats .stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Quiz Stats */
[data-theme="dark"] .quiz-stats {
    background: rgba(255, 255, 255, 0.05);
}

/* Meta Tags */
[data-theme="dark"] .meta-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Buttons */
[data-theme="dark"] .btn-menu {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* close-quiz dark mode styles are now defined globally in main.css */

/* Results */
[data-theme="dark"] .results-box {
    background: var(--bg-primary);
}

[data-theme="dark"] .rs-label,
[data-theme="dark"] .stat-label {
    color: rgba(255, 255, 255, 0.6);
}

/* Leaderboard Items */
.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.leaderboard-item.top-1 {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
}

.leaderboard-item.top-2 {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}

.leaderboard-item.top-3 {
    background: linear-gradient(135deg, #fed7aa, #fdba74);
}

.leaderboard-item.is-player {
    border: 2px solid #fbbf24;
}

.rank-number {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 35px;
}

.player-avatar {
    font-size: 1.5rem;
}

.player-name {
    flex: 1;
    font-weight: 600;
}

.player-score {
    font-weight: 700;
    color: #fbbf24;
}

[data-theme="dark"] .leaderboard-item {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

[data-theme="dark"] .leaderboard-item.top-1,
[data-theme="dark"] .leaderboard-item.top-2,
[data-theme="dark"] .leaderboard-item.top-3 {
    color: #000000;
}

[data-theme="dark"] .leaderboard-tabs .tab-btn {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .leaderboard-tabs .tab-btn.active {
    color: #ffffff;
}

/* close-modal styles are now defined globally in main.css */

/* ============================================
   🌍 WORLD CAPITALS - PREMIUM CARD STYLES
   State-of-the-Art Interactive Design
   ============================================ */

/* World Capitals Card - Special Premium Design */
.world-capitals-card {
    position: relative;
    overflow: visible !important;
}

.world-capitals-header {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460) !important;
    position: relative;
    overflow: hidden;
}

.world-capitals-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 107, 107, 0.2), transparent 40%),
        radial-gradient(circle at 80% 50%, rgba(78, 205, 196, 0.2), transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(165, 94, 234, 0.15), transparent 40%);
    animation: nebula 8s ease-in-out infinite;
}

@keyframes nebula {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.globe-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.globe-emoji {
    font-size: 4rem !important;
    position: relative;
    z-index: 2;
    animation: globePulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(78, 205, 196, 0.5)) !important;
}

@keyframes globePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.orbit-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: orbitRingSpin 20s linear infinite;
}

@keyframes orbitRingSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.orbit-icon {
    position: absolute;
    font-size: 1.2rem;
    animation: orbit 6s linear infinite;
    animation-delay: var(--delay);
}

@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(60px) rotate(0deg);
    }

    to {
        transform: rotate(360deg) translateX(60px) rotate(-360deg);
    }
}

.hot-badge {
    background: linear-gradient(135deg, #ff416c, #ff4b2b) !important;
    animation: hotBadgePulse 1.5s ease-in-out infinite !important;
}

@keyframes hotBadgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 15px rgba(255, 65, 108, 0.5);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 4px 20px rgba(255, 65, 108, 0.7);
    }
}

.continent-tag {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
}

.continent-preview {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.preview-item {
    font-size: 1.2rem;
    opacity: 0.8;
    transition: all 0.3s ease;
    cursor: pointer;
}

.preview-item:hover {
    transform: scale(1.2);
    opacity: 1;
}

/* ============================================
   🌍 CONTINENT SELECTOR MODAL
   Premium Glassmorphism Design
   ============================================ */

.continent-selector-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: radial-gradient(ellipse at center, rgba(20, 20, 50, 0.97) 0%, rgba(5, 5, 20, 0.99) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.continent-selector-modal.active {
    display: flex;
    animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.continent-selector-container {
    background: linear-gradient(165deg, rgba(35, 35, 65, 0.95) 0%, rgba(20, 20, 45, 0.98) 50%, rgba(15, 15, 35, 0.99) 100%);
    border: 2px solid rgba(139, 92, 246, 0.35);
    border-radius: 32px;
    padding: 2.5rem;
    max-width: 960px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.6),
        0 0 120px rgba(139, 92, 246, 0.15),
        0 0 200px rgba(78, 205, 196, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    animation: containerSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Ambient glow effect behind container */
.continent-selector-container::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    right: -100px;
    bottom: -100px;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
    filter: blur(40px);
}

@keyframes containerSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

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

.continent-selector-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.globe-animation {
    margin-bottom: 1.25rem;
    position: relative;
}

.globe-animation::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: globeAura 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes globeAura {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

.rotating-globe {
    font-size: 5rem;
    display: inline-block;
    animation: rotateGlobe 10s linear infinite, globeFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 40px rgba(78, 205, 196, 0.6)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

@keyframes globeFloat {

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

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

@keyframes rotateGlobe {
    0% {
        content: '🌍';
    }

    33% {
        content: '🌎';
    }

    66% {
        content: '🌏';
    }

    100% {
        content: '🌍';
    }
}

.continent-selector-title {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 30%, #667eea 60%, #a855f7 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    animation: titleShimmer 4s ease-in-out infinite;
    text-shadow: 0 0 60px rgba(78, 205, 196, 0.3);
}

@keyframes titleShimmer {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.continent-selector-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
}

.total-countries-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #a855f7 100%);
    border-radius: 50px;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow:
        0 6px 25px rgba(102, 126, 234, 0.5),
        0 0 40px rgba(168, 85, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {

    0%,
    100% {
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5), 0 0 40px rgba(168, 85, 247, 0.3);
    }

    50% {
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6), 0 0 60px rgba(168, 85, 247, 0.4);
    }
}

.badge-icon {
    font-size: 1.3rem;
    animation: iconPulse 1.5s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Continents Grid */
.continents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.continent-card {
    background: var(--card-color);
    border-radius: 18px;
    padding: 1.25rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Animated gradient border glow */
.continent-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.3),
            rgba(255, 255, 255, 0.1),
            transparent,
            rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.3),
            rgba(255, 255, 255, 0.1));
    background-size: 400% 400%;
    border-radius: 26px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: borderGlow 4s ease infinite;
}

@keyframes borderGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Premium inner glow overlay */
.continent-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at top left, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.continent-card:hover {
    transform: translateY(-8px) scale(1.02) rotateX(3deg);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.35),
        0 10px 25px rgba(0, 0, 0, 0.25),
        0 0 40px rgba(255, 255, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 60px var(--glow-color, rgba(255, 255, 255, 0.15));
}

.continent-card:hover::before {
    opacity: 1;
}

.continent-card:hover::after {
    opacity: 1;
}

/* Active/pressed state */
.continent-card:active {
    transform: translateY(-8px) scale(1.01);
    transition: all 0.15s ease;
}

.continent-icon {
    font-size: 2.5rem;
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.continent-card:hover .continent-icon {
    transform: scale(1.1) translateY(-3px);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.continent-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.2rem;
    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.45),
        0 3px 10px rgba(0, 0, 0, 0.25);
    letter-spacing: -0.01em;
    position: relative;
    z-index: 2;
}

.continent-name-hi {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.continent-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    position: relative;
    z-index: 2;
}

.continent-stats .stat {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.01em;
}

.continent-stats .xp-badge {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.continent-card:hover .xp-badge {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.12));
    transform: scale(1.03);
    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.2),
        0 0 15px rgba(255, 255, 255, 0.12);
}

.continent-flags {
    font-size: 1.1rem;
    letter-spacing: 2px;
    opacity: 0.95;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
    position: relative;
    z-index: 2;
    transition: all 0.35s ease;
}

.continent-card:hover .continent-flags {
    transform: scale(1.05);
    letter-spacing: 4px;
}

.continent-selector-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tip-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .continent-selector-container {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .continent-selector-title {
        font-size: 1.5rem;
    }

    .continents-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .continent-card {
        padding: 1.25rem;
    }

    .continent-icon {
        font-size: 2.5rem;
    }

    .continent-name {
        font-size: 1.1rem;
    }

    .rotating-globe {
        font-size: 3rem;
    }
}

/* Light Theme Adjustments */
[data-theme="light"] .continent-selector-modal {
    background: rgba(240, 240, 255, 0.98);
}

[data-theme="light"] .continent-selector-container {
    background: linear-gradient(145deg, #ffffff, #f5f5ff);
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 100px rgba(102, 126, 234, 0.1);
}

[data-theme="light"] .continent-selector-subtitle {
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .tip-text {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .continent-selector-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
}