/* ============================================================
   SOTCON ACADEMY - Style v3
   Komplett im sotcon.de Stil für alle Seiten
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,800&display=swap');

:root {
    /* Hauptfarben sotcon.de Stil */
    --bg-light: #f5f3ef;
    --bg-warm: #faf8f5;
    --bg-white: #ffffff;
    --bg-dark: #1a3a2e;
    --bg-darker: #122d24;
    --bg-darkest: #0a1f17;
    
    /* Text */
    --text-dark: #0a0a0a;
    --text-medium: #2d3838;
    --text-muted: #6b7570;
    --text-light: #f5f3ef;
    --text-light-muted: #b8c5be;
    
    /* Akzente */
    --accent: #d4a347;
    --accent-warm: #c89538;
    --accent-dim: rgba(212, 163, 71, 0.1);
    
    /* Status */
    --success: #2d8659;
    --success-dim: rgba(45, 134, 89, 0.1);
    --danger: #c14545;
    --danger-dim: rgba(193, 69, 69, 0.1);
    --warning: #d4a347;
    --info: #1a3a2e;
    
    /* Grenzen & Schatten */
    --border-light: #e8e4dc;
    --border-medium: #d0c8b8;
    --border-dark: #2a4d3f;
    --shadow-sm: 0 2px 4px rgba(26, 58, 46, 0.05);
    --shadow-md: 0 4px 12px rgba(26, 58, 46, 0.08);
    --shadow-lg: 0 12px 32px rgba(26, 58, 46, 0.12);
    --shadow-xl: 0 20px 40px -10px rgba(26, 58, 46, 0.15);
    
    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Fonts */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--bg-dark);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.page-content {
    padding: 2rem 0 4rem;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--text-muted);
}

.text-accent {
    color: var(--accent);
}

.text-light {
    color: var(--text-light);
}

.italic {
    font-style: italic;
    font-family: var(--font-display);
    font-weight: 400;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

.site-header {
    position: sticky;
    top: 0;
    background: rgba(245, 243, 239, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
    gap: 2rem;
}

/* Logo - Variante 1: Logo + Trennlinie + Academy */
.logo {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-image {
    height: 64px;
    width: auto;
    flex-shrink: 0;
    mix-blend-mode: multiply;
    background: transparent;
}

.logo-divider {
    width: 1px;
    height: 36px;
    background: var(--bg-dark);
    opacity: 0.3;
    flex-shrink: 0;
}

.logo-academy {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--bg-dark);
    letter-spacing: -0.01em;
    line-height: 1;
}

.logo:hover .logo-academy {
    color: var(--accent);
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    display: inline-block;
    padding: 0.625rem 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-medium);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-menu a:hover {
    color: var(--text-dark);
    background: rgba(26, 58, 46, 0.05);
}

.nav-menu a.active {
    color: var(--bg-dark);
    background: rgba(212, 163, 71, 0.15);
    font-weight: 600;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: var(--bg-dark);
    color: var(--text-light);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    font-family: var(--font-body);
    cursor: default;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    letter-spacing: 0.01em;
    line-height: 1;
}

.btn-primary {
    background: var(--bg-dark);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--bg-darker);
    color: var(--text-light);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-dark);
    color: var(--text-dark);
}

.btn-accent {
    background: var(--accent);
    color: var(--text-dark);
}

.btn-accent:hover {
    background: var(--accent-warm);
    color: var(--text-dark);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: var(--text-light);
}

.btn-success:hover {
    background: #246d48;
    color: var(--text-light);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover {
    background: rgba(26, 58, 46, 0.05);
    border-color: var(--bg-dark);
}

.btn-light {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn-light:hover {
    background: var(--bg-white);
    border-color: var(--text-dark);
}

.btn-lg {
    padding: 1.125rem 2.25rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-weight: 400;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--bg-dark);
    box-shadow: 0 0 0 3px rgba(26, 58, 46, 0.1);
}

input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--bg-dark);
    cursor: pointer;
    margin-right: 0.5rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checkbox-group label {
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.5;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-warm {
    background: var(--bg-warm);
}

.card-dark {
    background: var(--bg-dark);
    color: var(--text-light);
    border-color: var(--border-dark);
}

.card-dark h1, .card-dark h2, .card-dark h3,
.card-dark h4, .card-dark h5, .card-dark h6 {
    color: var(--text-light);
}

.card-dark .text-muted {
    color: var(--text-light-muted);
}

.card-accent {
    border-left: 4px solid var(--accent);
}

.card-success {
    border-left: 4px solid var(--success);
}

.card-danger {
    border-left: 4px solid var(--danger);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert-success {
    background: var(--success-dim);
    color: #1d5e3d;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: var(--danger-dim);
    color: #8c2929;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: var(--accent-dim);
    color: var(--bg-dark);
    border-left: 4px solid var(--accent);
}

.alert-warning {
    background: rgba(212, 163, 71, 0.15);
    color: #8c6f1e;
    border-left: 4px solid var(--accent);
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 100px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bg-dark), var(--accent));
    border-radius: 100px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   STATS / METRICS
   ============================================ */

.stat-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-light);
}

