/* MindCloud: Designsystem */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #07080d;
  --bg-2: #0c0e16;
  --surface: #11141f;
  --surface-2: #171b29;
  --surface-3: #1e2335;
  --border: #23283b;
  --border-strong: #31374f;
  --text: #eef0f8;
  --text-2: #b4b9cf;
  --muted: #7d839e;
  --brand: #8b5cf6;
  --brand-2: #22d3ee;
  --brand-3: #f472b6;
  --brand-ink: #c4b5fd;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(34, 211, 238, 0.1));
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 40px -12px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px rgba(139, 92, 246, 0.35), 0 10px 40px -10px rgba(139, 92, 246, 0.55);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --container: 1180px;
  --header-h: 68px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-2: #eef0f7;
  --surface: #ffffff;
  --surface-2: #f6f7fc;
  --surface-3: #eceef6;
  --border: #e3e6f0;
  --border-strong: #cfd4e4;
  --text: #11131c;
  --text-2: #444a63;
  --muted: #6b7190;
  --brand-ink: #6d28d9;
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(34, 211, 238, 0.08));
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px -16px rgba(16, 24, 40, 0.18);
  --shadow-glow: 0 0 0 1px rgba(139, 92, 246, 0.3), 0 10px 30px -12px rgba(139, 92, 246, 0.45);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --bg: #f6f7fb;
    --bg-2: #eef0f7;
    --surface: #ffffff;
    --surface-2: #f6f7fc;
    --surface-3: #eceef6;
    --border: #e3e6f0;
    --border-strong: #cfd4e4;
    --text: #11131c;
    --text-2: #444a63;
    --muted: #6b7190;
    --brand-ink: #6d28d9;
    --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(34, 211, 238, 0.08));
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px -16px rgba(16, 24, 40, 0.18);
    --shadow-glow: 0 0 0 1px rgba(139, 92, 246, 0.3), 0 10px 30px -12px rgba(139, 92, 246, 0.45);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(700px 420px at -10% 10%, rgba(34, 211, 238, 0.1), transparent 60%),
    radial-gradient(600px 400px at 50% 110%, rgba(244, 114, 182, 0.07), transparent 60%);
}

img,
svg,
video {
  max-width: 100%;
}

a {
  color: var(--brand-ink);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  font-weight: 750;
}
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.2rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .small { font-size: 0.875rem; }
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-3);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
}
.icon-lg { width: 1.6em; height: 1.6em; }
.icon-xl { width: 2.4em; height: 2.4em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow { max-width: 760px; }
.container-xs { max-width: 460px; }

main {
  flex: 1;
  padding: 32px 0 72px;
}

.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 0.85em; word-break: break-all; }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 28px; }
.mt-4 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 28px; }

/* ------------------------------------------------------------------ Header */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
}
.skip-link:focus { left: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.12rem;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--grad);
  box-shadow: 0 6px 20px -6px rgba(139, 92, 246, 0.8);
  color: #fff;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand .brand-sub { color: var(--brand-ink); font-weight: 650; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav a {
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 550;
  font-size: 0.95rem;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav .nav-theme { display: none; }
h1 .badge { font-size: 0.8rem; padding: 3px 10px; }
.nav .badge-soon {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--grad-soft);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--brand-ink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.nav-toggle { display: none; }

.user-menu { position: relative; }
.user-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  background: var(--surface);
}
.user-menu summary::-webkit-details-marker { display: none; }
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 0.85rem;
  color: #fff;
  background: var(--grad);
  text-transform: uppercase;
}
.user-menu .menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.menu a,
.menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--text-2);
  font: inherit;
  font-size: 0.93rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.menu a:hover,
.menu button:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.menu .menu-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu .menu-head strong { display: block; }

.announcement {
  background: var(--grad);
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 550;
  padding: 8px 16px;
}

.guest-nudge {
  border-bottom: 1px solid var(--border);
  background: var(--grad-soft);
  font-size: 0.9rem;
}
.guest-nudge .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 9px;
  padding-bottom: 9px;
  color: var(--text-2);
}
.guest-nudge a { font-weight: 650; }

/* ------------------------------------------------------------------ Buttons */

.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  --btn-border: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none !important;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn[disabled],
.btn.disabled { opacity: 0.5; pointer-events: none; }
.btn-primary {
  --btn-bg: var(--grad);
  --btn-fg: #fff;
  --btn-border: transparent;
  background: var(--grad);
  box-shadow: 0 8px 24px -10px rgba(139, 92, 246, 0.9);
}
.btn-primary:hover { box-shadow: 0 10px 30px -8px rgba(139, 92, 246, 1); border-color: transparent; }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-danger { --btn-bg: rgba(248, 113, 113, 0.1); --btn-fg: var(--danger); --btn-border: rgba(248, 113, 113, 0.35); }
.btn-danger:hover { --btn-bg: rgba(248, 113, 113, 0.18); border-color: var(--danger); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 0.86rem; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 34px; }

