/* Design im Stil von shadcn/ui (Zinc-Palette, hell und dunkel) */
:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --border: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --radius: 0.5rem;
}
.dark {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 3.9%;
  --card-foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --border: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;
}

*, *::before, *::after { box-sizing: border-box; border-color: hsl(var(--border)); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.muted { color: hsl(var(--muted-foreground)); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.85);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 6px 10px; border-radius: calc(var(--radius) - 2px); text-decoration: none;
  color: hsl(var(--muted-foreground)); font-weight: 500; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav a:hover { color: hsl(var(--foreground)); }
.nav a.active { color: hsl(var(--foreground)); background: hsl(var(--accent)); }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.25rem; padding: 0 1rem; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; border-radius: calc(var(--radius) - 2px);
  font: inherit; font-size: .875rem; font-weight: 500; text-decoration: none;
  transition: background .15s, color .15s;
}
.btn-default { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-default:hover { background: hsl(var(--primary) / 0.9); }
.btn-outline { background: hsl(var(--background)); border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.btn-outline:hover, .btn-ghost:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-ghost { background: transparent; color: hsl(var(--foreground)); }
.btn-sm { height: 2rem; padding: 0 .75rem; font-size: .8125rem; }
.btn-lg { height: 2.5rem; padding: 0 2rem; }
.btn-icon { width: 2rem; height: 2rem; padding: 0; }
.btn .g { width: 1rem; height: 1rem; }
.btn:focus-visible, .input:focus-visible, .card-link:focus-visible {
  outline: 2px solid hsl(var(--ring)); outline-offset: 2px;
}
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Avatar & Menue ---------- */
.menu-wrap { position: relative; }
.avatar {
  width: 2rem; height: 2rem; border-radius: 9999px; overflow: hidden; padding: 0; cursor: pointer;
  border: 1px solid hsl(var(--border)); background: hsl(var(--muted)); color: hsl(var(--foreground));
  display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 500; font-size: .8125rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 14rem; z-index: 50;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  padding: .25rem; box-shadow: 0 8px 24px rgb(0 0 0 / .12);
}
.menu[hidden] { display: none; }
.menu-label { padding: .375rem .5rem; font-size: .8125rem; font-weight: 500; overflow-wrap: anywhere; }
.menu-label small { display: block; color: hsl(var(--muted-foreground)); font-weight: 400; }
.menu hr { border: 0; border-top: 1px solid hsl(var(--border)); margin: .25rem -.25rem; }
.menu button {
  display: flex; width: 100%; align-items: center; gap: .5rem; padding: .375rem .5rem; cursor: pointer;
  background: transparent; border: 0; border-radius: calc(var(--radius) - 4px); font: inherit; font-size: .8125rem; color: inherit; text-align: left;
}
.menu button:hover { background: hsl(var(--accent)); }
.menu .icon { width: 1rem; height: 1rem; }

/* ---------- Seiten ---------- */
.page { flex: 1; padding-top: 40px; padding-bottom: 64px; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.025em; }
.page-head p { margin-top: 6px; color: hsl(var(--muted-foreground)); font-size: 1rem; }
.section { margin-top: 48px; }
.section h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 16px; }

.hero { padding: 56px 0 24px; text-align: center; max-width: 720px; margin: 0 auto; }
.pill {
  display: inline-flex; align-items: center; gap: .375rem; margin-bottom: 20px;
  padding: 4px 12px; border-radius: 9999px; background: hsl(var(--muted));
  font-size: .8125rem; font-weight: 500; text-decoration: none;
}
.pill .icon { width: .875rem; height: .875rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.035em; }
.lead { margin-top: 16px; font-size: clamp(1rem, 2.5vw, 1.125rem); color: hsl(var(--muted-foreground)); }
.hero-actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---------- Karten ---------- */
.card {
  display: flex; flex-direction: column;
  border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) + 4px);
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  box-shadow: 0 1px 2px rgb(0 0 0 / .05); text-decoration: none;
}
.card-link { transition: background .15s, border-color .15s; }
.card-link:hover { background: hsl(var(--accent) / 0.5); border-color: hsl(var(--muted-foreground) / 0.4); }
.card-disabled { opacity: .65; }
.card-header { padding: 20px 20px 8px; display: flex; flex-direction: column; gap: 6px; }
.card-header .icon { width: 1.5rem; height: 1.5rem; margin-bottom: 6px; }
.card-title { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.card-desc { color: hsl(var(--muted-foreground)); font-size: .875rem; }
.card-content { padding: 8px 20px 20px; margin-top: auto; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; min-height: 1.375rem; }
.badge {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 9999px;
  font-size: .75rem; font-weight: 600; border: 1px solid transparent;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
}
.badge-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); font-weight: 500; }
.badge-outline { background: transparent; color: hsl(var(--foreground)); border-color: hsl(var(--border)); }
.empty { padding: 32px; text-align: center; color: hsl(var(--muted-foreground)); border: 1px dashed hsl(var(--border)); border-radius: var(--radius); grid-column: 1 / -1; }

