
/* ─── Design Tokens (Hand-Drawn Light = default Paper) ─── */
:root, [data-theme="paper"] {
    --font-body: 'Patrick Hand', 'Kalam', cursive, system-ui, sans-serif;
    --font-heading: 'Kalam', 'Patrick Hand', cursive, system-ui, sans-serif;

    --bg: #fdfbf7;          /* Warm Paper */
    --bg-warm: #f5efe0;
    --surface: #ffffff;
    --surface-hover: #faf6e9;
    --muted: #e5e0d8;        /* Old Paper / Erased Pencil */
    --border: #2d2d2d;       /* Soft Pencil Black */
    --border-strong: #1d1d1d;
    --text-main: #2d2d2d;
    --text-secondary: #4a4a4a;
    --text-dim: #717171;

    --accent: #ff4d4d;       /* Correction Marker Red */
    --accent-light: #ff7070;
    --accent-lighter: rgba(255, 77, 77, 0.12);
    --accent-glow: rgba(255, 77, 77, 0.22);
    --secondary: #2d5da1;    /* Blue Ballpoint Pen */
    --secondary-lighter: rgba(45, 93, 161, 0.12);

    --postit: #fff9c4;       /* Post-It yellow */
    --pencil-blue: #2d5da1;
    --marker-red: #ff4d4d;

    /* Wobbly multi-value radii — core of the hand-drawn aesthetic */
    --wobbly-1: 255px 15px 225px 15px / 15px 225px 15px 255px;
    --wobbly-2: 15px 255px 15px 225px / 225px 15px 255px 15px;
    --wobbly-3: 30px 8px 24px 8px / 10px 26px 8px 30px;
    --wobbly-4: 18px 22px 16px 24px / 22px 16px 24px 18px;
    --wobbly-circle: 50% 48% 52% 46% / 45% 55% 45% 55%;
    --radius-full: var(--wobbly-circle);
    --radius-sm: var(--wobbly-3);
    --radius-md: var(--wobbly-1);
    --radius-lg: var(--wobbly-1);
    --radius-xl: var(--wobbly-1);

    /* Hard offset shadows — NO blur */
    --shadow-sm: 2px 2px 0px 0px var(--border);
    --shadow-md: 4px 4px 0px 0px var(--border);
    --shadow-lg: 8px 8px 0px 0px var(--border);
    --shadow-xl: 12px 12px 0px 0px var(--border);

    --transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
                  box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1),
                  background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    --transition-fast: all 0.12s ease;
}

/* ─── Hand-Drawn DARK (paper-dark) ─────────────────────────
   Warm inverted hand-drawn: dark cream + paper, wobbly radii
   stay visible, accents stay warm, borders light & chalky. */
[data-theme="paper-dark"] {
    --bg: #1c1a17;
    --bg-warm: #2a2622;
    --surface: #2c2924;
    --surface-hover: #3a362f;
    --muted: #423d36;
    --border: #e8e3d8;          /* chalky white pencil */
    --border-strong: #ffffff;
    --text-main: #fcf9f2;
    --text-secondary: #dcd7cc;
    --text-dim: #999388;

    --accent: #ff6b6b;          /* warm correction marker */
    --accent-light: #ff8e8e;
    --accent-lighter: rgba(255, 107, 107, 0.18);
    --accent-glow: rgba(255, 107, 107, 0.30);
    --secondary: #6ea8ff;
    --secondary-lighter: rgba(110, 168, 255, 0.15);
    --postit: #3d3a35;          /* dimmed post-it */

    /* Wobbly radii stay inherited from :root for hand-drawn feel */
    --wobbly-1: var(--wobbly-1);
    --wobbly-2: var(--wobbly-2);
    --wobbly-3: var(--wobbly-3);
    --wobbly-4: var(--wobbly-4);
    --wobbly-circle: 50% 48% 52% 46% / 45% 55% 45% 55%;

    /* Strong offset shadows — visible on dark backgrounds */
    --shadow-sm: 2px 2px 0px 0px var(--border);
    --shadow-md: 4px 4px 0px 0px var(--border);
    --shadow-lg: 8px 8px 0px 0px var(--border);
    --shadow-xl: 12px 12px 0px 0px var(--border);
    --shadow-inset: inset 2px 2px 0 0 #ffffff22;
    --shadow-glow: var(--shadow-md);
}