/* ------------------------------------------------------------------ Karten */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card-tight { padding: 16px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-head h2,
.card-head h3 { margin: 0; }
.card-glow {
  position: relative;
  border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(34, 211, 238, 0.6)) border-box;
  border: 1px solid transparent;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }

/* ------------------------------------------------------------------ Hero */

.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 22px;
}
.hero .eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
}
.hero h1 { max-width: 900px; margin: 0 auto 18px; }
.hero .lead {
  max-width: 640px;
  margin: 0 auto 30px;
  font-size: 1.15rem;
  color: var(--text-2);
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 44px;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero-stats strong { display: block; color: var(--text); font-size: 1.5rem; letter-spacing: -0.03em; }

.search-hero {
  max-width: 640px;
  margin: 0 auto 28px;
  position: relative;
}
.search-hero .icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.search-hero input[type='search'] {
  height: 58px;
  padding-left: 50px;
  border-radius: 16px;
  font-size: 1.05rem;
  box-shadow: var(--shadow);
}

.section { margin-top: 64px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

/* ------------------------------------------------------------------ Feature Kacheln */

.feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--grad-soft);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--brand-ink);
  margin-bottom: 6px;
}
.feature-icon .icon { width: 24px; height: 24px; }
.feature p { color: var(--text-2); margin: 0; }
.feature .btn { margin-top: auto; align-self: flex-start; }

/* ------------------------------------------------------------------ Download Karten */

.item-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease;
  height: 100%;
}
.item-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
}
.item-card .item-top { display: flex; gap: 14px; align-items: flex-start; }
.item-thumb {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--brand-ink);
  border: 1px solid var(--border);
}
.item-card h3 { margin: 0 0 2px; font-size: 1.05rem; }
.item-card p { margin: 0; color: var(--text-2); font-size: 0.93rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 0.83rem; margin-top: auto; }
.item-meta span { display: inline-flex; gap: 5px; align-items: center; }

.badge {
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 650;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  background: var(--surface-2);
  white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; }
.badge-brand { color: var(--brand-ink); border-color: rgba(139, 92, 246, 0.4); background: rgba(139, 92, 246, 0.12); }
.badge-success { color: var(--success); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); }
.badge-warning { color: var(--warning); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.1); }
.badge-danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.1); }
.badge-info { color: var(--info); border-color: rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.1); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 550;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }
.chip.active { background: var(--grad-soft); border-color: rgba(139, 92, 246, 0.5); color: var(--text); }
.chip .count { color: var(--muted); font-size: 0.8rem; }

/* ------------------------------------------------------------------ Formulare */

label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.field-hint { font-size: 0.84rem; color: var(--muted); margin-top: 6px; }
.field-error { font-size: 0.85rem; color: var(--danger); margin-top: 6px; }
input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
input[type='number'],
input[type='url'],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 0.97rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}
input[aria-invalid='true'] { border-color: var(--danger); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d839e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--text-2);
  cursor: pointer;
}
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.password-wrap button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.password-wrap button:hover { color: var(--text); background: var(--surface-2); }
.strength { height: 4px; border-radius: 99px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--danger); transition: width 0.25s ease, background 0.25s ease; }

/* ------------------------------------------------------------------ Auth */

.auth-wrap { min-height: calc(100vh - var(--header-h) - 200px); display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 1.8rem; }
.auth-benefits { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.auth-benefits li { display: flex; gap: 10px; align-items: center; color: var(--text-2); font-size: 0.93rem; }
.auth-benefits .icon { color: var(--success); }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.85rem; margin: 20px 0; }
.divider-text::before,
.divider-text::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