.stat-number {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* ============================================
   AUTH PAGES (Login, Register)
   ============================================ */

.auth-wrapper {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 480px;
    width: 100%;
    border: 1px solid var(--border-light);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    height: 90px;
    width: auto;
    mix-blend-mode: multiply;
    background: transparent;
}

.auth-logo .logo-academy-tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--bg-dark);
}

.auth-card h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-card .subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-link a {
    color: var(--bg-dark);
    font-weight: 600;
    text-decoration: underline;
}

.auth-link a:hover {
    color: var(--accent);
}

/* ============================================
   TOPIC / LEARNING CARDS
   ============================================ */

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

.topic-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.topic-card:hover {
    transform: translateY(-4px);
    border-color: var(--bg-dark);
    box-shadow: var(--shadow-lg);
    color: inherit;
}

.topic-card.completed {
    border-color: var(--success);
    background: linear-gradient(to bottom right, var(--bg-white), var(--success-dim));
}

.topic-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-dark);
    color: var(--text-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.topic-card.completed .topic-icon {
    background: var(--success);
}

.topic-number {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.topic-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.topic-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.topic-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--accent-dim);
    color: var(--bg-dark);
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.8rem;
}

.topic-status.completed {
    background: var(--success-dim);
    color: var(--success);
}

/* ============================================
   CHAPTER / READING PAGE
   ============================================ */

.chapter-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.chapter-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.chapter-sidebar h4 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
}

.chapter-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-sidebar li {
    margin-bottom: 0.5rem;
}

.chapter-sidebar a {
    display: block;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius-sm);
    color: var(--text-medium);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.chapter-sidebar a:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.chapter-sidebar a.active {
    background: rgba(212, 163, 71, 0.15);
    color: var(--bg-dark);
    font-weight: 600;
}

.chapter-sidebar a.read::before {
    content: '✓';
    color: var(--success);
    margin-right: 0.5rem;
    font-weight: 700;
}

.chapter-content {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 3rem;
}

.chapter-header {
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.chapter-content h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.chapter-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.chapter-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-medium);
}

.chapter-body h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.chapter-body h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.chapter-body p {
    margin-bottom: 1.25rem;
}

.chapter-body ul, .chapter-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    list-style: revert;
}

.chapter-body li {
    margin-bottom: 0.5rem;
}

.chapter-body strong {
    color: var(--text-dark);
    font-weight: 600;
}

.chapter-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.chapter-body th {
    background: var(--bg-warm);
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border: 1px solid var(--border-light);
}

.chapter-body td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
}

.chapter-body blockquote {
    border-left: 4px solid var(--accent);
    background: var(--bg-warm);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-medium);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.chapter-body .warning-box {
    background: rgba(212, 163, 71, 0.1);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-dark);
}

.chapter-body .example-box {
    background: var(--success-dim);
    border-left: 4px solid var(--success);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.key-points {
    background: var(--bg-warm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 2rem;
}

.key-points h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bg-dark);
    margin-bottom: 1rem;
}

.key-points ul {
    list-style: none;
    padding: 0;
}

.key-points li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.key-points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.legal-refs {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
    border-left: 3px solid var(--bg-dark);
}

.chapter-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ============================================
   QUIZ INTERFACE
   ============================================ */

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

.quiz-header {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.quiz-progress-info {
    display: flex;
    gap: 2rem;
}

.quiz-counter {
    text-align: center;
}

.quiz-counter-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bg-dark);
}

.quiz-counter-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.quiz-timer {
    text-align: center;
}

.quiz-timer-number {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bg-dark);
}

.quiz-timer-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.question-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.question-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 2rem;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.answer-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.125rem 1.5rem;
    background: var(--bg-warm);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.answer-option:hover {
    background: var(--bg-light);
    border-color: var(--border-medium);
}

.answer-option.selected {
    background: rgba(212, 163, 71, 0.1);
    border-color: var(--accent);
}