/* ─── Neumorphism (Soft UI) DARK (neuromorph-dark) ─────────
   Cool slate surface, NO borders (molded by opposing shadows),
   inherited friendly rounded radii from the light mode. Insets
   are dark-on-dark so the pressable depth still reads. */
[data-theme="neuromorph-dark"] {
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'DM Sans', system-ui, sans-serif;

    --bg: #1f2230;
    --bg-warm: #1f2230;
    --surface: #242838;
    --surface-hover: #2a2e40;
    --muted: #303446;
    --border: transparent;
    --border-strong: transparent;
    --text-main: #e7e9f1;
    --text-secondary: #a8acc0;
    --text-dim: #717686;

    --accent: #8b84ff;
    --accent-light: #a39dff;
    --accent-lighter: rgba(139, 132, 255, 0.15);
    --accent-glow: rgba(139, 132, 255, 0.28);
    --secondary: #4fd1c5;
    --secondary-lighter: rgba(79, 209, 197, 0.12);
    --postit: #2a2e40;

    /* Same friendly rounded radii as light Soft UI */
    --wobbly-1: 32px;
    --wobbly-2: 24px;
    --wobbly-3: 20px;
    --wobbly-4: 16px;
    --wobbly-circle: 50%;
    --radius-full: 9999px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* Dark inset/outset so the molded cards stay legible */
    --shadow-sm: 5px 5px 12px rgba(8, 9, 14, 0.65), -5px -5px 12px rgba(56, 60, 78, 0.55);
    --shadow-md: 9px 9px 18px rgba(8, 9, 14, 0.65), -9px -9px 18px rgba(56, 60, 78, 0.55);
    --shadow-lg: 12px 12px 24px rgba(8, 9, 14, 0.65), -12px -12px 24px rgba(56, 60, 78, 0.55);
    --shadow-xl: 16px 16px 28px rgba(8, 9, 14, 0.65), -16px -16px 28px rgba(56, 60, 78, 0.55);
    --shadow-inset:     inset 5px 5px 10px rgba(8, 9, 14, 0.7), inset -5px -5px 10px rgba(56, 60, 78, 0.6);
    --shadow-inset-deep:inset 10px 10px 20px rgba(8, 9, 14, 0.7), inset -10px -10px 20px rgba(56, 60, 78, 0.6);
    --shadow-inset-small:inset 3px 3px 6px rgba(8, 9, 14, 0.7), inset -3px -3px 6px rgba(56, 60, 78, 0.6);
    --shadow-glow: var(--shadow-md);

    --transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, background 0.3s ease, color 0.3s ease;
    --transition-fast: all 0.18s ease-out;
}

/* ─── 90s Retro DARK (win95-amber) ─────────────────────────
   CRT amber phosphor: amber text on near-black, monospace,
   square corners, no bevel on the outside but a clean amber
   outline keeps cards readable. No wiggle. */
[data-theme="win95-amber"] {
    --font-body: 'Courier New', 'Lucida Console', 'VT323', monospace;
    --font-heading: 'Courier New', 'Lucida Console', monospace;

    --bg: #0a0700;
    --bg-warm: #0a0700;
    --surface: #000000;
    --surface-hover: #1a0d00;
    --muted: #332200;
    --border: #ffaa00;
    --border-strong: #ffcc00;
    --text-main: #ffaa00;
    --text-secondary: #cc8800;
    --text-dim: #664400;

    --accent: #ffaa00;
    --accent-light: #ffcc00;
    --accent-lighter: rgba(255, 170, 0, 0.15);
    --accent-glow: rgba(255, 170, 0, 0.35);
    --secondary: #ff8000;
    --secondary-lighter: rgba(255, 128, 0, 0.15);
    --postit: #1a0d00;

    /* Force square corners — terminal aesthetic */
    --wobbly-1: 0;
    --wobbly-2: 0;
    --wobbly-3: 0;
    --wobbly-4: 0;
    --wobbly-circle: 0;
    --radius-full: 0;
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;
    --radius-xl: 0;

    --shadow-sm: 0 0 8px rgba(255, 170, 0, 0.18);
    --shadow-md: 0 0 14px rgba(255, 170, 0, 0.25);
    --shadow-lg: 0 0 22px rgba(255, 170, 0, 0.35);
    --shadow-xl: 0 0 32px rgba(255, 170, 0, 0.45);
    --shadow-inset: inset 0 0 14px rgba(255, 170, 0, 0.15);
    --shadow-glow: 0 0 12px rgba(255, 170, 0, 0.4);

    --transition: none;
    --transition-fast: none;
}

