/* Modern CSS Reset and Base Styles */
:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary-gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --accent-color: #f0f9ff;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --background-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(148, 163, 184, 0.1);
    --success-color: #22c55e;
    --error-color: #ef4444;
    --glow-color: rgba(99, 102, 241, 0.5);
    --focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.4);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 20%);
    overflow-y: scroll;
    scrollbar-width: none; /* Firefox */
    overflow-x: hidden;
}

body::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Landing Page Styles */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    overflow: hidden;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 20%);
    animation: particleFloat 20s ease-in-out infinite;
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icons i {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
}

.floating-icons i:nth-child(1) { top: 20%; left: 10%; }
.floating-icons i:nth-child(2) { top: 60%; left: 20%; }
.floating-icons i:nth-child(3) { top: 30%; left: 80%; }
.floating-icons i:nth-child(4) { top: 70%; left: 70%; }
.floating-icons i:nth-child(5) { top: 40%; left: 50%; }

.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 4rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.glowing-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    animation: glow 2s ease-in-out infinite;
}

.hero-tagline {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-decoration .line {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--text-secondary), transparent);
}

.hero-decoration i {
    color: #fbbf24;
    font-size: 2rem;
    animation: trophyGlow 2s ease-in-out infinite;
}

/* Action Cards */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 4rem;
}

.action-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.card-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.card-icon i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.action-card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.action-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Landing Footer */
.landing-footer {
    margin-top: auto;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(20px, 20px);
    }
}

@keyframes trophyGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.8));
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .glowing-title {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .action-cards {
        grid-template-columns: 1fr;
    }

    .hero-decoration .line {
        width: 50px;
    }

    .floating-icons i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .glowing-title {
        font-size: 2rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .action-card {
        padding: 1.5rem;
    }

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

    .action-card h2 {
        font-size: 1.5rem;
    }
}

/* Quiz Container and Screens */
.quiz-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 2rem;
    font-size: 1.1rem;
}

.screen.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Welcome Screen Enhancements */
.welcome-screen {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    padding: 0;
}

.welcome-content {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(14px);
    border-radius: 2rem;
    box-shadow: 0 8px 40px 0 rgba(99,102,241,0.10), 0 0 0 1.5px rgba(99,102,241,0.08);
    padding: 3.5rem 2.5rem 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto;
    animation: modalSlideUp 0.5s cubic-bezier(.4,0,.2,1);
}

.welcome-content h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 24px #6366f1cc, 0 2px 8px #0002;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.welcome-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.2rem;
    font-weight: 400;
    line-height: 1.5;
}

.start-quiz-btn {
    width: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff;
    border: none;
    padding: 1.1rem 0;
    border-radius: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    box-shadow: 0 4px 24px 0 rgba(99,102,241,0.18);
    transition: all 0.18s cubic-bezier(.4,0,.2,1);
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}

.start-quiz-btn i, .start-quiz-btn .rocket-icon {
    font-size: 1.3em;
    margin-left: 0.3em;
    display: inline-block;
    vertical-align: middle;
}

.start-quiz-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 32px 0 rgba(99,102,241,0.28);
}

@media (max-width: 600px) {
    .welcome-content {
        padding: 2rem 0.7rem 2rem 0.7rem;
        max-width: 98vw;
    }
    .welcome-content h1 {
        font-size: 1.5rem;
    }
    .start-quiz-btn {
        font-size: 1rem;
        padding: 0.9rem 0;
    }
}

/* Question Grid */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.grid-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-display {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

.question-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Question Cards */
.question-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    font-size: 1.1rem;
    box-sizing: border-box;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.question-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.question-card:hover::before {
    opacity: 0.1;
}

.question-card.completed {
    border-color: var(--success-color);
}

.question-card-content {
    position: relative;
    z-index: 1;
}

.question-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.question-type i {
    font-size: 1.2rem;
}

.question-preview {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.start-question-btn {
    background: var(--primary-gradient);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.start-question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--glow-color);
}

/* Question Screen */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--card-border);
}