.answer-option input {
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.answer-option-letter {
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
    flex-shrink: 0;
    min-width: 24px;
}

.answer-option-text {
    flex: 1;
    color: var(--text-dark);
    line-height: 1.5;
}

.topic-reference {
    background: var(--accent-dim);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 1.5rem;
}

.topic-reference-title {
    font-weight: 600;
    color: var(--bg-dark);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.topic-reference a {
    color: var(--bg-dark);
    text-decoration: underline;
    font-size: 0.95rem;
}

.topic-reference a:hover {
    color: var(--accent-warm);
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Quiz Lock Banner */
.quiz-lock-banner {
    background: var(--bg-white);
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    margin: 2rem 0;
}

.quiz-lock-banner.locked {
    background: var(--bg-warm);
    border-color: var(--accent);
}

.quiz-lock-banner.unlocked {
    background: var(--success-dim);
    border-color: var(--success);
    border-style: solid;
}

.quiz-lock-banner .lock-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
}

.quiz-lock-banner h2 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.quiz-lock-banner p {
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto 1rem;
}

/* ============================================
   QUIZ RESULT
   ============================================ */

.result-header {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.result-message {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.result-score {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
}

.result-score.passed {
    color: var(--success);
}

.result-score.failed {
    color: var(--danger);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--bg-darker);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-dark);
}

.footer-brand .logo-image {
    height: 64px;
    width: auto;
    margin-bottom: 0;
    /* JPG mit weißem Hintergrund -> mix-blend-mode macht weiß transparent */
    mix-blend-mode: screen;
    filter: brightness(1.5) contrast(1.2);
    background: transparent;
}

.footer-brand p {
    color: var(--text-light-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 360px;
}

.footer-col h5 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: var(--text-light-muted);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--text-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-light-muted);
    flex-wrap: wrap;
    gap: 1rem;
}

/* ============================================
   COOKIE BANNER
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 1.5rem 2rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-light-muted);
}

.cookie-banner-text strong {
    color: var(--text-light);
    display: block;
    margin-bottom: 0.25rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.cookie-banner-text a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-banner-actions .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* ============================================
   UTILITIES
   ============================================ */

.mt-xs { margin-top: 0.5rem; }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2rem; }
.mt-xl { margin-top: 3rem; }

.mb-xs { margin-bottom: 0.5rem; }
.mb-sm { margin-bottom: 1rem; }
.mb-md { margin-bottom: 1.5rem; }
.mb-lg { margin-bottom: 2rem; }
.mb-xl { margin-bottom: 3rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-sm { gap: 0.75rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }

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

.w-full { width: 100%; }

/* ============================================
   ANIMATIONS
   ============================================ */

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

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ==============================
   MOBILE OPTIMIERUNG
   ============================== */

/* === BURGER-MENU & Mobile-Items === */
/* Default: Auf Desktop unsichtbar */
.mobile-menu-toggle {
    display: none;
}

.mobile-only-nav-item {
    display: none;
}

/* Tablets */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .chapter-layout {
        grid-template-columns: 1fr;
    }
    
    .chapter-sidebar {
        position: static;
    }
    
    .container, .container-narrow {
        padding: 0 1.5rem;
    }
}