/* ─── Synthwave DARK (synthwave) ─────────────────────────
   Modern, clean OLED dark website (was the previous unified
   OLED standard). Friendly readable blue accent, system-ui
   font, gentle modern radii and soft modern shadows. */
[data-theme="synthwave"] {
    --bg: #0f1216;
    --bg-warm: #0f1216;
    --surface: #171a21;
    --surface-hover: #222630;
    --muted: #1c2028;
    --border: #3b4252;
    --border-strong: #4c566a;
    --text-main: #e7e9ee;
    --text-secondary: #b8bcc4;
    --text-dim: #7a8190;

    --accent: #4ea3ff;
    --accent-light: #7cb9ff;
    --accent-lighter: rgba(78, 163, 255, 0.15);
    --accent-glow: rgba(78, 163, 255, 0.25);
    --secondary: #5ee0ad;
    --secondary-lighter: rgba(94, 224, 173, 0.15);
    --postit: #222630;

    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --wobbly-1: 10px;
    --wobbly-2: 10px;
    --wobbly-3: 8px;
    --wobbly-4: 8px;
    --wobbly-circle: 50%;
    --radius-full: 9999px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.5);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.6);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.6);
    --shadow-inset: inset 0 2px 4px rgba(0,0,0,0.4);
    --shadow-inset-deep: inset 0 4px 8px rgba(0,0,0,0.6);
    --shadow-inset-small: inset 0 1px 2px rgba(0,0,0,0.4);
    --shadow-glow: var(--shadow-md);

    --transition: all 0.2s ease;
    --transition-fast: all 0.1s ease;
}

/* ─── Neumorphism (Soft UI) Theme — LIGHT only — ─── */
[data-theme="neuromorph"] {
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'DM Sans', system-ui, sans-serif;

    --bg: #E0E5EC;          /* Cool clay surface */
    --bg-warm: #E0E5EC;
    --surface: #E0E5EC;
    --surface-hover: #dde2eb;
    --muted: #c9d1de;
    --border: transparent;
    --border-strong: transparent;
    --text-main: #3D4852;
    --text-secondary: #4A5664;
    --text-dim: #6B7280;

    --accent: #6C63FF;
    --accent-light: #8B84FF;
    --accent-lighter: rgba(108, 99, 255, 0.10);
    --accent-glow: rgba(108, 99, 255, 0.25);
    --secondary: #38B2AC;
    --secondary-lighter: rgba(56, 178, 172, 0.10);
    --postit: #E0E5EC;

    /* Replace wobbly radii with friendly, soft Hyper-Rounded corners */
    --wobbly-1: 32px;
    --wobbly-2: 24px;
    --wobbly-3: 20px;
    --wobbly-4: 16px;
    --wobbly-circle: 50%;
    --radius-full: 9999px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-sm: 5px 5px 10px rgb(163,177,198,0.6), -5px -5px 10px rgba(255,255,255,0.5);
    --shadow-md: 9px 9px 16px rgb(163,177,198,0.6), -9px -9px 16px rgba(255,255,255,0.5);
    --shadow-lg: 12px 12px 20px rgb(163,177,198,0.7), -12px -12px 20px rgba(255,255,255,0.6);
    --shadow-xl: 16px 16px 24px rgb(163,177,198,0.7), -16px -16px 24px rgba(255,255,255,0.6);
    --shadow-inset: inset 6px 6px 10px rgb(163,177,198,0.6), inset -6px -6px 10px rgba(255,255,255,0.5);
    --shadow-inset-deep: inset 10px 10px 20px rgb(163,177,198,0.7), inset -10px -10px 20px rgba(255,255,255,0.6);
    --shadow-inset-small: inset 3px 3px 6px rgb(163,177,198,0.6), inset -3px -3px 6px rgba(255,255,255,0.5);
    --shadow-glow: var(--shadow-md);

    --transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, background 0.3s ease, color 0.3s ease;
    --transition-fast: all 0.18s ease-out;
}

