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

:root {
  --green:   #2e7d32;
  --green-l: #4caf50;
  --bg:      #f9fafb;
  --card:    #ffffff;
  --text:    #1a1a1a;
  --muted:   #6b7280;
  --border:  #e5e7eb;
  --radius:  12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Nav ── */
nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-logo { font-size: 1.2rem; font-weight: 700; color: var(--green); }
.nav-logo span { color: var(--text); font-weight: 400; }
#nav-auth { display: flex; gap: 10px; align-items: center; }
#nav-email { font-size: .85rem; color: var(--muted); }
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 9px; font-size: .75rem; font-weight: 700; cursor: pointer;
  color: var(--muted); transition: all .15s; letter-spacing: .03em;
}
.lang-btn:hover { border-color: var(--green); color: var(--green); }
.lang-btn-active { border-color: var(--green); color: var(--green); background: #e8f5e9; }

/* ── Success Banner ── */
.banner-success {
  background: #dcfce7;
  border-bottom: 2px solid var(--green);
}
.banner-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.banner-icon { font-size: 1.8rem; flex-shrink: 0; }
.banner-inner > div { flex: 1; }
.banner-inner strong { display: block; font-size: 1rem; margin-bottom: 4px; color: var(--green); }
.banner-inner p { font-size: .88rem; color: #166534; }
.banner-close {
  background: none; border: none; font-size: 1.1rem;
  cursor: pointer; color: var(--muted); flex-shrink: 0; padding: 0 4px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; font-size: .95rem;
  font-weight: 600; cursor: pointer; border: none; text-decoration: none;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn-primary  { background: var(--green); color: #fff; }
.btn-outline  { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-sm       { padding: 6px 12px; font-size: .82rem; }
.btn-danger   { background: #ef4444; color: #fff; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 72px 24px 64px;
  background: linear-gradient(160deg, #e8f5e9 0%, #f9fafb 60%);
}
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.hero h1 em { color: var(--green); font-style: normal; }
.hero p  { font-size: 1.1rem; color: var(--muted); max-width: 520px; margin: 0 auto 32px; }
.hero-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.badge {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 18px; font-size: .9rem; font-weight: 500;
}

/* ── Sections ── */
.section { max-width: 680px; margin: 0 auto; padding: 40px 24px; }
.section-title {
  font-size: 1.3rem; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}

/* ── Cards ── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem; outline: none;
  transition: border-color .15s;
}
.form-group input:focus { border-color: var(--green); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.error-msg { color: #ef4444; font-size: .88rem; margin-top: 10px; min-height: 20px; }
.success-msg { color: var(--green); font-size: .88rem; margin-top: 10px; }

/* ── Account management ── */
#section-account { display: none; }
.account-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.account-row:last-of-type { border-bottom: none; }
.account-label { font-size: .88rem; color: var(--muted); }
.account-value { font-size: .95rem; font-weight: 600; }
.account-badge-premium {
  background: #dcfce7; color: var(--green);
  padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700;
}
.account-badge-free {
  background: #f3f4f6; color: var(--muted);
  padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
}
.account-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px;
}

/* ── Shopping list ── */
#section-list { display: none; }
#list-empty { color: var(--muted); font-size: .95rem; padding: 20px 0; }
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.item.checked { opacity: .5; }
.item-name { font-weight: 600; flex: 1; }
.item-name.checked-text { text-decoration: line-through; }
.item-amount { font-size: .88rem; color: var(--muted); white-space: nowrap; }
.item-pkg { font-size: .78rem; color: var(--green); background: #e8f5e9; padding: 2px 7px; border-radius: 4px; }

/* ── Features ── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  text-align: center;
}
.feature-icon { font-size: 2rem; margin-bottom: 10px; }
.feature-card h3 { font-size: 1rem; margin-bottom: 6px; }
.feature-card p  { font-size: .85rem; color: var(--muted); }

/* ── Plans grid ── */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.plan-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
}
.plan-card-pro {
  border-color: var(--green);
  box-shadow: 0 4px 20px rgba(46,125,50,.12);
}
.plan-badge {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.plan-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.plan-price-free {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 20px;
}
.plan-price {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.plan-price span { font-size: .95rem; font-weight: 400; color: var(--muted); }
.plan-yearly {
  font-size: .8rem;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 20px;
}
.plan-features {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 20px !important;
}
.plan-features li {
  font-size: .85rem;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.plan-features li:last-child { border-bottom: none; }
.plan-off { color: var(--muted); }

/* ── Registration form ── */
.reg-form { display: flex; flex-direction: column; gap: 10px; }
.reg-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
}
.reg-form input:focus { border-color: var(--green); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; }
.btn-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  padding: 4px;
  line-height: 1;
}
.pricing-note {
  font-size: .78rem;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}
@media (max-width: 540px) {
  .plans-grid { grid-template-columns: 1fr; }
}

/* ── Gratis Kochbuch / Feinschmecker ── */
.section-wide { max-width: 900px; }

.feinschmecker-card {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.feinschmecker-info {
  flex: 1 1 260px;
  min-width: 220px;
}
.feinschmecker-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 4px;
}
.feinschmecker-sub {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.feinschmecker-meta {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.feinschmecker-desc {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.feinschmecker-dl { white-space: nowrap; }

/* Carousel */
.carousel {
  flex: 1 1 320px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}
.carousel-track {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f0f0;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .35s ease;
  background: #fff;
}
.carousel-img.active { opacity: 1; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover { background: #fff; }
.carousel-prev { left: 6px; }
.carousel-next { right: 6px; }

.carousel-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s;
}
.carousel-dot.active { background: var(--green); }

@media (max-width: 640px) {
  .feinschmecker-card { flex-direction: column; }
  .feinschmecker-dl   { width: 100%; justify-content: center; }
}

/* ── Footer ── */
footer {
  text-align: center; padding: 32px 24px;
  color: var(--muted); font-size: .85rem;
  border-top: 1px solid var(--border);
}
footer a { color: var(--muted); }

/* ── Loader ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border); border-top-color: var(--green);
  border-radius: 50%; animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .hero { padding: 48px 16px 40px; }
  .card { padding: 20px; }
  .account-actions { flex-direction: column; }
  .account-actions .btn { width: 100%; }
}