/* Smartphones (max-width: 768px) */
@media (max-width: 768px) {
    /* === LAYOUT === */
    html {
        font-size: 15px;
    }
    
    body {
        font-size: 0.95rem;
    }
    
    .container, .container-narrow {
        padding: 0 1rem;
    }
    
    .page-content {
        padding: 1.5rem 0;
    }
    
    /* === HEADER MOBILE === */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .nav-wrapper {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.75rem 1rem !important;
        gap: 0.75rem !important;
        flex-wrap: nowrap !important;
        max-width: 100% !important;
    }
    
    /* Logo kleiner */
    .logo {
        gap: 0.5rem !important;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    .logo-image {
        height: 38px !important;
    }
    
    .logo-divider {
        margin: 0 0.4rem !important;
        height: 28px !important;
    }
    
    .logo-academy {
        font-size: 1rem !important;
        white-space: nowrap;
    }
    
    /* Burger-Button sichtbar machen */
    .mobile-menu-toggle {
        display: flex !important;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        background: transparent;
        border: 1px solid var(--border-light, #e8e4dc);
        border-radius: 6px;
        padding: 0;
        cursor: pointer;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: #1a3a2e;
        border-radius: 2px;
        transition: all 0.3s;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    /* Desktop-Elemente verstecken */
    .desktop-only {
        display: none !important;
    }
    
    /* User-Menu Mobile: nur Avatar */
    .user-menu {
        display: flex !important;
        gap: 0.5rem !important;
        align-items: center;
        flex-shrink: 0;
    }
    
    .user-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.85rem !important;
    }
    
    /* Slide-In Navigation */
    .main-nav {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: #ffffff !important;
        box-shadow: -4px 0 16px rgba(0,0,0,0.15) !important;
        transition: right 0.3s ease !important;
        z-index: 9999 !important;
        padding: 4.5rem 1.25rem 2rem 1.25rem !important;
        overflow-y: auto !important;
        display: block !important;
        pointer-events: auto !important;
    }
    
    .main-nav.mobile-open {
        right: 0 !important;
    }
    
    .nav-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        pointer-events: auto !important;
    }
    
    .nav-menu li {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .nav-menu a {
        display: block !important;
        padding: 0.875rem 1rem !important;
        font-size: 1rem !important;
        border-radius: 6px !important;
        text-decoration: none !important;
        color: #2d3838 !important;
        transition: background 0.2s !important;
        position: relative !important;
        z-index: 10000 !important;
        pointer-events: auto !important;
    }
    
    .nav-menu a:hover, .nav-menu a:active {
        background: #f5f3ef !important;
        color: #1a3a2e !important;
    }
    
    .nav-menu a.active {
        background: #1a3a2e !important;
        color: #ffffff !important;
        font-weight: 600 !important;
    }
    
    .mobile-only-nav-item {
        display: block !important;
        margin-top: 0.5rem !important;
    }
    
    .mobile-only-nav-item:first-of-type {
        margin-top: 1rem !important;
        padding-top: 1rem !important;
        border-top: 1px solid #e8e4dc !important;
    }
    
    /* === HEADINGS === */
    h1 { 
        font-size: 1.75rem; 
        line-height: 1.2;
    }
    h2 { 
        font-size: 1.4rem; 
        line-height: 1.3;
    }
    h3 { 
        font-size: 1.2rem; 
    }
    h4 { 
        font-size: 1.05rem; 
    }
    
    /* === CARDS === */
    .card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .card-warm {
        padding: 1.25rem;
    }
    
    /* === BUTTONS === */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 0.4rem 0.875rem;
        font-size: 0.8rem;
    }
    
    /* === GRIDS === */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* === FOOTER === */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* === AUTH-SEITEN === */
    .auth-card {
        padding: 1.5rem 1.25rem;
        margin: 1rem;
    }
    
    .auth-card h1 {
        font-size: 1.5rem;
    }
    
    .auth-logo {
        height: 70px;
    }
    
    /* === FORMS === */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    input, select, textarea {
        font-size: 16px !important;
        padding: 0.75rem 1rem;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
    
    /* === QUIZ === */
    .quiz-container {
        padding: 0;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .quiz-progress-info {
        justify-content: space-around;
        width: 100%;
    }
    
    .quiz-counter-number {
        font-size: 1.25rem;
    }
    
    .quiz-counter-label {
        font-size: 0.7rem;
    }
    
    .question-card {
        padding: 1.25rem;
    }
    
    .question-text {
        font-size: 1.05rem;
        line-height: 1.5;
    }
    
    .answer-option {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .answer-option-letter {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .answer-option-text {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .quiz-nav {
        flex-direction: column-reverse;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .quiz-nav .btn {
        width: 100%;
    }
    
    /* === LERN-KAPITEL === */
    .chapter-content {
        padding: 1.25rem;
        font-size: 0.95rem;
    }
    
    .chapter-content h2 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .chapter-content h3 {
        font-size: 1.1rem;
    }
    
    .chapter-content ul, .chapter-content ol {
        padding-left: 1.25rem;
    }
    
    .chapter-content blockquote {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .topic-reference {
        padding: 0.75rem;
    }
    
    /* === STAT-CARDS === */
    .stat-card {
        padding: 1.25rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* === TABELLEN === */
    table {
        font-size: 0.85rem;
    }
    
    table th, table td {
        padding: 0.5rem !important;
    }
    
    /* === COOKIE-BANNER === */
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cookie-banner-actions .btn {
        width: 100%;
    }
    
    /* === HERO / LANDING === */
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* === PROGRESS === */
    .progress-bar-wrapper {
        height: 8px;
    }
    
    /* === ALERTS === */
    .alert {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    /* === QUIZ-LOCK-BANNER === */
    .quiz-lock-banner {
        padding: 1.5rem 1rem;
    }
    
    .lock-icon {
        font-size: 2.5rem;
    }
    
    /* === SPACING UTILITIES === */
    .mt-xl { margin-top: 2rem !important; }
    .mb-xl { margin-bottom: 2rem !important; }
    .mt-lg { margin-top: 1.5rem !important; }
    .mb-lg { margin-bottom: 1.5rem !important; }
}
    
    /* === HEADINGS === */
    h1 { 
        font-size: 1.75rem; 
        line-height: 1.2;
    }
    h2 { 
        font-size: 1.4rem; 
        line-height: 1.3;
    }
    h3 { 
        font-size: 1.2rem; 
    }
    h4 { 
        font-size: 1.05rem; 
    }
    
    /* === CARDS === */
    .card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .card-warm {
        padding: 1.25rem;
    }
    
    /* === BUTTONS === */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 0.4rem 0.875rem;
        font-size: 0.8rem;
    }
    
    /* === GRIDS === */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* === FOOTER === */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* === AUTH-SEITEN === */
    .auth-card {
        padding: 1.5rem 1.25rem;
        margin: 1rem;
    }
    
    .auth-card h1 {
        font-size: 1.5rem;
    }
    
    .auth-logo {
        height: 70px;
    }
    
    /* === FORMS === */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    input, select, textarea {
        font-size: 16px !important; /* Verhindert iOS-Auto-Zoom! */
        padding: 0.75rem 1rem;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
    
    /* === QUIZ === */
    .quiz-container {
        padding: 0;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .quiz-progress-info {
        justify-content: space-around;
        width: 100%;
    }
    
    .quiz-counter-number {
        font-size: 1.25rem;
    }
    
    .quiz-counter-label {
        font-size: 0.7rem;
    }
    
    .question-card {
        padding: 1.25rem;
    }
    
    .question-text {
        font-size: 1.05rem;
        line-height: 1.5;
    }
    
    .answer-option {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .answer-option-letter {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .answer-option-text {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .quiz-nav {
        flex-direction: column-reverse;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .quiz-nav .btn {
        width: 100%;
    }
    
    /* === LERN-KAPITEL === */
    .chapter-content {
        padding: 1.25rem;
        font-size: 0.95rem;
    }
    
    .chapter-content h2 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .chapter-content h3 {
        font-size: 1.1rem;
    }
    
    .chapter-content ul, .chapter-content ol {
        padding-left: 1.25rem;
    }
    
    .chapter-content blockquote {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .topic-reference {
        padding: 0.75rem;
    }
    
    /* === STAT-CARDS === */
    .stat-card {
        padding: 1.25rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* === TABELLEN === */
    table {
        font-size: 0.85rem;
    }
    
    table th, table td {
        padding: 0.5rem !important;
    }
    
    /* === COOKIE-BANNER === */
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cookie-banner-actions .btn {
        width: 100%;
    }
    
    /* === HERO / LANDING === */
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* === PROGRESS === */
    .progress-bar-wrapper {
        height: 8px;
    }
    
    /* === ALERTS === */
    .alert {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    /* === QUIZ-LOCK-BANNER === */
    .quiz-lock-banner {
        padding: 1.5rem 1rem;
    }
    
    .lock-icon {
        font-size: 2.5rem;
    }
    
    /* === SPACING UTILITIES === */
    .mt-xl { margin-top: 2rem !important; }
    .mb-xl { margin-bottom: 2rem !important; }
    .mt-lg { margin-top: 1.5rem !important; }
    .mb-lg { margin-bottom: 1.5rem !important; }
}

/* Kleine Smartphones (max-width: 480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container, .container-narrow {
        padding: 0 0.75rem;
    }
    
    /* Logo noch kleiner */
    .logo-image {
        height: 36px;
    }
    
    .logo-academy {
        font-size: 1rem;
    }
    
    .logo-divider {
        height: 28px;
        margin: 0 0.4rem;
    }
    
    /* Login/Register Buttons im Header kompakt */
    .nav-actions {
        gap: 0.4rem;
    }
    
    .nav-actions .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    
    /* Cards extra kompakt */
    .card {
        padding: 1rem;
    }
    
    /* Quiz-Antworten optimieren */
    .answer-option {
        padding: 0.75rem 0.875rem;
    }
    
    .answer-option-letter {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
    }
    
    .answer-option-text {
        font-size: 0.9rem;
    }
    
    /* Stat-Karten kleiner */
    .stat-number {
        font-size: 1.75rem;
    }
    
    /* Tabellen scrollbar machen */
    .card > div[style*="overflow-x"],
    table {
        font-size: 0.8rem;
    }
}

/* Sehr kleine Geräte (max-width: 360px) - z.B. iPhone SE 1st Gen */
@media (max-width: 360px) {
    html {
        font-size: 13.5px;
    }
    
    .nav-wrapper {
        padding: 0.625rem 0.75rem;
    }
    
    .logo-image {
        height: 32px;
    }
    
    .logo-academy {
        font-size: 0.9rem;
    }
    
    h1 { font-size: 1.35rem; }
}