/* ─── 90s Retro (Windows 95 Silver) — classic system grey, bevels everywhere ─ */
[data-theme="win95-silver"] {
    --font-body: 'MS Sans Serif', 'MS Sans Serif 8-bit', 'Tahoma', 'Geneva', sans-serif;
    --font-heading: 'Arial Black', 'Impact', 'Haettenschweiler', sans-serif;

    --bg: #c0c0c0;
    --bg-warm: #c0c0c0;
    --surface: #c0c0c0;
    --surface-hover: #d4d4d4;
    --muted: #808080;
    --border: #000000;
    --border-strong: #ffffff;
    --text-main: #000000;
    --text-secondary: #000000;
    --text-dim: #404040;

    --accent: #0000ff;
    --accent-light: #4040ff;
    --accent-lighter: rgba(0, 0, 255, 0.15);
    --accent-glow: rgba(0, 0, 255, 0.22);
    --secondary: #008000;
    --secondary-lighter: rgba(0, 128, 0, 0.12);
    --postit: #ffffcc;

    /* Force square corners everywhere */
    --wobbly-1: 0;
    --wobbly-2: 0;
    --wobbly-3: 0;
    --wobbly-4: 0;
    --wobbly-circle: 0;
    --radius-full: 0;
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;
    --radius-xl: 0;

    --shadow-sm: inset -1px -1px 0 #0a0a0a, inset 1px 1px 0 #ffffff,
                 inset -2px -2px 0 #808080, inset 2px 2px 0 #dfdfdf;
    --shadow-md: var(--shadow-sm);
    --shadow-lg: var(--shadow-sm);
    --shadow-xl: var(--shadow-sm);
    --shadow-inset: inset 1px 1px 0 #808080, inset -1px -1px 0 #ffffff,
                    inset 2px 2px 0 #404040, inset -2px -2px 0 #dfdfdf;
    --shadow-inset-deep: var(--shadow-inset);
    --shadow-inset-small: var(--shadow-inset);

    --transition: none;
    --transition-fast: none;
}

/* ───── Soft UI overrides (light + dark via ^="neuromorph") ─────
   Neumorphism sowohl im Light als auch im Dark teilen sich dieselbe
   Structural-Sprache: keine Borders, molded Inset-Shadows, runde
   Radien, freundliche Hover-Lifts. Family-aggregating via ^=. */
