/* ============================================================
   @unangenehm.comic — Ghost Theme
   ============================================================ */

:root {
  --bg:          #0d0d14;
  --surface:     #13131e;
  --border:      #1e1e30;
  --accent:      #22d3ee;
  --accent-dim:  rgba(34, 211, 238, 0.12);
  --text:        #e2e8f0;
  --text-muted:  #64748b;
}

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

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ---- Grain-Textur ---- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.header-inner {
  max-width: 42rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.125rem;
}

.logo-at {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.logo-domain {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Ghost {{navigation}} helper rendert ul.nav */
.site-nav .nav,
.footer-nav .nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav .nav li,
.footer-nav .nav li { margin: 0; }

.site-nav .nav a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav .nav a:hover,
.site-nav .nav .nav-current a { color: var(--text); }

.footer-nav .nav a {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.15s;
}

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

.nav-link {
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover { color: var(--text); }

.nav-cta {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.15s;
}

.nav-cta:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ---- Comic-Seite ---- */
.comic-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem;
  gap: 2rem;
}

.comic-article {
  width: 100%;
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ---- Comic-Bild ---- */
.comic-frame {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.04);
  transition: box-shadow 0.3s;
}

.comic-frame:hover {
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 0 60px rgba(34, 211, 238, 0.07);
}

.comic-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Navigation ---- */
.comic-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.nav-btn:not(.disabled):hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-btn.disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.comic-date {
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-align: center;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .nav-label { display: none; }
  .nav-btn { padding: 0.5rem 0.75rem; }
}

/* ---- Meta: Titel + Caption + Share ---- */
.comic-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.comic-title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.comic-caption {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ---- Share-Button ---- */
.share-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.share-btn.copied {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ---- Mitglieder-Badge ---- */
.member-badge {
  text-align: center;
  color: var(--accent);
  font-size: 0.875rem;
  padding: 0.5rem;
  border: 1px solid var(--accent-dim);
  border-radius: 0.5rem;
  background: var(--accent-dim);
}

/* ---- Empty State ---- */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--text-muted);
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 42rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-link:hover { color: var(--text); }

/* ---- Ghost Portal (Membership UI) ---- */
.gh-portal-triggerbtn { display: none !important; }

/* ---- Statische Seiten (Impressum etc.) ---- */
.static-page {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.static-article {
  width: 100%;
  max-width: 42rem;
}

.static-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.static-content {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.static-content h2 {
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}

.static-content p { margin: 0.5rem 0; }

.static-content a {
  color: var(--accent);
  text-decoration: none;
}

.static-content a:hover { text-decoration: underline; }

/* ---- Koenig Card Widths (Ghost-Pflicht) ---- */
.kg-width-wide {
  margin-left: calc(25% - 25vw);
  margin-right: calc(25% - 25vw);
}

.kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