.question-header .score-display {
    background: linear-gradient(90deg, #6366f1 0%, #a78bfa 100%);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 1rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 170px;
    justify-content: flex-start;
    border: none;
    position: relative;
    overflow: hidden;
}

.cryptcoin-emoji {
    font-size: 2rem;
    margin-right: 0.5rem;
    animation: coin-bounce 1.5s infinite;
    filter: drop-shadow(0 0 8px #fbbf24cc);
    display: inline-block;
}

@keyframes coin-bounce {
    0%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
    20% { transform: translateY(-8px) scale(1.1); filter: brightness(1.2); }
    40% { transform: translateY(0) scale(1); filter: brightness(1); }
    60% { filter: brightness(1.3); }
}

.cryptcoins-label {
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    color: #d1c4e9;
    text-shadow: 0 0 8px #8b5cf6cc;
    margin-right: 0.3rem;
}

.cryptcoins-value {
    font-size: 2.1rem;
    font-weight: 900;
    color: #fffbe7;
    text-shadow: 0 0 12px #fbbf24, 0 0 4px #fff;
    transition: transform 0.3s cubic-bezier(.4,2,.6,1), opacity 0.3s;
    will-change: transform, opacity;
    display: inline-block;
}

.cryptcoins-value.animated {
    transform: scale(1.25);
    opacity: 0.7;
}

@media (max-width: 600px) {
    .question-header .score-display {
        padding: 0.5rem 0.7rem;
        font-size: 1rem;
        min-width: 120px;
    }
    .cryptcoin-emoji { font-size: 1.3rem; }
    .cryptcoins-value { font-size: 1.3rem; }
}

.question-header .score-display span:first-child {
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.question-header .score-display span:last-child {
    color: var(--text-primary);
}

.back-button {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: var(--card-bg);
    border-color: var(--text-secondary);
}

.question-type-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.7rem 1.2rem;
    border-radius: 1.2rem;
    font-weight: 500;
    font-size: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 120px;
    min-height: 70px;
    justify-content: center;
}

.difficulty-badge {
    align-self: center;
    margin-bottom: 0.2rem;
}

.mcq-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 0.1rem;
}

.mcq-label i {
    font-size: 1.2rem;
    color: #fff;
    filter: drop-shadow(0 0 4px #6366f1cc);
}

.question-header .score-display, .grid-header .score-display {
    background: linear-gradient(90deg, #6366f1 0%, #a78bfa 100%);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 1.2rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 4px 24px 0 #8b5cf655, 0 0 0 2px #a78bfa33;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
    justify-content: flex-start;
    border: none;
    position: relative;
    overflow: visible;
}

.cryptcoin-emoji {
    font-size: 2.2rem;
    margin-right: 0.7rem;
    animation: coin-bounce 1.5s infinite;
    filter: drop-shadow(0 0 10px #fbbf24cc);
    display: inline-block;
    transition: transform 0.2s;
}

@keyframes coin-bounce {
    0%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
    20% { transform: translateY(-8px) scale(1.1); filter: brightness(1.2); }
    40% { transform: translateY(0) scale(1); filter: brightness(1); }
    60% { filter: brightness(1.3); }
}

.cryptcoins-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.cryptcoins-label {
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    color: #e0e7ff;
    text-shadow: 0 0 8px #8b5cf6cc;
    margin-bottom: 0.1rem;
}

.cryptcoins-value {
    font-size: 2.1rem;
    font-weight: 900;
    color: #fffbe7;
    text-shadow: 0 0 12px #fbbf24, 0 0 4px #fff;
    transition: transform 0.3s cubic-bezier(.4,2,.6,1), opacity 0.3s;
    will-change: transform, opacity;
    display: inline-block;
}

.cryptcoins-value.animated {
    transform: scale(1.25);
    opacity: 0.7;
}

@media (max-width: 600px) {
    .question-header .score-display, .grid-header .score-display {
        padding: 0.6rem 0.7rem;
        font-size: 1rem;
        min-width: 120px;
    }
    .cryptcoin-emoji { font-size: 1.3rem; }
    .cryptcoins-value { font-size: 1.3rem; }
    .question-type-indicator {
        padding: 0.5rem 0.5rem;
        min-width: 90px;
        min-height: 50px;
    }
}

.question-type-indicator .difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.question-type-indicator .difficulty-badge.easy {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.question-type-indicator .difficulty-badge.medium {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.question-type-indicator .difficulty-badge.hard {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.question-type-indicator .difficulty-badge i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .question-type-indicator {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .question-type-indicator .difficulty-badge {
        padding: 0.2rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .question-type-indicator {
        padding: 0.35rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .question-type-indicator .difficulty-badge {
        padding: 0.15rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Difficulty Colors */
.difficulty-easy {
    color: #22c55e; /* Green */
}

.difficulty-medium {
    color: #eab308; /* Yellow */
}

.difficulty-hard {
    color: #ef4444; /* Red */
}

/* Question Card Preview Styles */
.question-preview {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.question-preview span {
    font-weight: 500;
}

/* Difficulty Badge Styles */
.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.difficulty-badge.easy {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.difficulty-badge.medium {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.difficulty-badge.hard {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.question-content {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    width: 100%; /* Ensure it takes full width */
    max-width: 600px; /* Match max-width of question cards if desired */
    margin: 0 auto 2rem auto; /* Center the question content */
}

.question-meta-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Take full width of parent (.question-content) */
    gap: 1.5rem; /* Adjusted gap */
    margin-bottom: 1.5rem;
    padding: 0; /* Remove padding, let children handle their own */
    box-sizing: border-box;
}

.question-type-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.7rem 1.2rem;
    border-radius: 1.2rem;
    font-weight: 500;
    font-size: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 120px;
    min-height: 70px;
    justify-content: center;
}

.score-display {
    background: linear-gradient(90deg, #7B61FF 0%, #A587FF 100%);
    color: #fff;
    padding: 0.8rem 1.5rem; /* Adjusted padding */
    border-radius: 1.2rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 2px 12px 0 #a587ff44; /* Reduced shadow */
    display: flex;
    align-items: center;
    gap: 0.8rem; /* Adjusted gap */
    min-width: 180px;
    justify-content: flex-start;
    border: none;
    position: relative;
    overflow: visible;
    /* margin-left: auto; remove this if centering parent */
}

.cryptcoin-emoji {
    font-size: 2rem; /* Adjusted size */
    margin-right: 0.6rem; /* Adjusted margin */
    animation: coin-bounce 1.5s infinite;
    filter: drop-shadow(0 0 4px #fbbf2488); /* Reduced glow */
    display: inline-block;
    transition: transform 0.2s;
}

@keyframes coin-bounce {
    0%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
    20% { transform: translateY(-6px) scale(1.08); filter: brightness(1.15); } /* Adjusted bounce */
    40% { transform: translateY(0) scale(1); filter: brightness(1); }
    60% { filter: brightness(1.2); }
}

.cryptcoins-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.cryptcoins-label {
    font-size: 1rem; /* Adjusted size */
    letter-spacing: 0.02em; /* Adjusted spacing */
    color: #e0e7ff; /* Lighter color */
    text-shadow: 0 0 3px #8b5cf666; /* Reduced shadow */
    margin-bottom: 0.1rem;
}

.cryptcoins-value {
    font-size: 2rem; /* Adjusted size */
    font-weight: 900;
    color: #fffbe7;
    text-shadow: 0 0 6px #fbbf24, 0 0 1px #fff; /* Reduced glow */
    transition: transform 0.3s cubic-bezier(.4,2,.6,1), opacity 0.3s;
    will-change: transform, opacity;
    display: inline-block;
}

.cryptcoins-value.animated {
    transform: scale(1.2); /* Adjusted scale */
    opacity: 0.8;
}

@media (max-width: 600px) {
    .question-content {
        padding: 1.5rem;
    }
    .question-meta-row {
        flex-direction: column; /* Stack vertically on small screens */
        gap: 1rem;
        align-items: stretch;
        padding: 0;
    }
    .score-display {
        padding: 0.6rem 0.7rem;
        font-size: 1rem;
        min-width: 100%; /* Take full width on small screens */
        margin-left: 0;
        justify-content: center; /* Center content in score display on small screens */
    }
    .cryptcoin-emoji { font-size: 1.2rem; }
    .cryptcoins-value { font-size: 1.2rem; }
    .question-type-indicator {
        padding: 0.6rem 1rem;
        min-width: 100%; /* Take full width on small screens */
        min-height: auto;
        align-items: center; /* Center content in difficulty badge on small screens */
    }
}

.question-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center; /* Center question text */
    width: 100%;
}

.options-grid {
    display: grid;
    gap: 1rem;
    width: 100%; /* Take full width */
    max-width: 500px; /* Optional: limit max width of options */
    margin: 0 auto; /* Center the options grid */
}

.option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    margin-bottom: 0;
    word-break: break-word;
    box-sizing: border-box;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.option:hover:not(.selected):not(.correct):not(.incorrect) {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.option.selected {
    background: var(--primary-gradient);
    border-color: transparent;
    color: var(--text-primary);
    transform: translateX(5px);
}

.option.correct {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: transparent;
    color: var(--text-primary);
}

.option.incorrect {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: transparent;
    color: var(--text-primary);
}

.option::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Buttons */
.glow-button {
    background: var(--primary-gradient);
    color: var(--text-primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow-color);
}

.action-button {
    background: var(--secondary-gradient);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 160px;
    white-space: nowrap;
    font-size: 1rem;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--glow-color);
}

@media (max-width: 480px) {
    .action-button {
        padding: 0.75rem 1.25rem;
        min-width: 140px;
        font-size: 0.95rem;
    }
}

/* Submit Score Modal Container */
.submission-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    padding: 1rem;
}

.submission-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: modalSlideUp 0.4s ease-out;
    transform-origin: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.submission-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.2),
        rgba(139, 92, 246, 0.2)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.submission-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    letter-spacing: 0.5px;
}

.team-form {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    align-items: stretch;
    width: 100%;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

.form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 0;
}

.form-group input::placeholder {
    color: rgba(148, 163, 184, 0.5);
    font-style: italic;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.submit-score-btn {
    width: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff;
    border: none;
    padding: 1.1rem 0;
    border-radius: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    box-shadow: 0 4px 24px 0 rgba(99,102,241,0.18);
    transition: all 0.18s cubic-bezier(.4,0,.2,1);
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}

.submit-score-btn i, .submit-score-btn .trophy-icon {
    font-size: 1.3em;
    margin-left: 0.3em;
    display: inline-block;
    vertical-align: middle;
}

.submit-score-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 32px 0 rgba(99,102,241,0.28);
}

/* Modal Animation */
@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .submission-screen {
        padding: 1rem;
    }

    .submission-content {
        padding: 1.5rem 0.5rem;
    }

    .submission-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .form-group input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .submit-score-btn {
        font-size: 1rem;
        padding: 0.9rem 0;
    }
}

/* Remove any unwanted score display */
.final-score {
    display: none;
}

/* Status Screen */
.status-content {
    text-align: center;
    max-width: 500px;
    margin: auto;
    padding: 2rem;
    font-size: 1.1rem;
}

.status-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.view-leaderboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-gradient);
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.view-leaderboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--glow-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--glow-color);
    }
    50% {
        box-shadow: 0 0 20px var(--glow-color);
    }
    100% {
        box-shadow: 0 0 5px var(--glow-color);
    }
}

/* Loading and Error States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-message {
    color: var(--error-color);
    text-align: center;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Footer styles */
footer {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 14px;
}

/* Leaderboard Styles */
.leaderboard-container {
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    overflow: visible;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Header Styles with Glassmorphism */
.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 800px;
}

.leaderboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    z-index: -1;
}

.glowing-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    animation: glow 2s ease-in-out infinite;
}

.leaderboard-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    opacity: 0.9;
}

.header-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    position: relative;
}

.header-decoration .line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(99, 102, 241, 0.5),
        rgba(139, 92, 246, 0.5),
        transparent
    );
}