[data-theme^="neuromorph"] body { background-image: none; }
[data-theme^="neuromorph"] .bg-decoration,
[data-theme^="neuromorph"] .bg-doodle { display: none; }
[data-theme^="neuromorph"] nav,
[data-theme^="neuromorph"] .mobile-nav,
[data-theme^="neuromorph"] .lang-dropdown-menu { border-color: transparent; }
[data-theme^="neuromorph"] .footer-inner { border-top: none; }
[data-theme^="neuromorph"] .form-control {
    box-shadow: var(--shadow-inset);
    border-color: transparent;
}
[data-theme^="neuromorph"] .form-control:focus {
    border-color: transparent;
    box-shadow: var(--shadow-inset-deep), 0 0 0 3px var(--accent-lighter);
    outline: none;
}
[data-theme^="neuromorph"] .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}
[data-theme^="neuromorph"] .btn:active {
    transform: translateY(0.5px);
    box-shadow: var(--shadow-inset-small);
}
[data-theme^="neuromorph"] .settings-card::before,
[data-theme^="neuromorph"] .auth-container::before,
[data-theme^="neuromorph"] .auth-container::after { display: none; }
[data-theme^="neuromorph"] .card,
[data-theme^="neuromorph"] .option-card,
[data-theme^="neuromorph"] .setting-action,
[data-theme^="neuromorph"] .info-item { transform: none; }
[data-theme^="neuromorph"] .card:hover,
[data-theme^="neuromorph"] .option-card:hover,
[data-theme^="neuromorph"] .setting-action:hover,
[data-theme^="neuromorph"] .info-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
[data-theme^="neuromorph"] .option-card.active {
    background: var(--surface-hover);
}
[data-theme="neuromorph"] .option-card.active { background: #dde2eb; }

/* ───── 90s Retro LIGHT overrides (win95-silver) ─────
   Klassischer silberner Windows-95 Look, navy bevels. */
[data-theme="win95-silver"] body {
    background-image: linear-gradient(45deg, #b0b0b0 25%, transparent 25%),
                      linear-gradient(-45deg, #b0b0b0 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #b0b0b0 75%),
                      linear-gradient(-45deg, transparent 75%, #b0b0b0 75%);
    background-size: 4px 4px;
    background-position: 0 0, 0 2px, 2px -2px, -2px 0;
    letter-spacing: 0;
}
[data-theme="win95-silver"] .bg-decoration { display: none; }
[data-theme="win95-silver"] nav,
[data-theme="win95-silver"] .mobile-nav,
[data-theme="win95-silver"] .lang-dropdown-menu { border-radius: 0; }
[data-theme="win95-silver"] nav {
    background: var(--bg);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: none;
    top: 12px;
}
[data-theme="win95-silver"] .mobile-nav {
    background: var(--bg);
    border-left: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}
[data-theme="win95-silver"] .footer-inner { border-top: 2px solid #808080; }
[data-theme="win95-silver"] .form-control {
    border-radius: 0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
    background: #ffffff;
    color: #000000;
}
[data-theme="win95-silver"] .btn {
    border-radius: 0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
[data-theme="win95-silver"] .btn:hover { transform: none; }
[data-theme="win95-silver"] .btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
    box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
    transform: translate(1px, 1px);
}
[data-theme="win95-silver"] .settings-card::before,
[data-theme="win95-silver"] .auth-container::before,
[data-theme="win95-silver"] .auth-container::after { display: none; }
[data-theme="win95-silver"] .option-card,
[data-theme="win95-silver"] .design-preview { transform: none; border-radius: 0; }
[data-theme="win95-silver"] .option-card:hover { transform: none; background: #d4d4d4; }
[data-theme="win95-silver"] .option-card.active {
    background: var(--accent-lighter);
    border-color: var(--accent);
    border-radius: 0;
    transform: none;
}
[data-theme="win95-silver"] .option-card.active::after {
    border-radius: 0;
    box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff,
                inset -2px -2px #808080, inset 2px 2px #dfdfdf;
    width: 24px; height: 24px; top: -8px; right: -8px;
}
[data-theme="win95-silver"] .design-preview {
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: none;
}
[data-theme="win95-silver"] .design-banner,
[data-theme="win95-silver"] .notif-badge { border-radius: 0; }

/* ───── 90s Retro DARK overrides (win95-amber) ─────
   CRT amber phosphor terminal: monospace, eckig, amber glow. */
[data-theme="win95-amber"] body {
    background-image: radial-gradient(ellipse at center,
                      rgba(255, 170, 0, 0.08) 0%,
                      rgba(255, 170, 0, 0.02) 40%,
                      transparent 70%);
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-main);
    letter-spacing: 0;
}
[data-theme="win95-amber"] .bg-decoration,
[data-theme="win95-amber"] .bg-doodle { display: none; }
[data-theme="win95-amber"] nav,
[data-theme="win95-amber"] .mobile-nav,
[data-theme="win95-amber"] .lang-dropdown-menu { border-radius: 0; }
[data-theme="win95-amber"] nav {
    background: var(--surface);
    border-style: solid;
    border-color: var(--border);
    border-radius: 0;
    border-width: 2px;
    box-shadow: var(--shadow-md);
    top: 12px;
}
[data-theme="win95-amber"] .mobile-nav {
    background: var(--surface);
    border-left: 2px solid var(--border);
}
[data-theme="win95-amber"] .footer-inner { border-top: 1px solid var(--border); }
[data-theme="win95-amber"] .form-control {
    border-radius: 0;
    background: var(--surface);
    color: var(--text-main);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-inset);
}
[data-theme="win95-amber"] .form-control:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: var(--shadow-glow), 0 0 0 2px var(--accent-lighter);
}
[data-theme="win95-amber"] .btn {
    border-radius: 0;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: none;
}
[data-theme="win95-amber"] .btn:hover {
    transform: none;
    background: var(--surface-hover);
    box-shadow: var(--shadow-glow);
}
[data-theme="win95-amber"] .btn:active {
    transform: none;
    box-shadow: var(--shadow-inset);
}
[data-theme="win95-amber"] .settings-card::before,
[data-theme="win95-amber"] .auth-container::before,
[data-theme="win95-amber"] .auth-container::after { display: none; }
[data-theme="win95-amber"] .option-card,
[data-theme="win95-amber"] .design-preview { transform: none; border-radius: 0; }
[data-theme="win95-amber"] .option-card:hover { background: var(--surface-hover); }
[data-theme="win95-amber"] .option-card.active {
    background: var(--accent-lighter);
    border-color: var(--border-strong);
    border-radius: 0;
    transform: none;
}
[data-theme="win95-amber"] .option-card.active::after {
    border-radius: 0;
    box-shadow: 0 0 12px var(--accent-glow);
    width: 24px; height: 24px; top: -8px; right: -8px;
    border: 2px solid var(--border-strong);
}
[data-theme="win95-amber"] .design-preview {
    border: 2px solid var(--border);
    box-shadow: var(--shadow-glow);
}
[data-theme="win95-amber"] .design-banner,
[data-theme="win95-amber"] .notif-badge { border-radius: 0; }

/* ───── Hand-Drawn DARK overrides (paper-dark) ─────
   Dark cream + paper character bleibt erhalten: bg-doodles
   sichtbar, wackelnde Marker-Hover, sichtbare chalky Borders.
   "Bessere Borders" heisst hier: chalky #e8e3d8 hell auf dunkel. */
[data-theme="paper-dark"] .footer-inner { border-top: 2px dashed var(--border); }
[data-theme="paper-dark"] .design-preview { box-shadow: var(--shadow-sm); }

/* ───── Synthwave DARK overrides (synthwave) ─────
   Modern clean OLED: no neon, no warm-but-wackel. No bg-doodles,
   simple modern shadows, footer gets a clean solid rule. */
[data-theme="synthwave"] body { background-image: none !important; }
[data-theme="synthwave"] .bg-decoration,
[data-theme="synthwave"] .bg-doodle { display: none !important; }
[data-theme="synthwave"] .settings-card::before,
[data-theme="synthwave"] .auth-container::before,
[data-theme="synthwave"] .auth-container::after { display: none !important; }
[data-theme="synthwave"] nav {
    border-style: solid;
    border-color: var(--border);
    border-width: 1px;
    box-shadow: none;
}
[data-theme="synthwave"] .brand:hover,
[data-theme="synthwave"] .icon-btn:hover,
[data-theme="synthwave"] .mobile-nav-link:hover,
[data-theme="synthwave"] .nav-links a:hover,
[data-theme="synthwave"] .footer-links a:hover,
[data-theme="synthwave"] .btn:hover { transform: none; }
[data-theme="synthwave"] .icon-btn:hover {
    background: var(--surface-hover);
    box-shadow: none;
    border-color: transparent;
}
[data-theme="synthwave"] .footer-inner { border-top: 1px solid var(--border); }
[data-theme="synthwave"] .notif-toast {
    border-radius: var(--radius-md);
    transform: none;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    background-image: radial-gradient(var(--muted) 1px, transparent 1px);
    background-size: 24px 24px;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand { font-family: var(--font-heading); letter-spacing: -0.3px; }
h1 { font-size: clamp(2rem, 4.2vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

ul, ol { list-style: none; }

/* ─── Lucide icons: heavier strokes for marker feel ─── */
svg.lucide, [data-lucide] {
    stroke-width: 2.5px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ─── Background Decoration: replaced with subtle dots (no blobs) ─── */
.bg-decoration {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
    overflow: hidden;
}

.bg-doodle {
    position: absolute;
    opacity: 0.12;
    color: var(--text-dim);
    font-family: var(--font-heading);
    font-weight: 700;
    user-select: none;
    pointer-events: none;
}
.bg-doodle-1 { top: 8%; left: 4%;  transform: rotate(-8deg);  font-size: 28px; }
.bg-doodle-2 { top: 30%; right: 6%; transform: rotate(6deg);   font-size: 22px; }
.bg-doodle-3 { bottom: 12%; left: 8%; transform: rotate(-4deg); font-size: 26px; }
.bg-doodle-4 { bottom: 22%; right: 10%; transform: rotate(10deg); font-size: 20px; }

/* ─── Navbar (hand-drawn pill) ─── */
nav {
    position: fixed; top: 16px; left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1200px;
    min-height: 64px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 22px;
    background: var(--surface);
    border: 2.5px solid var(--border);
    border-radius: var(--wobbly-1);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: var(--transition);
}

.brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.5px;
    color: var(--text-main);
    display: flex; align-items: center; gap: 10px;
}
.brand:hover { color: var(--accent); transform: rotate(-1deg); }

.brand-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--border);
    border-radius: var(--wobbly-circle);
    background: var(--postit);
    box-shadow: 2px 2px 0 0 var(--border);
    padding: 4px;
}
.brand-icon img { width: 100%; height: 100%; border-radius: 50%; }

.nav-right { display: flex; align-items: center; gap: 4px; }

.nav-links { display: flex; gap: 2px; margin-right: 6px; flex-wrap: wrap; }
.nav-links a {
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    padding: 7px 12px;
    border-radius: var(--wobbly-3);
    transition: var(--transition-fast);
    position: relative;
    text-decoration: none;
}
.nav-links a:hover {
    color: var(--accent);
    background: var(--accent-lighter);
    transform: translateY(-1px);
}
.nav-links a.active {
    color: var(--accent);
    background: var(--accent-lighter);
}

.icon-btn {
    background: transparent;
    border: 2px solid transparent;
    width: 42px; height: 42px;
    border-radius: var(--wobbly-circle);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}
.icon-btn:hover {
    background: var(--postit);
    color: var(--text-main);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
    transform: rotate(-6deg);
}

.notif-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--accent);
    color: #ffffff; font-size: 11px; font-weight: 700;
    font-family: var(--font-heading);
    min-width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-radius: var(--wobbly-circle);
    display: flex; align-items: center; justify-content: center;
    padding: 0 5px;
    box-shadow: 2px 2px 0 0 var(--border);
}

.menu-toggle { display: none; }

/* ─── Mobile Nav Overlay ─── */
.overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(45, 45, 45, 0.32);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1500;
}
.overlay.active { opacity: 1; pointer-events: all; }

.mobile-nav {
    position: fixed; top: 0; right: -100%;
    width: 320px; height: 100vh;
    background: var(--surface);
    border-left: 3px solid var(--border);
    z-index: 2000;
    padding: 28px 22px;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; gap: 6px;
    box-shadow: var(--shadow-lg);
}
.mobile-nav.open { right: 0; }

.mobile-nav-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; padding-bottom: 14px;
    border-bottom: 2px dashed var(--border);
}

