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

body {
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 100, 100, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 180, 0, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(236, 72, 153, 0.3) 50%, rgba(251, 146, 60, 0.3) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.header-title-section {
    flex: 1;
    min-width: 200px;
}

.main-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24 0%, #f472b6 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-emoji {
    -webkit-text-fill-color: initial;
    animation: float 3s ease-in-out infinite;
}

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

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-top: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
}

.header-controls {
    min-width: 200px;
}

.vibe-meter-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr 320px;
    }
}

.progress-path {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-width: 48px;
}

.progress-node:hover:not(.locked) {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(251, 191, 36, 0.5);
}

.progress-node.completed {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

.progress-node.current {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.5);
    animation: pulse-glow 2s ease-in-out infinite;
}

.progress-node.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
    50% { box-shadow: 0 0 20px 5px rgba(251, 191, 36, 0.2); }
}

.lessons-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lesson-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.lesson-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.lesson-card.expanded {
    background: rgba(255, 255, 255, 0.08);
}

.lesson-card.completed {
    border-left: 4px solid #22c55e;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lesson-content {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    animation: slideDown 0.3s ease;
}

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

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

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

.quiz-option:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateX(5px);
}

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

.quiz-option.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    animation: shake 0.5s ease;
}

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

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

.sidebar-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
}

.cheatsheet-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.badge.earned {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(244, 114, 182, 0.2) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge.locked {
    opacity: 0.5;
}

.badge.earned span:first-child {
    animation: badgeBounce 1s ease;
}

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

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.share-btn, .reset-btn {
    width: 100%;
    padding: 0.875rem;
    border-radius: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border: none;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.reset-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
}

.reset-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.app-footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.footer-link {
    color: #f472b6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #fbbf24;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.share-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    margin: 1rem 0;
}

.share-button {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bdb 100%);
    border: none;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(29, 161, 242, 0.3);
}

.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 300;
    overflow: hidden;
}

.confetti-particle {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: confettiFall 4s ease-out forwards;
}

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

@media (max-width: 768px) {
    .app-header {
        padding: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .lesson-card {
        padding: 1rem;
    }

    .quiz-section {
        padding: 1rem;
    }

    .badge-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}