/* ------------------------------------------------------------------ Hinweise */

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
}
.alert[hidden] { display: none; }
.alert .icon { margin-top: 3px; }
.alert p:last-child { margin-bottom: 0; }
.alert-success { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.alert-success .icon { color: var(--success); }
.alert-error { border-color: rgba(248, 113, 113, 0.45); background: rgba(248, 113, 113, 0.08); }
.alert-error .icon { color: var(--danger); }
.alert-warning { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
.alert-warning .icon { color: var(--warning); }
.alert-info { border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.08); }
.alert-info .icon { color: var(--info); }
.alert-brand { border-color: rgba(139, 92, 246, 0.45); background: var(--grad-soft); }
.alert-brand .icon { color: var(--brand-ink); }

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100vw - 40px));
}
.toasts .alert { box-shadow: var(--shadow); background: var(--surface); animation: toast-in 0.3s ease; }
.toasts .alert.hide { opacity: 0; transform: translateY(8px); transition: all 0.3s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ Fortschritt / Limits */

.meter { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width 0.4s ease; }
.meter.warn > span { background: linear-gradient(90deg, #f59e0b, #f97316); }
.meter.full > span { background: linear-gradient(90deg, #ef4444, #f43f5e); }
.meter-lg { height: 12px; }

.quota { display: grid; gap: 6px; }
.quota-head { display: flex; justify-content: space-between; font-size: 0.9rem; }
.quota-head strong { font-weight: 650; }
.quota-head span { color: var(--muted); }

.stat {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.stat .label { color: var(--muted); font-size: 0.85rem; font-weight: 550; display: flex; gap: 8px; align-items: center; }
.stat .value { font-size: 1.75rem; font-weight: 780; letter-spacing: -0.03em; margin-top: 4px; }
.stat .sub { color: var(--muted); font-size: 0.83rem; }

/* ------------------------------------------------------------------ Tabellen */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td .row { flex-wrap: nowrap; }

/* ------------------------------------------------------------------ Tarifvergleich */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 14px; }
.plan.highlight { box-shadow: var(--shadow-glow); }
.plan .plan-name { font-weight: 750; font-size: 1.15rem; display: flex; justify-content: space-between; align-items: center; }
.plan .price { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.04em; }
.plan .price small { font-size: 0.95rem; color: var(--muted); font-weight: 550; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 0.95rem; }
.plan li .icon { color: var(--success); margin-top: 3px; }
.plan li.no { color: var(--muted); }
.plan li.no .icon { color: var(--muted); }
.plan .btn { margin-top: auto; }

/* ------------------------------------------------------------------ Detailseite */

.breadcrumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .icon { width: 14px; height: 14px; }
.item-header { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 26px; }
.item-header .item-thumb { width: 72px; height: 72px; border-radius: 20px; }
.item-header .item-thumb .icon { width: 32px; height: 32px; }
.prose { color: var(--text-2); }
.prose h3 { color: var(--text); margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 0.3em 0; }
.prose a { word-break: break-word; }

.file-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}
.file-row + .file-row { margin-top: 12px; }
.file-row .file-info { flex: 1; min-width: 0; }
.file-row .file-name { font-weight: 650; word-break: break-all; }
.file-row .file-sub { color: var(--muted); font-size: 0.85rem; display: flex; gap: 12px; flex-wrap: wrap; }
.file-row.latest { border-color: rgba(139, 92, 246, 0.45); background: var(--grad-soft); }
details.changelog summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
details.changelog .prose { font-size: 0.9rem; margin-top: 8px; }

.copy {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}
.copy:hover { color: var(--text); background: var(--surface-3); }

/* ------------------------------------------------------------------ Converter */

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 12px;
  padding: 48px 24px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.dropzone:hover,
.dropzone.dragover { border-color: var(--brand); background: var(--grad-soft); }
.dropzone.dragover { transform: scale(1.01); }
.dropzone input[type='file'] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(139, 92, 246, 0.9);
}
.dropzone .dz-icon .icon { width: 30px; height: 30px; }
.dropzone h3 { margin: 6px 0 0; font-size: 1.25rem; }
.dropzone p { margin: 0; color: var(--muted); }

.convert-panel { display: none; }
.convert-panel.show { display: block; }
.selected-file { display: flex; gap: 14px; align-items: center; }
.format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.format-option input { position: absolute; opacity: 0; pointer-events: none; }
.format-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}
.format-option span:hover { border-color: var(--brand); }
.format-option input:checked + span { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px -8px rgba(139, 92, 246, 0.9); }
.format-option input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }

.job {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.job + .job { margin-top: 10px; }
.job .job-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); flex: none; color: var(--brand-ink); }
.job .job-main { flex: 1; min-width: 0; }
.job .job-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .job-sub { color: var(--muted); font-size: 0.84rem; }
.job .meter { margin-top: 8px; }
.job .job-actions { display: flex; gap: 6px; flex: none; }
.job.done .job-icon { color: var(--success); background: rgba(52, 211, 153, 0.12); }
.job.failed .job-icon { color: var(--danger); background: rgba(248, 113, 113, 0.12); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.format-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.format-list .card h3 { display: flex; gap: 10px; align-items: center; }
.format-list .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.format-list .tags span { font-family: var(--mono); font-size: 0.75rem; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); text-transform: uppercase; }

/* ------------------------------------------------------------------ Cloud */