.mobile-nav-link {
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    padding: 13px 14px;
    border-radius: var(--wobbly-3);
    display: flex; align-items: center; gap: 14px;
    transition: var(--transition-fast);
    border: 2px solid transparent;
}
.mobile-nav-link:hover {
    background: var(--postit);
    color: var(--text-main);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
    transform: translateX(-3px);
}

/* ─── Container ─── */
.container {
    position: relative; z-index: 1;
    max-width: 1140px;
    margin: 0 auto;
    padding: 116px 24px 60px;
}

/* ─── Buttons ─── */
.btn {
    padding: 11px 22px;
    border-radius: var(--wobbly-2);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2.5px solid var(--border);
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    line-height: 1.2;
}
.btn:hover {
    transform: translate(-2px, -2px) rotate(-1deg);
    box-shadow: var(--shadow-md);
    color: var(--text-main);
}
.btn:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}
.btn:active {
    transform: translate(2px, 2px) rotate(0);
    box-shadow: none;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    border-color: var(--border);
}
.btn-primary:hover {
    background: var(--accent);
    color: #ffffff;
    transform: translate(-2px, -2px) rotate(-1.5deg);
    box-shadow: var(--shadow-md);
}
.btn-primary:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.btn-secondary {
    background: var(--secondary);
    color: #ffffff;
    font-family: var(--font-heading);
    border-color: var(--border);
}
.btn-secondary:hover { color: #ffffff; }

.btn-danger {
    background: var(--surface);
    color: var(--accent);
    border-color: var(--border);
}
.btn-danger:hover {
    background: var(--accent);
    color: #ffffff;
}

/* ─── Form ─── */
.form-control {
    background: var(--surface);
    border: 2.5px solid var(--border);
    border-radius: var(--wobbly-3);
    padding: 13px 16px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.05rem;
    transition: var(--transition-fast);
    width: 100%;
    box-shadow: var(--shadow-sm);
}
.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    background: var(--surface);
    box-shadow: var(--shadow-sm), 0 0 0 4px var(--secondary-lighter);
}
.form-control::placeholder {
    color: var(--text-dim);
    opacity: 0.7;
    font-style: italic;
}

