/* ===== GERMAN COURSE STYLES (Elite Premium v2) ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Google+Sans:wght@400;500;700&display=swap');

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

body {
    background: #f8f9fa;
    /* Clean off-white */
    font-family: 'Outfit', sans-serif;
    color: #202124;
}

.german-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px 100px;
}

/* ===== HERO SECTION (Premium v2) ===== */
.german-hero {
    position: relative;
    height: 440px;
    background: #fff;
    border-radius: 48px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f3f4;
}

.german-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 95%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(225, 39%, 95%, 1) 0, transparent 50%);
    opacity: 0.5;
    z-index: 1;
}

/* 3D Container */
#island-3d-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 48px;
    overflow: hidden;
    touch-action: none;
}

.hero-text {
    position: absolute;
    top: 100px;
    left: 48px;
    z-index: 10;
    pointer-events: none;
}

.hero-text h1 {
    font-family: 'Google Sans', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-text p {
    font-size: 1.1rem;
    color: #e8eaed;
    max-width: 400px;
    font-weight: 500;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.stats-row {
    position: absolute;
    bottom: 40px;
    left: 48px;
    display: flex;
    gap: 16px;
    z-index: 10;
}

.stat-chip {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    font-weight: 700;
    color: #202124;
    transition: all 0.3s;
}

.stat-chip:hover {
    transform: translateY(-4px);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.stat-chip span.material-symbols-outlined {
    color: var(--google-blue-600);
    font-size: 22px;
}

/* Buttons */
.back-btn,
.profile-btn-top {
    position: absolute;
    top: 24px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s;
    color: #5f6368;
}

.back-btn {
    left: 48px;
}

.profile-btn-top {
    right: 48px;
}

.back-btn:hover,
.profile-btn-top:hover {
    background: #fff;
    transform: scale(1.05);
    color: #1a73e8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== PATH SECTION ===== */
.path-section {
    padding: 20px 0;
}

.path-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
}

.path-inner::before {
    content: '';
    position: absolute;
    top: 40px;
    bottom: 40px;
    left: 50%;
    width: 4px;
    background: #eef2f7;
    transform: translateX(-50%);
    z-index: 0;
}

/* Learning Nodes */
.lesson-node-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.lesson-node {
    width: 80px;
    height: 80px;
    border-radius: 28px;
    /* SQUIRCLE */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #eef2f7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.lesson-node .material-symbols-outlined {
    font-size: 32px;
    color: #bdc1c5;
    transition: all 0.3s;
}

.lesson-node.locked {
    background: #f8f9fa;
    border-color: #f1f3f4;
    cursor: not-allowed;
    opacity: 0.8;
}

.lesson-node.active {
    background: #fff;
    border-color: #1a73e8;
    box-shadow: 0 10px 25px rgba(26, 115, 232, 0.15);
}

.lesson-node.active .material-symbols-outlined {
    color: #1a73e8;
}

.lesson-node.completed {
    background: #e6f4ea;
    border-color: #34a853;
}

.lesson-node.completed .material-symbols-outlined {
    color: #34a853;
}

.lesson-node:hover:not(.locked) {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.node-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #fff;
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid #eef2f7;
}

/* ===== LESSON MODAL ===== */
.lesson-modal {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s;
}

.lesson-modal.active {
    opacity: 1;
    pointer-events: all;
}

.lesson-panel {
    background: #fff;
    border-radius: 40px;
    width: 90%;
    max-width: 800px;
    min-height: 400px;
    height: auto;
    max-height: 85vh;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f3f4;
    transform: translateY(40px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lesson-modal.active .lesson-panel {
    transform: translateY(0) scale(1);
}

.lesson-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: #f5f5f5;
}

.icon-btn .material-symbols-outlined {
    font-size: 22px;
    color: #555;
}

.progress-track {
    flex: 1;
    height: 10px;
    background: #f0f0f0;
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 99px;
    transition: width 0.6s ease;
    width: 0%;
}



/* ===== LESSON BODY ===== */
.lesson-body {
    flex: 1;
    padding: 24px 20px;
    overflow-y: auto;
}

.lesson-article {
    background: #f8f9fa;
    border-left: 4px solid #FFCE00;
    border-radius: 8px;
    padding: 16px 18px;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
    color: #333;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 18px;
    text-align: center;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.option-card {
    background: white;
    border: 2px solid #e3e8ef;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    user-select: none;
}

.option-card:hover {
    border-color: #FFCE00;
    background: #fffde7;
}

.option-card.selected {
    border-color: #1a73e8;
    background: #e8f0fe;
    color: #1a73e8;
}

.option-card.correct {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
}

.option-card.wrong {
    border-color: #ef5350;
    background: #ffebee;
    color: #c62828;
}

/* ===== MATCH ===== */
.match-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.match-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-btn {
    background: white;
    border: 2.5px solid #dde3ea;
    border-radius: 12px;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Outfit', sans-serif;
}

.match-btn:hover {
    border-color: #FFCE00;
    background: #fffde7;
}

.match-btn.selected {
    border-color: #1a73e8;
    background: #e8f0fe;
    color: #1a73e8;
}

.match-btn.matched {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
    pointer-events: none;
}

.match-btn.wrong-flash {
    border-color: #ef5350;
    background: #ffebee;
    animation: shake 0.4s ease;
}

/* ===== AUDIO ===== */
.audio-btn {
    display: block;
    margin: 0 auto 20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    border: none;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}

.audio-btn:hover {
    transform: scale(1.07);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.5);
}

.audio-btn:active {
    transform: scale(0.97);
}

.fill-input {
    display: inline-block;
    width: 100px;
    border: none;
    border-bottom: 3px solid #1a73e8;
    padding: 0 4px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    text-align: center;
    background: transparent;
    color: #1a1a2e;
    outline: none;
    vertical-align: baseline;
}

.fill-input:focus {
    border-bottom-color: #0d47a1;
}

/* ===== FOOTER ===== */
.lesson-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    position: sticky;
    bottom: 0;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feedback-area {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 10px;
    text-align: center;
}

.feedback-area.hidden {
    display: none;
}

.feedback-area.correct {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1.5px solid #a5d6a7;
}

.feedback-area.incorrect {
    background: #ffebee;
    color: #c62828;
    border: 1.5px solid #ef9a9a;
}

.check-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s;
    background: linear-gradient(135deg, #FFCE00, #FFB300);
    color: #1a1a2e;
    box-shadow: 0 4px 0 #e65100;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #e65100;
}

.check-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #e65100;
}

.check-btn.continue {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
    box-shadow: 0 4px 0 #1b5e20;
}

.check-btn.continue:hover {
    box-shadow: 0 6px 0 #1b5e20;
}

/* ===== CELEBRATION ===== */
.celebration-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.celebration-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.celebration-card {
    background: white;
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    animation: cardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardPop {
    from {
        transform: scale(0.6);
        opacity: 0;
    }

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

.confetti-emoji {
    font-size: 4rem;
    margin-bottom: 8px;
}

.celebration-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.xp-earned {
    font-size: 2rem;
    font-weight: 800;
    color: #4caf50;
    margin: 12px 0 24px;
}

.continue-btn {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 14px 40px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 0 #1b5e20;
    transition: all 0.15s;
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #1b5e20;
}

/* ===== ANIMATIONS ===== */
@keyframes shake {

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

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .options-grid {
        grid-template-columns: 1fr;
    }

    .lesson-panel {
        min-height: 78vh;
    }
}

/* Tablet Hardening (iPad Landscape/Portrait) */
@media (max-width: 1024px) {
    .german-main {
        padding-top: 100px;
    }

    .german-hero {
        height: 400px;
        margin-bottom: 60px;
    }

    .hero-text {
        top: 80px;
        left: 40px;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .stats-row {
        bottom: 32px;
        left: 40px;
    }

    .back-btn {
        left: 40px;
    }

    .profile-btn-top {
        right: 40px;
    }
}

/* Elite Mobile Hardening */
@media (max-width: 600px) {
    .german-hero {
        height: 380px;
        border-radius: 32px;
    }

    .hero-text {
        top: 80px;
        left: 24px;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .back-btn,
    .profile-btn-top {
        top: 20px;
        width: 40px;
        height: 40px;
    }

    .back-btn {
        left: 24px;
    }

    .profile-btn-top {
        right: 24px;
    }

    .stats-row {
        bottom: 24px;
        left: 24px;
        gap: 8px;
        width: calc(100% - 48px);
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .stat-chip {
        padding: 8px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .german-main {
        padding-top: 40px;
    }
}
