/* =====================================================
   style.css — wunschliste.jan-bauer.de
   Apple-inspired Design · Light & Dark Mode
   ===================================================== */

/* ===== CSS CUSTOM PROPERTIES (Tokens) ===== */
:root {
  /* ── Light Mode ── */
  --bg:             #f5f5f7;
  --surface:        #ffffff;
  --surface-hover:  #f0f0f2;
  --border:         rgba(0, 0, 0, 0.08);
  --border-hover:   rgba(0, 0, 0, 0.16);
  --text-primary:   #1d1d1f;
  --text-secondary: #6e6e73;
  --text-shop:      #86868b;
  --accent:         #0071e3;
  --accent-soft:    rgba(0, 113, 227, 0.08);
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --toggle-bg:      #e5e5ea;
  --toggle-thumb:   #ffffff;
  --radius-card:    18px;
  --radius-toggle:  999px;
  --transition:     0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Dark Mode — angenehm warm, nicht zu hart ── */
[data-theme="dark"] {
  --bg:             #1a1a1e;       /* Weiches Dunkelgrau statt reinem Schwarz */
  --surface:        #26262c;       /* Karten etwas heller als Hintergrund */
  --surface-hover:  #2f2f38;
  --border:         rgba(255, 255, 255, 0.07);
  --border-hover:   rgba(255, 255, 255, 0.15);
  --text-primary:   #e8e8ed;       /* Leicht gedämpftes Weiß statt reinem Weiß */
  --text-secondary: #9898a0;
  --text-shop:      #5c5c66;
  --accent:         #4da3ff;       /* Etwas wärmeres Blau */
  --accent-soft:    rgba(77, 163, 255, 0.10);
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.30);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.45);
  --toggle-bg:      #38383e;
  --toggle-thumb:   #e8e8ed;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100dvh;
  transition: background-color var(--transition), color var(--transition);
  padding: 0 16px 60px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle-wrapper {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.toggle-track {
  display: flex;
  align-items: center;
  width: 56px;
  height: 30px;
  background: var(--toggle-bg);
  border-radius: var(--radius-toggle);
  padding: 3px;
  position: relative;
  transition: background var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle-thumb {
  position: absolute;
  left: 3px;
  width: 24px;
  height: 24px;
  background: var(--toggle-thumb);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform var(--transition);
  z-index: 2;
}

[data-theme="dark"] .toggle-thumb {
  transform: translateX(26px);
}

.icon {
  position: absolute;
  font-size: 11px;
  line-height: 1;
  z-index: 1;
  transition: opacity var(--transition);
  user-select: none;
}

.icon-sun {
  left: 7px;
  color: #f59e0b;
  opacity: 1;
}

.icon-moon {
  right: 6px;
  color: #a5b4fc;
  opacity: 0.5;
  font-size: 13px;
}

[data-theme="dark"] .icon-sun  { opacity: 0.5; }
[data-theme="dark"] .icon-moon { opacity: 1; }

/* ===== CONTAINER ===== */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding-top: 80px;
}

/* ===== HEADER ===== */
.site-header {
  text-align: center;
  margin-bottom: 52px;
  animation: fadeInDown 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.avatar {
  width: 72px;
  height: 72px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.site-title {
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.1;
}

.site-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Prioritäts-Hinweis unter dem Subtitle */
.site-hint {
  font-size: 13px;
  color: var(--text-shop);
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  display: inline-block;
  transition: background var(--transition), border-color var(--transition);
}

/* ===== SECTIONS ===== */
.wish-section {
  margin-bottom: 36px;
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Staggered animation delays per section */
.wish-section:nth-child(1) { animation-delay: 0.10s; }
.wish-section:nth-child(2) { animation-delay: 0.18s; }
.wish-section:nth-child(3) { animation-delay: 0.26s; }
.wish-section:nth-child(4) { animation-delay: 0.34s; }
.wish-section:nth-child(5) { animation-delay: 0.42s; }
.wish-section:nth-child(6) { animation-delay: 0.50s; }

.section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-shop);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 2px;
}

.section-icon {
  font-size: 14px;
}

/* Erklärtext direkt unter dem Section-Titel */
.section-note {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background var(--transition), border-color var(--transition);
}

.section-note strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ===== PRIORITÄTS-BADGE ===== */
.prio-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 2px;
}

.prio-badge.prio-1 {
  background: rgba(255, 59, 48, 0.12);
  color: #ff3b30;
}
[data-theme="dark"] .prio-badge.prio-1 {
  background: rgba(255, 69, 58, 0.18);
  color: #ff6b63;
}

.prio-badge.prio-2 {
  background: rgba(255, 149, 0, 0.12);
  color: #e08600;
}
[data-theme="dark"] .prio-badge.prio-2 {
  background: rgba(255, 159, 10, 0.16);
  color: #ff9f0a;
}

.prio-badge.prio-3 {
  background: var(--surface-hover);
  color: var(--text-shop);
}

/* ===== WISH LIST ===== */
.wish-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== WISH CARD ===== */
.wish-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    background    var(--transition),
    border-color  var(--transition),
    box-shadow    var(--transition),
    transform     var(--transition);
  position: relative;
  overflow: hidden;
}

/* Shimmer-Linie oben beim Hover */
.wish-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.wish-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.wish-card:hover::before {
  opacity: 1;
}

.wish-card:active {
  transform: scale(0.98) translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Featured Card (z.B. Amazon Wunschliste) */
.wish-card--featured {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.wish-card--featured:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.18);
}

[data-theme="dark"] .wish-card--featured:hover {
  box-shadow: 0 4px 20px rgba(77, 163, 255, 0.18);
}

/* ===== CARD PARTS ===== */
.wish-card-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.wish-card--featured .wish-card-icon {
  background: var(--accent-soft);
  border-color: transparent;
}

.wish-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wish-card-shop {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-shop);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wish-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.wish-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hinweistext in der Karte — darf umbrechen */
.wish-card-note {
  font-size: 12px;
  color: var(--accent);
  margin-top: 5px;
  line-height: 1.45;
  white-space: normal;
  opacity: 0.9;
}

.wish-card-arrow {
  font-size: 18px;
  color: var(--text-shop);
  flex-shrink: 0;
  font-weight: 300;
  transition: color var(--transition), transform var(--transition);
  margin-left: 4px;
}

.wish-card:hover .wish-card-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ===== ABSCHLUSSSATZ ===== */
.closing-note {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 0;
  line-height: 1.6;
  padding: 0 16px;
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.52s both;
}

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-shop);
  letter-spacing: 0.04em;
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.55s both;
}

/* ===== ANIMATIONEN ===== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .wish-card {
    padding: 14px;
    gap: 12px;
  }

  .wish-card-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .wish-card-title {
    font-size: 14px;
  }

  .wish-card-desc {
    font-size: 12px;
  }
}
