/* VinoVox – Design angelehnt an nicodasilva.wine */
:root {
  --wine:        #7a1f2b;
  --wine-deep:   #46101a;
  --wine-bright: #b5324b;
  --cream:       #faf4ea;
  --cream-2:     #f2e7d6;
  --ink:         #20140f;
  --muted:       #6f5f54;
  --gold:        #c79a4a;
  --line:        #e6d8c4;
  --shadow:      0 18px 44px rgba(70, 16, 26, 0.12);
  --shadow-lg:   0 30px 70px rgba(70, 16, 26, 0.22);
  --radius:      20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Inter', sans-serif; color: var(--ink);
  background: var(--cream); line-height: 1.7; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
h1, h2, h3 { font-family: 'Fraunces', serif; }
a { color: var(--wine); }
img { max-width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.7rem; border-radius: 999px;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn--wine { background: var(--wine); color: #fff; }
.btn--wine:hover { background: var(--wine-deep); transform: translateY(-2px); }
.btn--gold {
  color: #fff; background: linear-gradient(120deg, #b5324b, #7a1f2b 60%, #c79a4a);
  box-shadow: 0 12px 30px rgba(122,31,43,.45);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(122,31,43,.55); }
.btn--ghost-dark { background: transparent; color: var(--wine); border: 1.5px solid var(--wine); }
.btn--ghost-dark:hover { background: var(--wine); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Navigation ---------- */
.vv-nav {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
  padding: .9rem 2rem; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.vv-brand { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; }
.vv-brand i { color: var(--wine); font-size: 1.3rem; }
.vv-brand span { font-family: 'Fraunces', serif; font-weight: 900; font-size: 1.45rem; color: var(--ink); }
.vv-brand em { font-style: normal; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.vv-nav nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.vv-nav nav a { text-decoration: none; font-weight: 600; font-size: .95rem; }
.vv-user { color: var(--muted); font-size: .9rem; }
.vv-badge {
  display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .72rem;
  font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--cream-2); color: var(--muted); margin-left: .35rem;
}
.vv-badge--gold { background: linear-gradient(120deg, var(--gold), #e0bd7d); color: #46101a; }

/* ---------- Hero ---------- */
.vv-hero {
  background: linear-gradient(180deg, var(--wine-deep), var(--wine) 75%, var(--wine-bright));
  color: #fff; text-align: center; padding: 5.5rem 2rem 5rem; position: relative; overflow: hidden;
}
.vv-hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin: 0 0 .4rem; font-weight: 900; }
.vv-hero .tagline { color: var(--gold); letter-spacing: .22em; text-transform: uppercase; font-weight: 700; font-size: .85rem; }
.vv-hero p.lead { max-width: 640px; margin: 1.2rem auto 2rem; font-size: 1.15rem; opacity: .92; }
.vv-hero .glass { font-size: 3rem; margin-bottom: 1rem; display: inline-block; }

/* ---------- Sections / Cards ---------- */
.vv-section { max-width: 1080px; margin: 0 auto; padding: 3.5rem 2rem; }
.vv-section h2 { font-size: 2rem; margin-bottom: 1.6rem; }
.vv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; }
.vv-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow);
}
.vv-card i { color: var(--gold); font-size: 1.6rem; margin-bottom: .6rem; }
.vv-card h3 { margin: .2rem 0 .5rem; font-size: 1.2rem; }
.vv-card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Pricing */
.vv-price { text-align: center; position: relative; }
.vv-price .price { font-family: 'Fraunces', serif; font-size: 2.6rem; font-weight: 900; color: var(--wine); }
.vv-price ul { list-style: none; padding: 0; margin: 1rem 0 1.5rem; color: var(--muted); }
.vv-price li { padding: .3rem 0; }
.vv-price li i { color: var(--gold); font-size: 1rem; margin-right: .45rem; }
.vv-price--best { border: 2px solid var(--gold); box-shadow: var(--shadow-lg); }
.vv-ribbon {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(120deg, var(--gold), #e0bd7d); color: #46101a;
  font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: .25rem .9rem; border-radius: 999px;
}

/* ---------- Formulare ---------- */
.vv-form {
  max-width: 460px; margin: 3rem auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 2.2rem; box-shadow: var(--shadow);
}
.vv-form h1 { font-size: 1.7rem; margin-top: 0; }
.vv-form label { display: block; font-weight: 600; font-size: .9rem; margin: 1rem 0 .3rem; }
.vv-form input[type=text], .vv-form input[type=email], .vv-form input[type=password],
.vv-form select, .vv-form textarea {
  width: 100%; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; background: var(--cream); color: var(--ink);
}
.vv-form input:focus, .vv-form textarea:focus { outline: 2px solid var(--wine-bright); border-color: transparent; }
.vv-form .btn { width: 100%; justify-content: center; margin-top: 1.4rem; }
.vv-form .aux { text-align: center; font-size: .9rem; margin-top: 1rem; color: var(--muted); }

.vv-alert {
  background: #fdf6e3; border: 1px solid var(--gold); color: #6b5216;
  border-radius: 12px; padding: .8rem 1.1rem; margin-bottom: 1rem; font-size: .95rem;
}
.vv-alert--error { background: #fbeaea; border-color: #d88; color: #7a1f2b; }

/* ---------- Chat ---------- */
.vv-chat-wrap { display: flex; max-width: 1180px; margin: 0 auto; gap: 1.2rem; padding: 1.4rem 2rem; width: 100%; }
.vv-conv-list {
  width: 240px; flex-shrink: 0; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; height: fit-content; max-height: 72vh; overflow-y: auto;
}
.vv-conv-list a {
  display: block; padding: .5rem .7rem; border-radius: 10px; text-decoration: none;
  color: var(--ink); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vv-conv-list a:hover, .vv-conv-list a.active { background: var(--cream-2); }
.vv-chat {
  flex: 1; display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  min-height: 72vh; max-height: 82vh;
}
.vv-msgs { flex: 1; overflow-y: auto; padding: 1.6rem; }
.vv-msg { margin-bottom: 1.1rem; display: flex; gap: .8rem; }
.vv-msg .who {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #fff;
}
.vv-msg--user .who { background: var(--muted); }
.vv-msg--ai .who { background: linear-gradient(120deg, var(--wine-bright), var(--wine)); }
.vv-msg .bubble {
  background: var(--cream); border: 1px solid var(--line); border-radius: 14px;
  padding: .8rem 1.05rem; max-width: 85%; font-size: .96rem; white-space: pre-wrap; word-wrap: break-word;
}
.vv-msg--ai .bubble { background: #fff; }
/* Markdown-gerenderte Antworten */
.vv-msg .bubble.md-done { white-space: normal; }
.vv-msg .bubble.md-done p { margin: 0 0 .35rem; }
.vv-msg .bubble.md-done p:last-child { margin-bottom: 0; }
.vv-msg .bubble.md-done h4 { font-family: 'Fraunces', serif; color: var(--wine); margin: .55rem 0 .3rem; font-size: 1.02rem; }
.vv-msg .bubble.md-done ul, .vv-msg .bubble.md-done ol { margin: .2rem 0 .5rem; padding-left: 1.25rem; }
.vv-msg .bubble.md-done li { margin: .15rem 0; }
.vv-msg .bubble.md-done code { background: var(--cream-2); border-radius: 6px; padding: .05rem .35rem; font-size: .88em; }
.vv-msg .bubble.md-done .md-gap { height: .45rem; }
.vv-msg .bubble.md-done strong { color: var(--wine-deep); }
.vv-msg .sources { font-size: .76rem; color: var(--muted); margin-top: .45rem; }
.vv-msg .fb { margin-top: .5rem; display: flex; gap: .4rem; }
.fb-btn { background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; padding: .15rem .55rem; font-size: .85rem; }
.fb-btn:hover { background: var(--cream-2); }
.vv-followups { display: flex; flex-wrap: wrap; gap: .5rem; margin: -.4rem 0 1.1rem 3.1rem; }
.vv-fuchip { background: #fff; border: 1.5px solid var(--wine); color: var(--wine); border-radius: 999px;
  padding: .4rem 1rem; font-size: .84rem; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.vv-fuchip:hover { background: var(--wine); color: #fff; }
.vv-msg .sources span { background: var(--cream-2); border-radius: 999px; padding: .1rem .55rem; margin: 0 .25rem .25rem 0; display: inline-block; }
.vv-composer { display: flex; gap: .7rem; padding: 1rem 1.2rem; border-top: 1px solid var(--line); }
.vv-composer textarea {
  flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 14px;
  padding: .75rem .95rem; font: inherit; background: var(--cream); max-height: 140px;
}
.vv-composer button { align-self: flex-end; }
.vv-quota { text-align: center; font-size: .82rem; color: var(--muted); padding: .35rem; }
.vv-quota b { color: var(--wine); }
.vv-typing { color: var(--muted); font-style: italic; font-size: .9rem; }

/* Präferenz-Chips */
.vv-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 .6rem; }
.vv-chip { position: relative; }
.vv-chip input { position: absolute; opacity: 0; pointer-events: none; }
.vv-chip label {
  display: inline-block; margin: 0; padding: .42rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; font-size: .88rem; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.vv-chip input:checked + label { background: var(--wine); border-color: var(--wine); color: #fff; }

/* ---------- Tabelle (Admin) ---------- */
.vv-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.vv-table th, .vv-table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .9rem; }
.vv-table th { background: var(--wine-deep); color: #fff; font-weight: 600; }
.vv-table tr:hover td { background: var(--cream); }
.vv-table form { display: inline; }
.vv-table .btn { padding: .35rem .9rem; font-size: .78rem; }

/* ---------- Footer ---------- */
.vv-footer {
  text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: .85rem;
  border-top: 1px solid var(--line); margin-top: 3rem; background: var(--cream-2);
}
.vv-footer p { margin: .2rem 0; }

@media (max-width: 860px) {
  .vv-chat-wrap { flex-direction: column; padding: 1rem; }
  .vv-conv-list { width: 100%; max-height: 160px; }
  .vv-nav { padding: .8rem 1rem; }
}