.header-decoration i {
    color: #fbbf24;
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.5));
    animation: trophyFloat 3s ease-in-out infinite;
}

/* Leaderboard Section with Glassmorphism */
.leaderboard-section {
    width: 100%;
    max-width: 1200px;
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.leaderboard-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    z-index: -1;
}

/* Table Container with Hidden Scroll */
.leaderboard-table-container {
    overflow: visible;
    margin-bottom: 2rem;
    position: relative;
    width: 100%;
    overflow-x: auto;
    max-width: 100vw;
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

/* Table Headers */
.leaderboard-table th {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    text-align: left;
    position: relative;
    white-space: nowrap;
}

.leaderboard-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(99, 102, 241, 0.3),
        rgba(139, 92, 246, 0.3),
        transparent
    );
}

/* Table Rows with Hover Effects */
.leaderboard-table tr {
    transition: all 0.3s ease;
    position: relative;
}

.leaderboard-table td {
    padding: 1.2rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.leaderboard-table tr:hover {
    transform: translateX(5px);
}

.leaderboard-table tr:hover td {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

/* Top 3 Ranks with Enhanced Styling */
.leaderboard-table tr:nth-child(1) td {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-left: 4px solid #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.1);
}

.leaderboard-table tr:nth-child(2) td {
    background: linear-gradient(135deg, rgba(203, 213, 225, 0.15) 0%, rgba(203, 213, 225, 0.05) 100%);
    border-left: 4px solid #cbd5e1;
    box-shadow: 0 0 20px rgba(203, 213, 225, 0.1);
}

.leaderboard-table tr:nth-child(3) td {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.15) 0%, rgba(180, 83, 9, 0.05) 100%);
    border-left: 4px solid #b45309;
    box-shadow: 0 0 20px rgba(180, 83, 9, 0.1);
}

