/* ==========================================================================
   Linktree – oeffentliche Seite
   Designs: .theme-light, .theme-dark, .theme-elegant, .theme-blue
   --text wird per Inline-Style aus den Einstellungen gesetzt.
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
}

/* ---------- Designs ---------- */

.theme-light {
  --bg: #f5f6f8;
  --card-bg: #ffffff;
  --card-border: #e2e5ea;
  --card-shadow: 0 2px 8px rgba(20, 30, 50, .08);
  --card-hover: #fafbfc;
  --accent: #2563eb;
  --overlay: rgba(255, 255, 255, .72);
  --logo-ring: #ffffff;
}

.theme-dark {
  --bg: #121417;
  --card-bg: #1e2227;
  --card-border: #2c3239;
  --card-shadow: 0 2px 10px rgba(0, 0, 0, .4);
  --card-hover: #262b31;
  --accent: #60a5fa;
  --overlay: rgba(18, 20, 23, .62);
  --logo-ring: #2c3239;
}

.theme-elegant {
  --bg: radial-gradient(ellipse at top, #2a2320 0%, #14110f 60%, #0b0908 100%);
  --card-bg: rgba(255, 255, 255, .03);
  --card-border: #b8975a;
  --card-shadow: 0 4px 18px rgba(0, 0, 0, .5);
  --card-hover: rgba(184, 151, 90, .12);
  --accent: #d4af6a;
  --overlay: rgba(12, 10, 9, .6);
  --logo-ring: #b8975a;
  font-family: Georgia, "Times New Roman", serif;
  background-color: #0b0908;
}
.theme-elegant .lt-title { letter-spacing: .06em; font-weight: 400; text-transform: uppercase; }
.theme-elegant .lt-card { border-radius: 4px; }

.theme-blue {
  --bg: linear-gradient(160deg, #0b3d91 0%, #1565c0 45%, #29b6f6 100%);
  --card-bg: rgba(255, 255, 255, .14);
  --card-border: rgba(255, 255, 255, .35);
  --card-shadow: 0 4px 16px rgba(4, 30, 80, .3);
  --card-hover: rgba(255, 255, 255, .24);
  --accent: #ffffff;
  --overlay: rgba(8, 40, 100, .5);
  --logo-ring: rgba(255, 255, 255, .7);
  background-color: #1565c0;
}

/* ---------- Layout ---------- */

.lt-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 16px 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.lt-head { text-align: center; margin-bottom: 28px; }

.lt-logo {
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--logo-ring);
  box-shadow: var(--card-shadow);
  background: var(--card-bg);
}
.lt-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lt-title { margin: 0 0 8px; font-size: 1.75rem; line-height: 1.25; }
.lt-text { margin: 0 auto; max-width: 520px; opacity: .88; }

.lt-elements { display: flex; flex-direction: column; gap: 16px; }

/* Optionale Ueberschrift ueber einem Feld – gleiche Groesse wie der Feldtext */
.lt-el-heading {
  margin: 8px 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

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

.lt-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 16px 20px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background-color: var(--card-bg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--card-shadow);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
a.lt-card:hover, a.lt-card:focus-visible {
  transform: translateY(-2px);
  background-color: var(--card-hover);
}
a.lt-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Hintergrundbild: halbtransparente Ebene fuer Lesbarkeit */
.lt-card.has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay);
  transition: opacity .15s ease;
}
a.lt-card.has-bg:hover::before { opacity: .8; }
.lt-card > * { position: relative; }

.lt-card-text { font-size: 1.1rem; font-weight: 600; }

.lt-button { justify-content: center; text-align: center; min-height: 88px; }

.lt-imgbutton { gap: 18px; min-height: 104px; }
.lt-imgbutton .lt-card-text { flex: 1; }
.lt-thumb {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(127, 127, 127, .15);
}
.lt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Slider ---------- */

.lt-slider {
  flex-direction: column;
  align-items: stretch;
  padding: 18px 18px 14px;
}
.lt-slider-title { margin: 0 0 12px; font-size: 1.05rem; text-align: center; }

.lt-slides { position: relative; min-height: 360px; }

.lt-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility .5s ease;
}
.lt-slide.is-active { opacity: 1; visibility: visible; }

.lt-slide-img {
  width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
.lt-slide-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lt-slide-name { font-weight: 600; line-height: 1.3; padding: 0 36px; }
.lt-slide-price { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.theme-blue .lt-slide-price, .theme-light .lt-slide-price { color: inherit; }

.lt-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.lt-nav:hover { background: rgba(0, 0, 0, .65); }
.lt-prev { left: 10px; }
.lt-next { right: 10px; }

.lt-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lt-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  opacity: .3;
  cursor: pointer;
}
.lt-dot.is-active { opacity: .9; }

/* ---------- Hinweis & Footer ---------- */

.lt-price-note {
  margin: 28px 0 0;
  font-size: .8rem;
  text-align: center;
  opacity: .75;
}
.lt-price-note + .lt-affiliate-note { margin-top: 10px; }

.lt-footer {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: .85rem;
}
.lt-footer a { color: var(--text); opacity: .75; text-decoration: none; }
.lt-footer a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Unterseiten (Impressum / Datenschutz) ---------- */

.lt-page {
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
}
.lt-page h1 { margin-top: 0; }
.lt-page a { color: var(--accent); }
.lt-back { display: inline-block; margin-bottom: 16px; color: var(--text); opacity: .8; }

@media (max-width: 480px) {
  .lt-wrap { padding-top: 32px; }
  .lt-logo { width: 128px; height: 128px; }
  .lt-title { font-size: 1.45rem; }
  .lt-imgbutton { gap: 14px; }
  .lt-thumb { width: 64px; height: 64px; }
  .lt-slides { min-height: 320px; }
  .lt-slide-img { height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .lt-card, .lt-slide { transition: none; }
}
