/* Modul E-Commerce – gemeinsames Design für Startseite, Modulseite und Lehrkraft-Bereich.
   Entspricht dem bisherigen Design der index.html (Hellblau, weiße Karten, Modal mit Akkordeon). */

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

:root {
    --dunkel: #0369a1;
    --hell: #0ea5e9;
    --zart: #e0f2fe;
    --grau: #64748b;
    --text: #0f172a;
    --gruen: #16a34a;
    --lila: #7c3aed;
    --orange: #ea580c;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text);
}
/* Vertiefungsmodul: gleiche Bauart, eigener Farbton (Violett) */
body[data-modul="vertiefung"] {
    --dunkel: #0f5f6b;
    --hell: #0e7c86;
    --zart: #d5eff1;
    background: linear-gradient(135deg, #effafa 0%, #d5eff1 100%);
}

.container { max-width: 1400px; margin: 0 auto; }

/* ── HEADER ──────────────────────────────────────────────────────── */
.header { text-align: center; padding: 40px 20px 24px; margin-bottom: 28px; }
.header h1 { font-size: 3em; color: var(--dunkel); margin-bottom: 10px; font-weight: 700; letter-spacing: -0.02em; }
.header h1 .accent { color: var(--hell); }
.header .subtitle { font-size: 1.1em; color: var(--grau); font-weight: 500; }
.header::after { content: ''; display: block; width: 60px; height: 3px; background: var(--hell); margin: 20px auto 0; border-radius: 2px; }

/* ── KLEINE BEDIENELEMENTE ───────────────────────────────────────── */
.zurueck { display: inline-flex; align-items: center; gap: 6px; color: var(--grau); text-decoration: none;
    font-size: .9em; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.6); }