.cloud-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.cloud-list .row-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.cloud-list .row-item:last-child { border-bottom: 0; }
.cloud-list .row-item:hover { background: var(--surface-2); }
.cloud-list .row-item .name { flex: 1; min-width: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.cloud-list .row-item .meta { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.cloud-list .row-item .actions { display: flex; gap: 4px; }
.cloud-list .folder-icon { color: var(--warning); }
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty .icon { width: 40px; height: 40px; color: var(--border-strong); margin-bottom: 10px; }
.empty h3 { color: var(--text); }

.soon-hero {
  text-align: center;
  padding: 40px 24px;
}
.soon-hero .big {
  font-size: clamp(3.5rem, 2rem + 8vw, 7rem);
  font-weight: 850;
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 10px 0 14px;
}

/* ------------------------------------------------------------------ Seitenleiste / Tabs */

.side-nav { display: grid; gap: 4px; }
.side-nav a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 550;
}
.side-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-nav a.active { background: var(--grad-soft); color: var(--text); }
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-layout .side-nav { position: sticky; top: calc(var(--header-h) + 20px); }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--brand); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a,
.pagination span { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); color: var(--text-2); }
.pagination a:hover { border-color: var(--border-strong); text-decoration: none; }
.pagination .current { background: var(--grad); color: #fff; border-color: transparent; }

.chart { display: flex; gap: 6px; align-items: flex-end; height: 160px; padding-top: 10px; }
.chart .bar-group { flex: 1; display: flex; gap: 3px; align-items: flex-end; height: 100%; position: relative; }
.chart .bar { flex: 1; border-radius: 6px 6px 2px 2px; min-height: 2px; }
.chart .bar.dl { background: var(--brand); }
.chart .bar.cv { background: var(--brand-2); }
.chart-labels { display: flex; gap: 6px; margin-top: 8px; }
.chart-labels span { flex: 1; text-align: center; font-size: 0.7rem; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 0.83rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ------------------------------------------------------------------ Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 44px 0 28px;
  font-size: 0.92rem;
  color: var(--muted);
}
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 28px; }
.site-footer h4 { color: var(--text); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.85rem; }

/* ------------------------------------------------------------------ Fehlerseiten */

.error-page { text-align: center; padding: 60px 0; }
.error-page .code { font-size: clamp(4rem, 3rem + 6vw, 8rem); font-weight: 850; letter-spacing: -0.06em; line-height: 1; }

/* ------------------------------------------------------------------ Responsive */

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-sidebar { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-layout .side-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 6px; }
  .admin-layout .side-nav a { white-space: nowrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-grid; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    transition: transform 0.25s ease;
    z-index: -1;
  }
  .nav.open { transform: none; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .header-actions .hide-mobile { display: none; }
  .site-header .container { gap: 12px; }
  .header-actions { gap: 6px; margin-left: auto; }
  .user-menu summary .uname { display: none; }
  .user-menu summary { padding: 4px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .brand .brand-sub { display: none; }
  .header-actions [data-theme-toggle] { display: none; }
  .nav .nav-theme {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px 14px;
    border: 0;
    background: none;
    color: var(--text-2);
    font: inherit;
    font-weight: 550;
    cursor: pointer;
    border-radius: 10px;
  }
  .guest-nudge { font-size: 0.84rem; }
  .guest-nudge .container { gap: 4px; text-align: center; }
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4, .form-row { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .hero { padding: 32px 0 24px; }
  .hero-stats { gap: 24px; }
  .file-row { flex-direction: column; align-items: stretch; }
  .file-row .btn { width: 100%; }
  .item-header { flex-direction: column; gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
  .job { flex-wrap: wrap; }
  .job .job-actions { width: 100%; justify-content: flex-end; }
  th, td { padding: 10px 12px; }
  .hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.nav .hide-desktop-nav { display: none; }
@media (max-width: 820px) {
  .nav .hide-desktop-nav { display: inline-flex; }
}

/* ------------------------------------------------------------------ Freigaben */
.share-card { scroll-margin-top: 90px; }
.share-card:target { border-color: rgba(139, 92, 246, 0.6); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18); }
.share-off { opacity: 0.75; }
.share-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.share-url { display: flex; gap: 8px; align-items: center; }
.share-url input { flex: 1; min-width: 0; font-size: 0.85rem; }
.share-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.share-facts span { display: inline-flex; align-items: center; gap: 6px; }
.share-edit summary { cursor: pointer; color: var(--text-2); }
.share-kind { border: 0; margin: 0; padding: 0; }
.share-title { overflow-wrap: anywhere; }
.share-preview { display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; padding: 12px; }
.share-preview img, .share-preview video { max-width: 100%; max-height: 70vh; border-radius: 8px; }
.share-preview audio { width: 100%; }
@media (max-width: 560px) {
  .share-url { flex-wrap: wrap; }
  .share-url input { flex-basis: 100%; }
}
