/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:          #111318;
  --bg-raised:   #161920;
  --surface:     #1c1f2a;
  --surface2:    #222534;
  --border:      rgba(255,255,255,0.07);
  --border-hover:rgba(255,255,255,0.14);
  --accent:      #7c6df0;
  --accent-glow: rgba(124,109,240,0.25);
  --accent2:     #b8a9ff;
  --text:        #e4e6ef;
  --text-soft:   #9399b2;
  --text-faint:  #555b75;
  --danger:      #e05454;
  --success:     #34c77b;
  --radius:      14px;
  --radius-sm:   8px;
  --font-head:   'DM Serif Display', Georgia, serif;
  --font-body:   'Outfit', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 0 1px var(--accent), 0 0 32px var(--accent-glow), 0 8px 32px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── NOISE TEXTURE OVERLAY ───────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── NAV ────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(17,19,24,0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1.25rem, 5vw, 3.5rem);
  display: flex; align-items: center; gap: 0.25rem;
  height: 58px;
}

.nav-logo {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  cursor: pointer;
  display: flex; align-items: center; gap: 0;
}
.nav-logo .nav-logo-dot { color: var(--accent); }
.nav-logo .nav-logo-tld { color: var(--accent2); }

nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color .2s;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
}
nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
nav a.active { color: var(--text); }
.nav-archive-link { display: flex; align-items: center; gap: .35rem; }
.lock-icon { font-size: 0.7rem; opacity: .5; }

/* ── PAGES ──────────────────────────────────────────────── */
.page {
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1.25rem, 5vw, 3.5rem);
  min-height: calc(100vh - 58px);
  position: relative; z-index: 1;
}

/* ── WARNHINWEIS (z.B. Default-Passwort) ─────────────────── */
.warn-banner {
  background: rgba(224,84,84,.08);
  border: 1px solid rgba(224,84,84,.3);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  font-size: .875rem;
  margin-bottom: 1.5rem;
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  max-width: 700px;
  margin: 0 auto 5rem;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse at center, rgba(124,109,240,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1.5rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(184,169,255,0.2);
  border-radius: 999px;
  background: rgba(124,109,240,0.07);
}
.hero-eyebrow::before { content: '✦'; font-size: 0.6rem; }

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-soft);
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto;
}

/* ── SITE CARDS ─────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  max-width: 1080px;
  margin: 0 auto;
}

.site-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .3s;
  text-decoration: none;
  display: flex; flex-direction: column;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.site-card:hover {
  border-color: rgba(124,109,240,0.5);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.card-preview {
  height: 172px;
  background: linear-gradient(145deg, #191c28 0%, #111318 100%);
  background-size: cover;
  background-position: center top;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-preview::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 25% 35%, var(--card-color, var(--accent)) 0%, transparent 55%);
  opacity: 0.12;
  transition: opacity .3s;
}
.card-preview.has-screenshot::before {
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(17,19,24,0.55) 100%);
  opacity: 1;
}
.site-card:hover .card-preview::before { opacity: 0.2; }
.site-card:hover .card-preview.has-screenshot::before { opacity: 0.6; }

.card-preview-inner {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 9px;
  width: calc(100% - 2rem);
  height: calc(100% - 2rem);
  display: flex; flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(4px);
}
.card-preview-bar {
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.04);
  height: 26px;
  display: flex; align-items: center;
  padding: 0 .65rem;
  gap: .35rem;
  flex-shrink: 0;
}
.card-preview-dot {
  width: 7px; height: 7px; border-radius: 50%;
  opacity: 0.7;
}
.card-preview-url {
  font-size: .6rem;
  color: var(--text-faint);
  margin-left: .3rem;
  font-family: var(--font-mono);
  letter-spacing: 0;
}
.card-preview-content {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.75rem;
  font-style: italic;
  color: rgba(255,255,255,.18);
  padding: .5rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.card-body { padding: 1.25rem 1.25rem 0.75rem; flex: 1; }
.card-domain {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--accent2);
  margin-bottom: .4rem;
  letter-spacing: -0.01em;
  opacity: 0.8;
}
.card-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.3rem;
  margin-bottom: .4rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.card-desc {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 300;
}
.card-footer {
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  margin-top: .75rem;
}
.card-visit {
  font-size: .78rem;
  font-weight: 500;
  color: var(--accent2);
  text-decoration: none;
  display: flex; align-items: center; gap: .4rem;
  letter-spacing: 0.01em;
  transition: color .2s, gap .2s;
}
.card-visit:hover { gap: .6rem; }
.card-visit::after { content: '→'; }

.card-gorilla { display: none; }
.card-gorilla.visible { display: flex; }

/* ── SECTION HEADING ─────────────────────────────────────── */
.section-heading {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-bottom: .4rem;
  color: var(--text);
}
.section-sub {
  color: var(--text-soft);
  margin-bottom: 3rem;
  font-weight: 300;
  font-size: 1rem;
}