textarea.form-control { resize: vertical; min-height: 90px; }

/* ─── Post-it utility ─── */
.postit {
    background: var(--postit);
    border: 2px solid var(--border);
    border-radius: var(--wobbly-1);
    box-shadow: var(--shadow-md);
}

/* ─── Notification Toasts ─── */
#notif-toast-container {
    position: fixed; top: 96px; right: 20px;
    z-index: 9999;
    display: flex; flex-direction: column; gap: 12px;
    pointer-events: none;
}
.notif-toast {
    background: var(--surface);
    border: 2.5px solid var(--border);
    padding: 14px 18px;
    border-radius: var(--wobbly-1);
    box-shadow: var(--shadow-md);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 15px;
    min-width: 260px;
    transition: all 0.4s ease;
    pointer-events: auto;
    transform: rotate(-1deg);
}

/* ─── Footer ─── */
footer {
    position: relative; z-index: 1;
    margin-top: 48px;
    padding: 56px 24px 36px;
    text-align: center;
}
.footer-inner {
    width: 100%;
    margin: 0 auto;
    padding-top: 32px;
    border-top: 3px dashed var(--border);
}
.footer-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 26px;
    color: var(--text-main);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}
.footer-text {
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.6;
    font-family: var(--font-body);
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-dim);
    font-size: 15px;
    font-weight: 400;
    font-family: var(--font-body);
    transition: var(--transition-fast);
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 4px;
}
.footer-links a:hover {
    color: var(--accent);
    text-decoration-style: solid;
    transform: rotate(-1deg);
}

