:root {
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --purple-glow: rgba(168, 85, 247, 0.3);
    --green-glow: rgba(34, 197, 94, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Bricolage Grotesque', sans-serif;
    background-color: var(--bg-dark);
    margin: 0;
    padding: 0;
}

.bg-dark {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse at 10% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
    min-height: 100vh;
}

.header-gradient {
    background: linear-gradient(135deg, #1a1a2e 0%, #2e1a1a 50%, #1a1a2e 100%);
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
}

.footer-gradient {
    background: linear-gradient(180deg, transparent 0%, rgba(239, 68, 68, 0.1) 100%);
    border-top: 1px solid rgba(239, 68, 68, 0.2);
}

.spin-coin {
    display: inline-block;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.meme-bucks-display {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1a1a2e;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

.progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar.small {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
    border-radius: 9999px;
    transition: width 0.5s ease-out;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-button:hover {
    background: rgba(239, 68, 68, 0.1);
}

.tab-button.active {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: white;
    border-color: transparent;
}

.module-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #f97316);
    opacity: 0;
    transition: opacity 0.3s;
}

.module-card:hover:not(.locked) {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

.module-card:hover:not(.locked)::before {
    opacity: 1;
}

.module-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.module-card.completed {
    border-color: rgba(34, 197, 94, 0.3);
}

.module-card.completed::before {
    background: linear-gradient(90deg, #22c55e, #10b981);
    opacity: 1;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 1rem;
    color: #6b7280;
}

.difficulty-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.calculator-section {
    background: var(--bg-card);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-select {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-select:hover {
    border-color: rgba(239, 68, 68, 0.5);
}

.calc-select:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.calc-select option {
    background: var(--bg-dark);
}

.price-result {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.pro-tip {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    padding: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
    text-align: left;
    color: #d4d4d8;
    font-size: 0.9rem;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
    opacity: 0.4;
    filter: grayscale(1);
}

.achievement-card.unlocked {
    opacity: 1;
    filter: none;
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.1);
}

.lesson-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 2rem;
}

.tip-box {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    padding: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #d4d4d8;
}

.quiz-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.quiz-option {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: white;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-option:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.quiz-option.correct {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

.quiz-option.incorrect {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.quiz-option:disabled {
    cursor: default;
}

.quiz-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
}

.quiz-feedback.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.quiz-feedback.fail {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.next-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.next-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
}

.next-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quote-rotate {
    animation: fadeInOut 5s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall 2s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-gradient {
        padding: 1rem;
    }
    
    .module-card {
        padding: 1.25rem;
    }
    
    .calculator-section {
        padding: 1.5rem;
    }
    
    .price-result {
        margin-top: 1.5rem;
    }
    
    .lesson-card {
        padding: 1.5rem;
    }
}