/* ── CONTACT ─────────────────────────────────────────────── */
.contact-wrap {
  max-width: 560px;
  margin: 0 auto;
}
.form-group { margin-bottom: 1.1rem; }
label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  margin-bottom: .4rem;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}
input, textarea, select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 300;
  padding: .7rem 1rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, textarea:focus, select:focus {
  border-color: rgba(124,109,240,0.5);
  box-shadow: 0 0 0 3px rgba(124,109,240,0.1);
}
textarea { min-height: 130px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  letter-spacing: 0.01em;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(124,109,240,0.3);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(124,109,240,0.45); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.25); }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-sm { padding: .38rem .85rem; font-size: .78rem; }

.flash {
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .875rem;
  display: none;
}
.flash.success {
  background: rgba(52,199,123,.08);
  border: 1px solid rgba(52,199,123,.25);
  color: var(--success);
  display: block;
}
.flash.error {
  background: rgba(224,84,84,.08);
  border: 1px solid rgba(224,84,84,.25);
  color: var(--danger);
  display: block;
}

/* ── IMPRESSUM ───────────────────────────────────────────── */
.impressum-wrap { max-width: 640px; margin: 0 auto; }
.impressum-wrap h2 {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent2);
  margin: 2rem 0 .6rem;
  opacity: 0.8;
}
.impressum-wrap h2:first-child { margin-top: 0; }
.impressum-wrap p {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-bottom: .4rem;
  font-weight: 300;
  line-height: 1.7;
}

/* ── PASSWORD GATE ───────────────────────────────────────── */
.pw-gate {
  max-width: 360px;
  margin: 5rem auto;
  text-align: center;
}
.pw-gate .lock-big {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: block;
  filter: grayscale(0.3);
}
.pw-gate h2 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.6rem;
  margin-bottom: .5rem;
  letter-spacing: -0.02em;
}
.pw-gate p {
  color: var(--text-soft);
  font-size: .9rem;
  margin-bottom: 1.5rem;
  font-weight: 300;
}
.pw-row { display: flex; gap: .65rem; }
.pw-row input { flex: 1; }

/* ── ARCHIVE ─────────────────────────────────────────────── */
.archive-wrap { max-width: 860px; margin: 0 auto; }
.archive-toolbar {
  display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.archive-toolbar input { flex: 1; min-width: 200px; }
.tab-bar {
  display: flex; gap: .4rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.tab {
  padding: .38rem .9rem;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  transition: all .2s;
  font-family: var(--font-body);
}
.tab.active, .tab:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(124,109,240,0.3);
}

.archive-list { display: flex; flex-direction: column; gap: .85rem; }
.archive-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex; gap: 1rem; align-items: flex-start;
  transition: border-color .2s;
}
.archive-item:hover { border-color: var(--border-hover); }
.archive-item-thumb {
  width: 112px; min-width: 112px; height: 68px;
  border-radius: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
}
.archive-item-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.archive-item-body { flex: 1; min-width: 0; }
.archive-item-type {
  font-family: var(--font-mono);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 500;
  margin-bottom: .3rem;
}
.type-video   { color: #e05454; }
.type-article { color: #5b8cf5; }
.type-note    { color: #f0a050; }
.archive-item-title {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.2rem;
  margin-bottom: .3rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.archive-item-desc { color: var(--text-soft); font-size: .95rem; margin-bottom: .5rem; font-weight: 300; }
.archive-item-meta { font-size: .8rem; color: var(--text-faint); }
.archive-item-actions { display: flex; gap: .4rem; margin-top: .6rem; }
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-soft); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 1rem; }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.modal h3 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.modal-footer { display: flex; gap: .65rem; justify-content: flex-end; margin-top: 1.5rem; }

/* ── CMS ─────────────────────────────────────────────────── */
.cms-header {
  display: flex; align-items: center; gap: .85rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.cms-header h2 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.6rem;
  flex: 1;
  letter-spacing: -0.02em;
}
.admin-badge {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: rgba(124,109,240,0.12);
  border: 1px solid rgba(124,109,240,0.3);
  color: var(--accent2);
  padding: .2rem .6rem;
  border-radius: 4px;
}

.cms-login-wrap { max-width: 340px; margin: 4rem auto; }
.cms-login-wrap h2 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.7rem;
  margin-bottom: .4rem;
  letter-spacing: -0.02em;
}
.cms-login-wrap p { color: var(--text-soft); font-size: .9rem; margin-bottom: 1.5rem; font-weight: 300; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.stat-number {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-label { color: var(--text-soft); font-size: .82rem; font-weight: 300; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem clamp(1.25rem, 5vw, 3.5rem);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  position: relative; z-index: 1;
}
footer p { color: var(--text-faint); font-size: .78rem; font-weight: 300; }
footer a { color: var(--text-faint); text-decoration: none; font-size: .78rem; transition: color .2s; }
footer a:hover { color: var(--text-soft); }

hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 600px) {
  nav a:not(.nav-logo) { display: none; }
  .archive-item-thumb { display: none; }
}