/* ---------- Formular ---------- */
.input {
  flex: 1; min-width: 0; height: 2.25rem; padding: 0 .75rem; font: inherit; font-size: .875rem;
  background: transparent; color: inherit; border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px);
}
.form-row { display: flex; gap: 8px; }
.list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px);
}
.list li span { overflow-wrap: anywhere; }
.alert {
  margin-bottom: 24px; padding: 12px 16px; border: 1px solid hsl(var(--border));
  border-radius: var(--radius); background: hsl(var(--muted)); font-size: .875rem;
}

/* ---------- Werkzeug-Seiten (Umrechner, Meeting-Planer, Video-Downloader, Spiele) ---------- */
.narrow { max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.label { font-size: .8125rem; font-weight: 500; display: flex; flex-direction: column; gap: 6px; }
.label > span { color: hsl(var(--muted-foreground)); }
.select {
  height: 2.25rem; padding: 0 2rem 0 .75rem; font: inherit; font-size: .875rem; min-width: 0;
  background: hsl(var(--background)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .6rem center;
  color: inherit; border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px); appearance: none; -webkit-appearance: none;
}
.select:focus-visible, .check input:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.label > .input, .label > .select { flex: none; width: 100%; }
.input.lg { height: 2.75rem; font-size: 1.125rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: hsl(var(--muted)); border-radius: var(--radius); }
.tabs button {
  border: 0; background: transparent; color: hsl(var(--muted-foreground)); font: inherit; font-size: .8125rem; font-weight: 500;
  padding: 6px 10px; border-radius: calc(var(--radius) - 2px); cursor: pointer; white-space: nowrap;
}
.tabs button[aria-pressed="true"] { background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.tabs button:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 1px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .875rem; cursor: pointer; }
.check input { width: 1rem; height: 1rem; margin-top: .15rem; accent-color: hsl(var(--primary)); flex: none; }
.check small { display: block; color: hsl(var(--muted-foreground)); }
.result { font-size: clamp(1.5rem, 5vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hint { font-size: .8125rem; color: hsl(var(--muted-foreground)); }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid hsl(var(--border)); }
.table td.num { text-align: right; }
.table tr:last-child td { border-bottom: 0; }
.table tr.hl td { background: hsl(var(--accent)); font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid hsl(var(--border)); border-radius: var(--radius); }
.progress { height: 8px; border-radius: 9999px; background: hsl(var(--muted)); overflow: hidden; }
.progress > span { display: block; height: 100%; background: hsl(var(--primary)); transition: width .3s; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-destructive { background: hsl(var(--destructive)); color: #fff; }
.btn-block { width: 100%; }
.thumb { width: 100%; max-width: 220px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius) - 2px); background: hsl(var(--muted)); }
.media { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.media > div { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: hsl(var(--muted-foreground)); text-decoration: none; font-size: .875rem; margin-bottom: 12px; }
.back-link:hover { color: hsl(var(--foreground)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid hsl(var(--border)); padding: 24px 0; color: hsl(var(--muted-foreground)); font-size: .8125rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 520px) {
  .brand { font-size: .9375rem; }
  .header-inner { gap: 8px; }
  .page { padding-top: 24px; }
  .hero { padding-top: 32px; }
}