/* ─── Animations ─── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes wiggle {
    0%, 100% { transform: rotate(0); }
    25%      { transform: rotate(-1.5deg); }
    75%      { transform: rotate(1.5deg); }
}
.animate-in {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .bg-doodle { animation: none !important; }
}

/* ─── Navbar Language Switcher (compact dropdown) ─── */
.nav-lang-wrap { position: relative; }

.navbar-lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    max-height: 360px;
    overflow-y: auto;
    background: var(--surface);
    border: 2.5px solid var(--border);
    border-radius: var(--wobbly-2);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) rotate(-1deg);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1100;
    padding: 6px;
}
.nav-lang-wrap.open .navbar-lang-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) rotate(0);
}
.navbar-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.98rem;
    text-align: left;
    border-radius: var(--wobbly-3);
    transition: var(--transition-fast);
}
.navbar-lang-option:hover {
    background: var(--accent-lighter);
    color: var(--accent);
    transform: translateX(3px);
}
.navbar-lang-option.active {
    background: var(--postit);
    color: var(--text-main);
    font-weight: 700;
}
.navbar-lang-option .flag { font-size: 19px; line-height: 1; }
.navbar-lang-option .native { flex: 1; }
.navbar-lang-option .iso {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 2px 7px;
    border: 1.5px solid var(--border);
    border-radius: 9999px;
    background: var(--surface);
}
.navbar-lang-option.active .iso {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--border);
}

/* Mobile-nav language badge style */
.mobile-lang-badge {
    margin-left: auto;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    border: 1.5px solid var(--border);
    border-radius: 9999px;
    background: var(--postit);
    color: var(--text-main);
    box-shadow: 1px 1px 0 0 var(--border);
}

/* Mobile language inline list (collapsible sub-menu) */
.mobile-nav-lang-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mobile-nav-lang-block > .mobile-nav-link {
    width: 100%;
    background: transparent;
    border: 2px solid transparent;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-body);
    color: var(--text-main);
}
.mobile-nav-lang-block.open > .mobile-nav-link {
    background: var(--postit);
    border-color: var(--border);
}
.mobile-nav-lang-block .chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}
.mobile-nav-lang-block.open .chevron {
    transform: rotate(180deg);
}
.mobile-nav-lang-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 36px;
}
.mobile-nav-lang-block.open .mobile-nav-lang-list {
    max-height: 420px;
    overflow-y: auto;
    transition: max-height 0.35s ease;
}
.mobile-nav-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 14px;
    border: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    text-align: left;
    border-radius: var(--wobbly-3);
    transition: var(--transition-fast);
}
.mobile-nav-option:hover {
    background: var(--accent-lighter);
    color: var(--accent);
    transform: translateX(3px);
}
.mobile-nav-option.active {
    background: var(--postit);
    border-color: var(--border);
    color: var(--text-main);
    font-weight: 700;
}
.mobile-nav-option .flag { font-size: 18px; line-height: 1; }
.mobile-nav-option .native { flex: 1; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-toggle { display: flex; }
    nav { padding: 8px 14px; width: calc(100% - 20px); top: 10px; }
    .container { padding-top: 104px; padding-left: 16px; padding-right: 16px; }
    .bg-doodle-1, .bg-doodle-2, .bg-doodle-3, .bg-doodle-4 { font-size: 18px; }
}