/* Rank Cell Styles */
.rank-cell {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 80px;
    padding-right: 1.5rem;
}

.rank-number {
    display: inline-block;
    min-width: 2ch;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--glow-color);
}

/* Mobile Cards with Enhanced Styling */
.leaderboard-cards {
    display: none;
    gap: 1rem;
    padding: 0.5rem;
    width: 100%;
    overflow: visible;
    max-width: 100vw;
    overflow-x: hidden;
}

.leaderboard-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.leaderboard-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

/* Refresh Button with Enhanced Styling */
.refresh-button {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: var(--text-primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem auto;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.refresh-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Animations */
@keyframes trophyFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    }
    50% {
        text-shadow: 0 0 30px rgba(99, 102, 241, 0.8);
    }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .leaderboard-container {
        padding: 1rem;
        min-height: 100vh;
        height: auto;
    }

    .leaderboard-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .glowing-title {
        font-size: 2rem;
    }

    .leaderboard-subtitle {
        font-size: 1rem;
    }

    .header-decoration .line {
        width: 60px;
    }

    .leaderboard-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .leaderboard-table-container {
        display: none;
    }

    .leaderboard-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .leaderboard-card {
        width: 100%;
    }

    .refresh-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .leaderboard-container {
        padding: 0.75rem;
    }

    .leaderboard-section {
        padding: 0.75rem;
    }

    .leaderboard-cards {
        gap: 0.75rem;
    }

    .glowing-title {
        font-size: 1.75rem;
    }

    .header-decoration i {
        font-size: 1.5rem;
    }

    .leaderboard-card {
        padding: 1rem;
    }
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 0.75rem;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.empty-state-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.empty-state-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    opacity: 0.7;
} 

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    z-index: -1;
}