.zurueck:hover { background: #fff; color: var(--dunkel); }

.knopf { display: inline-flex; align-items: center; gap: 8px; background: white; border: 1px solid var(--zart);
    border-radius: 12px; padding: 11px 18px; font-weight: 600; font-size: .95em; color: var(--dunkel);
    text-decoration: none; cursor: pointer; box-shadow: 0 4px 16px rgba(14,165,233,.08); transition: all .2s ease; font-family: inherit; }
.knopf:hover { transform: translateY(-2px); border-color: var(--hell); box-shadow: 0 8px 24px rgba(14,165,233,.18); }
.knopf.voll { background: linear-gradient(135deg, var(--dunkel), var(--hell)); color: #fff; border-color: transparent; }

/* ── MODULWAHL (nur Vertiefungsgruppe / Lehrkraft) ───────────────── */
.modulwahl { display: flex; justify-content: center; gap: 8px; margin: -8px 0 26px; flex-wrap: wrap; }
.modulwahl button { background: rgba(255,255,255,.7); border: 1.5px solid #cbd5e1; border-radius: 999px;
    padding: 9px 20px; font-weight: 600; font-size: .95em; cursor: pointer; color: var(--grau); font-family: inherit; transition: all .2s ease; }
.modulwahl button:hover { background: #fff; }
.modulwahl button[aria-selected="true"] { background: linear-gradient(135deg, var(--dunkel), var(--hell)); color: #fff; border-color: transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,.12); }

/* ── FORTSCHRITT ─────────────────────────────────────────────────── */
.stand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; color: var(--grau);
    font-size: .92em; font-weight: 600; flex-wrap: wrap; }
.stand .punkte { display: flex; gap: 4px; flex-wrap: wrap; }
.stand .punkte i { width: 11px; height: 11px; border-radius: 50%; background: #cbd5e1; display: block; }
.stand .punkte i.o { background: var(--hell); }
.stand .punkte i.f { background: var(--gruen); }

/* ── INTRO-KARTEN (Einführung, „Ihr seid dran bei") ──────────────── */
.intro-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 28px; }
.intro-card { background: white; border: 1px solid var(--zart); border-radius: 16px; padding: 20px 22px;
    box-shadow: 0 4px 16px rgba(14,165,233,.08); cursor: pointer; transition: all .25s ease; text-align: center;
    display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-decoration: none; color: inherit; }
.intro-card:hover { transform: translateY(-3px); border-color: var(--hell); box-shadow: 0 8px 24px rgba(14,165,233,.18); }
.intro-card .icon { font-size: 2em; }
.intro-card h2 { color: var(--dunkel); font-size: 1.3em; font-weight: 600; }
.intro-card.dran { border: 2px solid var(--hell); text-align: left; justify-content: flex-start; }
.intro-card.dran .nr { background: linear-gradient(135deg, var(--dunkel), var(--hell)); color: #fff; min-width: 52px; height: 52px;
    border-radius: 999px; padding: 0 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.05em; }
.intro-card.dran small { display: block; color: var(--grau); font-size: .8em; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.intro-card.dran strong { color: var(--text); font-size: 1.1em; }
.intro-card.dran .los { margin-left: auto; background: linear-gradient(135deg, var(--dunkel), var(--hell)); color: #fff;
    padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .9em; }

/* ── LERNBEREICH-GRID ────────────────────────────────────────────── */
.lernbereiche-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 36px; }
.lb-card { background: white; border: 1px solid var(--zart); border-radius: 16px; padding: 28px 20px;
    box-shadow: 0 4px 16px rgba(14,165,233,.08); transition: all .25s ease; cursor: pointer; position: relative;
    text-align: center; min-height: 200px; display: flex; flex-direction: column; justify-content: center; align-items: center;
    animation: fadeIn .5s ease backwards; font-family: inherit; font-size: inherit; color: inherit; }
.lb-card:nth-child(1) { animation-delay: .05s; } .lb-card:nth-child(2) { animation-delay: .1s; }
.lb-card:nth-child(3) { animation-delay: .15s; } .lb-card:nth-child(4) { animation-delay: .2s; }
.lb-card:nth-child(5) { animation-delay: .25s; }
.lb-card:hover:not(.disabled) { transform: translateY(-6px); border-color: var(--hell); box-shadow: 0 12px 30px rgba(14,165,233,.2); }
.lb-card.disabled { opacity: .55; cursor: not-allowed; background: #f8fafc; border-color: #e2e8f0; }
.lb-number { background: linear-gradient(135deg, var(--dunkel), var(--hell)); color: white; width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.4em; font-weight: 700; margin-bottom: 14px;
    box-shadow: 0 4px 10px rgba(14,165,233,.25); }
.lb-card.disabled .lb-number { background: #94a3b8; box-shadow: none; }
.lb-icon { font-size: 2.4em; margin-bottom: 12px; }
.lb-title { color: var(--text); font-size: 1em; font-weight: 600; line-height: 1.4; }
.lb-card.disabled .lb-title { color: #94a3b8; }
.lock-icon, .lb-badge { position: absolute; top: 14px; right: 14px; font-size: 1.1em; }
.lb-badge { font-size: .72em; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.lb-badge.fertig { background: #dcfce7; color: var(--gruen); }
.lb-badge.offen { background: var(--zart); color: var(--dunkel); }

/* ── MODAL ───────────────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 1000;
    justify-content: center; align-items: center; padding: 20px; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; animation: fadeIn .2s ease; }
.modal-content { background: white; border-radius: 20px; padding: 32px 28px 28px; max-width: 640px; width: 100%; max-height: 88vh;
    overflow-y: auto; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: modalIn .25s cubic-bezier(.34,1.3,.64,1); }
@keyframes modalIn { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-close { position: absolute; top: 12px; right: 12px; background: none; border: none; font-size: 1.6em; cursor: pointer; color: var(--grau);
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all .2s ease; }
.modal-close:hover { background: #f1f5f9; color: var(--dunkel); }
.modal-header { text-align: center; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 2px solid #f0f9ff; }
.modal-header h3 { color: var(--dunkel); font-size: 1.7em; margin-bottom: 6px; font-weight: 700; }
.modal-header p { color: var(--grau); font-size: .95em; }

/* ── LS-AKKORDEON ────────────────────────────────────────────────── */
.ls-list { display: flex; flex-direction: column; gap: 10px; }
.ls-item { background: white; border: 1.5px solid var(--zart); border-radius: 12px; overflow: hidden; transition: all .2s ease; }
.ls-item.expanded { border-color: var(--hell); box-shadow: 0 4px 12px rgba(14,165,233,.1); }
.ls-item.disabled { opacity: .55; background: #f8fafc; }
.ls-header { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; user-select: none; transition: background .15s ease; }
.ls-item:not(.disabled) .ls-header:hover { background: #f0f9ff; }
.ls-item.disabled .ls-header { cursor: not-allowed; }
.ls-number { background: linear-gradient(135deg, var(--dunkel), var(--hell)); color: white; min-width: 38px; height: 38px; border-radius: 999px; padding: 0 6px;
    display: flex; align-items: center; justify-content: center; font-size: .92em; font-weight: 700; flex-shrink: 0; }
.ls-item.disabled .ls-number { background: #cbd5e1; }
.ls-item.fertig .ls-number { background: var(--gruen); }
.ls-title { flex: 1; font-size: .98em; font-weight: 600; color: var(--text); }
.ls-title em { display: block; font-style: normal; font-size: .78em; font-weight: 600; color: #94a3b8; margin-top: 2px; }
.ls-item.disabled .ls-title { color: #94a3b8; }
.ls-chevron { color: var(--grau); font-size: 1em; transition: transform .2s ease; }
.ls-item.expanded .ls-chevron { transform: rotate(180deg); color: var(--hell); }
.ls-lock { font-size: 1em; margin-left: 6px; }
.ls-haken { font-size: .72em; font-weight: 700; color: var(--gruen); background: #dcfce7; padding: 3px 8px; border-radius: 999px; }

.ls-content { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.ls-item.expanded .ls-content { max-height: 1600px; }
.ls-content-inner { padding: 4px 16px 16px; border-top: 1px solid #f1f5f9; }

.section-label { font-size: .72em; font-weight: 700; color: var(--dunkel); text-transform: uppercase; letter-spacing: .08em;
    margin: 12px 0 6px; display: flex; align-items: center; gap: 6px; }
.section-label.teacher { color: var(--lila); }
.material-list { display: flex; flex-direction: column; gap: 4px; }
.material-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f8fafc; border-radius: 8px;
    text-decoration: none; color: var(--text); font-size: .88em; transition: all .15s ease; border-left: 3px solid transparent; }
.material-item:hover { background: var(--zart); border-left-color: var(--hell); transform: translateX(2px); }
.material-item.placeholder { color: #94a3b8; font-style: italic; cursor: default; }
.material-item.placeholder:hover { background: #f8fafc; border-left-color: transparent; transform: none; }
.teacher-list .material-item { background: #faf5ff; }
.teacher-list .material-item:hover { background: #f3e8ff; border-left-color: var(--lila); }
.material-icon { font-size: 1.1em; flex-shrink: 0; width: 22px; text-align: center; }
.material-label { flex: 1; line-height: 1.3; }
.material-meta { font-size: .78em; color: #94a3b8; flex-shrink: 0; }
.empty-section { font-size: .83em; color: #94a3b8; font-style: italic; padding: 6px 12px; }

/* ── LEHRKRAFT-LEISTE ────────────────────────────────────────────── */
.lehrkraft-leiste { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
    background: #faf5ff; border: 1px solid #e9d5ff; color: var(--lila); border-radius: 12px; padding: 10px 16px;
    font-size: .9em; font-weight: 600; margin-bottom: 22px; }
.lehrkraft-leiste a { color: var(--lila); }

.fuss { text-align: center; margin: 10px 0 30px; color: #94a3b8; font-size: .85em; }

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

@media (max-width: 768px) {
    .header { padding: 24px 10px 18px; }
    .header h1 { font-size: 2.2em; }
    .lernbereiche-grid { grid-template-columns: 1fr 1fr; }
    .lb-card { min-height: 170px; padding: 22px 14px; }
    .lb-icon { font-size: 2em; }
    .lb-title { font-size: .92em; }
    .modal-content { padding: 24px 20px 20px; }
    .modal-header h3 { font-size: 1.4em; }
    .intro-card.dran .los { margin-left: 0; }
}
@media (max-width: 480px) { .lernbereiche-grid { grid-template-columns: 1fr; } }