.modal-content::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: 'Orbitron', sans-serif;
}

.modal-content .form-group {
    margin-bottom: 1.5rem;
}

.modal-content input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.modal-content input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
    outline: none;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 1.2em;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 0.5rem;
    display: none;
}

.error-message:not(:empty) {
    display: block;
    animation: shake 0.5s ease-in-out;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        padding: 2rem;
    }

    .warning-content,
    .message-content {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
    }

    .form-group input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .warning-content,
    .message-content {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Tab Switch Warning */
.tab-switch-warning {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.warning-content {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(8px);
}

.warning-content i {
    font-size: 1.25rem;
}

/* Fullscreen Message */
.fullscreen-message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.message-content {
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    backdrop-filter: blur(8px);
}

.message-content i {
    font-size: 1.25rem;
}

/* Enhanced Option Animations */
.option {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.option:hover:not(.selected):not(.correct):not(.incorrect) {
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.option.selected {
    animation: selectPulse 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.option.correct {
    animation: correctPulse 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.option.incorrect {
    animation: incorrectShake 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Timeout Warning */
.timeout-warning {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.timeout-warning .warning-content {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(8px);
}

.timeout-warning .warning-content i {
    font-size: 1.25rem;
    animation: pulse 1s ease-in-out infinite;
}

/* Enhanced Button Animations */
.glow-button, .action-button, .start-quiz-btn, .submit-score-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glow-button::after, .action-button::after, .start-quiz-btn::after, .submit-score-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-button:hover::after, .action-button:hover::after, .start-quiz-btn:hover::after, .submit-score-btn:hover::after {
    opacity: 1;
}

/* Loading Spinner Animation */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes selectPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Enhanced Card Animations */
.question-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.question-card.completed {
    animation: completedPulse 1s ease-in-out;
}

@keyframes completedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Screen Transitions */
.screen {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.active {
    animation: screenFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Responsive font sizes and paddings for quiz screens */
.screen, .submission-content, .status-content {
    padding: 2rem;
    font-size: 1.1rem;
}
@media (max-width: 768px) {
    .screen, .submission-content, .status-content {
        padding: 1rem;
        font-size: 1rem;
    }
}
@media (max-width: 480px) {
    .screen, .submission-content, .status-content {
        padding: 0.5rem;
        font-size: 0.95rem;
    }
}

/* Responsive question card styles */
.question-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    font-size: 1.1rem;
    box-sizing: border-box;
    overflow-x: hidden;
}
@media (max-width: 768px) {
    .question-card {
        padding: 1rem;
        font-size: 1rem;
        max-width: 98vw;
    }
}
@media (max-width: 480px) {
    .question-card {
        padding: 0.5rem;
        font-size: 0.95rem;
        max-width: 100vw;
    }
}

/* Responsive options */
.option {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    word-break: break-word;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
}
@media (max-width: 768px) {
    .option {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}
@media (max-width: 480px) {
    .option {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
}

/* Responsive buttons */
button, .submit-button, .view-leaderboard-btn, .refresh-button, .back-home-button {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 400px;
    margin: 0.5rem auto;
    display: block;
    box-sizing: border-box;
    word-break: break-word;
}
@media (max-width: 768px) {
    button, .submit-button, .view-leaderboard-btn, .refresh-button, .back-home-button {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
}
@media (max-width: 480px) {
    button, .submit-button, .view-leaderboard-btn, .refresh-button, .back-home-button {
        font-size: 0.95rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Prevent horizontal scroll on leaderboard cards */
.leaderboard-cards, .leaderboard-card {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Ensure table does not overflow on desktop */
.leaderboard-table-container {
    overflow-x: auto;
    width: 100%;
    max-width: 100vw;
}

/* Hide scrollbars on mobile for cards */
@media (max-width: 768px) {
    .leaderboard-table-container {
        display: none;
    }
    .leaderboard-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }
}

/* Adaptive font sizes for headings */
h1, h2, h3, .glowing-title {
    font-size: 2.2rem;
}
@media (max-width: 768px) {
    h1, h2, h3, .glowing-title {
        font-size: 1.5rem;
    }
}
@media (max-width: 480px) {
    h1, h2, h3, .glowing-title {
        font-size: 1.2rem;
    }
}

/* Leaderboard Card Glows for Top 3 */
.leaderboard-card.rank-1 {
    box-shadow: 0 0 24px 4px #fbbf24, 0 2px 8px #0002;
    border: 2px solid #fbbf24;
    background: linear-gradient(135deg, rgba(251,191,36,0.10) 0%, rgba(251,191,36,0.03) 100%);
}
.leaderboard-card.rank-2 {
    box-shadow: 0 0 18px 3px #cbd5e1, 0 2px 8px #0002;
    border: 2px solid #cbd5e1;
    background: linear-gradient(135deg, rgba(203,213,225,0.10) 0%, rgba(203,213,225,0.03) 100%);
}
.leaderboard-card.rank-3 {
    box-shadow: 0 0 14px 2px #b45309, 0 2px 8px #0002;
    border: 2px solid #b45309;
    background: linear-gradient(135deg, rgba(180,83,9,0.10) 0%, rgba(180,83,9,0.03) 100%);
}

/* Hover and Active Effects */
.leaderboard-card {
    transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
}
.leaderboard-card:hover, .leaderboard-card:active {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 8px 32px 0 rgba(99,102,241,0.18), 0 0 24px 4px var(--glow-color);
    z-index: 2;
}

/* Highlight Animation for Rank Change */
@keyframes leaderboardHighlight {
    0% { background: #fbbf24; color: #fff; }
    60% { background: #fbbf24; color: #fff; }
    100% { background: inherit; color: inherit; }
}
.leaderboard-card.rank-changed {
    animation: leaderboardHighlight 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* Mobile fade/scale for reordering */
@keyframes leaderboardFadeScale {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}
.leaderboard-card.reordered {
    animation: leaderboardFadeScale 0.7s cubic-bezier(0.4,0,0.2,1);
}

/* --- POLISHED & UNIFIED CSS FOR QUIZ APP --- */

:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary-gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --accent-color: #f0f9ff;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --background-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(148, 163, 184, 0.1);
    --success-color: #22c55e;
    --error-color: #ef4444;
    --glow-color: rgba(99, 102, 241, 0.5);
    --focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.4);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 20%);
    overflow-y: scroll;
    overflow-x: hidden;
}

body::-webkit-scrollbar { display: none; }

/* --- CONTAINER & LAYOUT --- */
.container, .quiz-container, .leaderboard-container, .screen, .submission-content, .status-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .container, .quiz-container, .leaderboard-container, .screen, .submission-content, .status-content {
        padding: 1rem;
    }
}
@media (max-width: 480px) {
    .container, .quiz-container, .leaderboard-container, .screen, .submission-content, .status-content {
        padding: 0.5rem;
    }
}

/* --- CARD STYLES --- */
.card, .question-card, .leaderboard-card, .empty-state-card, .modal-content, .welcome-content, .submission-content {
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08), 0 0 0 1.5px rgba(99,102,241,0.08);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.35s cubic-bezier(0.4,0,0.2,1), background 0.35s cubic-bezier(0.4,0,0.2,1), transform 0.35s cubic-bezier(0.4,0,0.2,1);
    box-sizing: border-box;
    overflow-x: hidden;
}
.card:last-child, .question-card:last-child, .leaderboard-card:last-child, .empty-state-card:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .card, .question-card, .leaderboard-card, .empty-state-card, .modal-content, .welcome-content, .submission-content {
        padding: 1rem;
    }
}
@media (max-width: 480px) {
    .card, .question-card, .leaderboard-card, .empty-state-card, .modal-content, .welcome-content, .submission-content {
        padding: 0.5rem;
    }
}

/* --- BUTTONS --- */
button, .submit-button, .view-leaderboard-btn, .refresh-button, .back-home-button, .start-quiz-btn, .action-button, .glow-button {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    background: var(--primary-gradient);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.18);
    margin: 0.5rem auto;
    display: block;
    width: 100%;
    max-width: 400px;
    transition: box-shadow 0.35s cubic-bezier(0.4,0,0.2,1), transform 0.35s cubic-bezier(0.4,0,0.2,1), background 0.35s cubic-bezier(0.4,0,0.2,1);
    outline: none;
    cursor: pointer;
    position: relative;
    word-break: break-word;
}
button:focus, .submit-button:focus, .view-leaderboard-btn:focus, .refresh-button:focus, .back-home-button:focus, .start-quiz-btn:focus, .action-button:focus, .glow-button:focus {
    box-shadow: 0 0 0 3px #fff, var(--focus-ring);
    outline: none;
    z-index: 2;
}
button:hover, .submit-button:hover, .view-leaderboard-btn:hover, .refresh-button:hover, .back-home-button:hover, .start-quiz-btn:hover, .action-button:hover, .glow-button:hover {
    filter: brightness(1.08);
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 8px 32px 0 rgba(99,102,241,0.18), 0 0 24px 4px var(--glow-color);
}
button:active, .submit-button:active, .view-leaderboard-btn:active, .refresh-button:active, .back-home-button:active, .start-quiz-btn:active, .action-button:active, .glow-button:active {
    filter: brightness(0.98);
    transform: scale(0.98);
}

@media (max-width: 768px) {
    button, .submit-button, .view-leaderboard-btn, .refresh-button, .back-home-button, .start-quiz-btn, .action-button, .glow-button {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
}
@media (max-width: 480px) {
    button, .submit-button, .view-leaderboard-btn, .refresh-button, .back-home-button, .start-quiz-btn, .action-button, .glow-button {
        font-size: 0.95rem;
        padding: 0.5rem 0.75rem;
    }
}

/* --- FOCUS RINGS FOR ACCESSIBILITY --- */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px #fff, var(--focus-ring);
    border-color: #6366f1;
    z-index: 2;
}

/* --- TEXT & HEADINGS --- */
h1, h2, h3, .glowing-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    animation: glow 2s ease-in-out infinite;
    font-size: 2.2rem;
}
@media (max-width: 768px) {
    h1, h2, h3, .glowing-title { font-size: 1.5rem; }
}
@media (max-width: 480px) {
    h1, h2, h3, .glowing-title { font-size: 1.2rem; }
}

label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

/* --- OPTION STYLES --- */
.option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    word-break: break-word;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
}
.option:hover:not(.selected):not(.correct):not(.incorrect), .option:focus:not(.selected):not(.correct):not(.incorrect) {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02) translateX(5px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    z-index: 2;
}
.option.selected {
    background: var(--primary-gradient);
    color: var(--text-primary);
    border-color: transparent;
    animation: selectPulse 0.5s cubic-bezier(0.4,0,0.2,1);
}
.option.correct {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: var(--text-primary);
    border-color: transparent;
    animation: correctPulse 0.5s cubic-bezier(0.4,0,0.2,1);
}
.option.incorrect {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--text-primary);
    border-color: transparent;
    animation: incorrectShake 0.5s cubic-bezier(0.4,0,0.2,1);
}
.option:active {
    filter: brightness(0.98);
    transform: scale(0.98);
}

/* --- LEADERBOARD CARD GLOW & ANIMATION --- */
.leaderboard-card.rank-1 {
    box-shadow: 0 0 24px 4px #fbbf24, 0 2px 8px #0002;
    border: 2px solid #fbbf24;
    background: linear-gradient(135deg, rgba(251,191,36,0.10) 0%, rgba(251,191,36,0.03) 100%);
}
.leaderboard-card.rank-2 {
    box-shadow: 0 0 18px 3px #cbd5e1, 0 2px 8px #0002;
    border: 2px solid #cbd5e1;
    background: linear-gradient(135deg, rgba(203,213,225,0.10) 0%, rgba(203,213,225,0.03) 100%);
}
.leaderboard-card.rank-3 {
    box-shadow: 0 0 14px 2px #b45309, 0 2px 8px #0002;
    border: 2px solid #b45309;
    background: linear-gradient(135deg, rgba(180,83,9,0.10) 0%, rgba(180,83,9,0.03) 100%);
}
.leaderboard-card {
    transition: box-shadow 0.35s cubic-bezier(0.4,0,0.2,1), transform 0.35s cubic-bezier(0.4,0,0.2,1), background 0.35s cubic-bezier(0.4,0,0.2,1);
}
.leaderboard-card:hover, .leaderboard-card:active {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 8px 32px 0 rgba(99,102,241,0.18), 0 0 24px 4px var(--glow-color);
    z-index: 2;
}
@keyframes leaderboardHighlight {
    0% { background: #fbbf24; color: #fff; }
    60% { background: #fbbf24; color: #fff; }
    100% { background: inherit; color: inherit; }
}
.leaderboard-card.rank-changed {
    animation: leaderboardHighlight 1.2s cubic-bezier(0.4,0,0.2,1);
}
@keyframes leaderboardFadeScale {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}
.leaderboard-card.reordered {
    animation: leaderboardFadeScale 0.7s cubic-bezier(0.4,0,0.2,1);
}

/* --- ANIMATIONS & KEYFRAMES --- */
@keyframes selectPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
@keyframes glow {
    0%, 100% { text-shadow: 0 0 20px rgba(99, 102, 241, 0.5); }
    50% { text-shadow: 0 0 30px rgba(99, 102, 241, 0.8); }
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 768px) {
    .leaderboard-table-container { display: none; }
    .leaderboard-cards { display: grid; grid-template-columns: 1fr; gap: 1rem; width: 100%; }
    .leaderboard-card { width: 100%; }
    .refresh-button { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
    .leaderboard-cards { gap: 0.75rem; }
    .glowing-title { font-size: 1.2rem; }
    .leaderboard-card { padding: 1rem; }
}

/* --- COLOR CONTRAST IMPROVEMENTS --- */
.card, .question-card, .leaderboard-card, .modal-content, .welcome-content, .submission-content {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(30,41,59,0.95) 0%, rgba(30,41,59,0.85) 100%);
}
label, .form-group label, .leaderboard-subtitle, .question-type, .question-preview {
    color: var(--text-secondary);
}

/* --- MISC --- */
::-webkit-input-placeholder { color: #bfc9d1; opacity: 1; }
::-moz-placeholder { color: #bfc9d1; opacity: 1; }
:-ms-input-placeholder { color: #bfc9d1; opacity: 1; }
::placeholder { color: #bfc9d1; opacity: 1; } 

.question-meta-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem 0.5rem 1rem;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

.question-type-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.7rem 1.2rem;
    border-radius: 1.2rem;
    font-weight: 500;
    font-size: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 120px;
    min-height: 70px;
    justify-content: center;
}

.score-display {
    background: linear-gradient(90deg, #7B61FF 0%, #A587FF 100%);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 1.2rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 2px 12px 0 #a587ff44;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 180px;
    justify-content: flex-start;
    border: none;
    position: relative;
    overflow: visible;
    margin-left: auto;
}

.cryptcoin-emoji {
    font-size: 2.2rem;
    margin-right: 0.7rem;
    animation: coin-bounce 1.5s infinite;
    filter: drop-shadow(0 0 6px #fbbf24aa);
    display: inline-block;
    transition: transform 0.2s;
}

@keyframes coin-bounce {
    0%, 100% { transform: translateY(0) scale(1); filter: brightness(1); }
    20% { transform: translateY(-8px) scale(1.1); filter: brightness(1.2); }
    40% { transform: translateY(0) scale(1); filter: brightness(1); }
    60% { filter: brightness(1.3); }
}

.cryptcoins-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.cryptcoins-label {
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    color: #d1c4e9;
    text-shadow: 0 0 8px #8b5cf6cc;
    margin-right: 0.3rem;
}

.cryptcoins-value {
    font-size: 2.1rem;
    font-weight: 900;
    color: #fffbe7;
    text-shadow: 0 0 12px #fbbf24, 0 0 4px #fff;
    transition: transform 0.3s cubic-bezier(.4,2,.6,1), opacity 0.3s;
    will-change: transform, opacity;
    display: inline-block;
}

.cryptcoins-value.animated {
    transform: scale(1.25);
    opacity: 0.7;
}

@media (max-width: 600px) {
    .question-meta-row {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 0.5rem 0.2rem;
        max-width: 98vw;
    }
    .score-display {
        padding: 0.7rem 0.7rem;
        font-size: 1rem;
        min-width: 120px;
        margin-left: 0;
    }
    .cryptcoin-emoji { font-size: 1.3rem; }
    .cryptcoins-value { font-size: 1.3rem; }
    .question-type-indicator {
        padding: 0.5rem 0.5rem;
        min-width: 90px;
        min-height: 50px;
    }
}

.question-content {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.text-input-container {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
    position: relative;
}

.answer-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.answer-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
    transform: translateY(-1px);
}

.answer-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.answer-input:hover:not(:disabled) {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.answer-input:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    background: var(--input-bg-disabled);
}

/* Feedback Message Styles */
.feedback-message {
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 0;
    overflow: hidden;
}

.feedback-message.show {
    opacity: 1;
    transform: translateY(0);
    height: auto;
}

.feedback {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    animation: feedbackSlideIn 0.3s ease-out;
}

.feedback.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.feedback.typing {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.feedback i {
    font-size: 1.2rem;
}

/* Input styles for correct answer */
.answer-input.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
    color: #22c55e;
    animation: correctPulse 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .text-input-container {
        padding: 0 0.5rem;
    }
    
    .answer-input {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .feedback {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .text-input-container {
        margin: 1.5rem auto;
    }
    
    .answer-input {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    .feedback {
        padding: 0.625rem 0.875rem;
        font-size: 0.95rem;
    }
}