/* ===== VARIABLEN ===== */
:root {
  --bg: #F5EFE2;
  --bg2: #EDE5D0;
  --bg3: #E2D9C0;
  --accent: #B8962E;
  --accent2: #D4AE48;
  --accent-dark: #8A6E1A;
  --text: #2C1A0A;
  --text-muted: #7A6045;
  --border: #C8B48A;
  --card: #FAF6EE;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(44,26,10,0.12);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border-bottom: 1px solid var(--border);
  padding: 24px 0 20px;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.header-logo-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.header-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}
.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
}
.logo span { color: var(--accent); }
.header-tagline {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 3px;
}

/* ===== TABS ===== */
.tab-nav {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.tab-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-nav-inner::-webkit-scrollbar { display: none; }
.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab-btn:hover { color: var(--accent2); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== MAIN ===== */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ===== TOOL PANELS ===== */
.tool-panel { display: none; }
.tool-panel.active { display: block; }

.tool-header {
  margin-bottom: 28px;
}
.tool-header h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tool-header p { color: var(--text-muted); font-size: 15px; }

.tool-body {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

/* ===== FORM ===== */
.form-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  color: var(--accent-dark);
}
.field input,
.field select,
.field textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field select option { background: var(--bg2); }

.btn-generate {
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 4px;
}
.btn-generate:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-generate:active { transform: translateY(0); }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== RESULT COLUMN ===== */
.result-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 400px;
  overflow: hidden;
}

.result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--text-muted);
  gap: 12px;
}
.placeholder-icon { font-size: 48px; opacity: 0.3; }

/* ===== HOOK RESULTS ===== */
.hooks-result { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.hook-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: border-color 0.2s;
}
.hook-card:hover { border-color: var(--accent-dark); }
.hook-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hook-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--accent-dark);
  color: white;
  padding: 3px 8px;
  border-radius: 20px;
}
.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.hook-text { font-size: 15px; font-weight: 500; line-height: 1.5; margin-bottom: 8px; }
.hook-why {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg3);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 2px solid var(--accent-dark);
}

/* ===== CAPTION RESULT ===== */
.caption-result { padding: 24px; }
.caption-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.hashtag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hashtag {
  background: var(--bg3);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
}
.caption-note {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-dark);
}

/* ===== EMAIL RESULT ===== */
.email-result { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.email-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.email-header {
  background: var(--bg3);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.email-num { font-weight: 700; color: var(--accent); font-size: 13px; }
.email-timing { font-size: 12px; color: var(--text-muted); }
.email-body { padding: 16px; }
.email-subject { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.email-preview { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.email-text { font-size: 14px; line-height: 1.7; white-space: pre-wrap; margin-bottom: 12px; }
.email-cta {
  display: inline-block;
  background: var(--accent-dark);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* ===== REEL RESULT ===== */
.reel-result { padding: 24px; }
.reel-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.reel-badge {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--accent2);
}
.scene-list { display: flex; flex-direction: column; gap: 12px; }
.scene {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.scene-timing {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.scene-row { display: flex; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.scene-label { color: var(--text-muted); min-width: 100px; font-weight: 600; font-size: 12px; }
.scene-value { color: var(--text); line-height: 1.5; }
.spoken-text { font-size: 14px; font-weight: 500; font-style: italic; color: var(--accent2); }

/* ===== FUNNEL RESULT ===== */
.funnel-result { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.funnel-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.funnel-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 10px;
}
.funnel-headline { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.funnel-sub { color: var(--text-muted); font-size: 14px; }
.funnel-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.funnel-list li { font-size: 14px; padding-left: 16px; position: relative; }
.funnel-list li::before { content: "✓"; color: var(--accent); position: absolute; left: 0; }
.faq-item { margin-bottom: 12px; }
.faq-q { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.faq-a { font-size: 14px; color: var(--text-muted); }

/* ===== ANGEBOT RESULT ===== */
.angebot-result { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.angebot-name { font-size: 22px; font-weight: 700; color: var(--accent2); }
.angebot-tagline { font-size: 15px; color: var(--text-muted); margin-top: 4px; }
.angebot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.angebot-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.angebot-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}
.umsatz-row { display: flex; gap: 8px; flex-wrap: wrap; }
.umsatz-badge {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}
.umsatz-badge.low { background: #1a2a1a; color: #6dbf6d; border: 1px solid #2a4a2a; }
.umsatz-badge.mid { background: #1a2040; color: #7090df; border: 1px solid #2a3060; }
.umsatz-badge.high { background: #2a1a30; color: var(--accent2); border: 1px solid #4a2a50; }
.positionierung {
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  color: var(--accent2);
  text-align: center;
}

/* ===== CHAT ===== */
.chat-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: 600px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.chat-message { display: flex; }
.chat-message.user { justify-content: flex-end; }
.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
}
.chat-message.assistant .chat-bubble {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  white-space: pre-wrap;
}
.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-input-row {
  border-top: 1px solid var(--border);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
#chat-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  transition: border-color 0.2s;
}
#chat-input:focus { outline: none; border-color: var(--accent); }
.btn-send {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.btn-send:hover { opacity: 0.9; }

/* ===== LOADING ===== */
.hidden { display: none !important; }
.loading-dots::after {
  content: '...';
  animation: dots 1.2s steps(3, end) infinite;
}
@keyframes dots {
  0%, 100% { content: '.'; }
  33% { content: '..'; }
  66% { content: '...'; }
}

/* ===== COPY SUCCESS ===== */
.copy-btn.copied { border-color: #6dbf6d; color: #6dbf6d; }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .tool-body { grid-template-columns: 1fr; }
  .angebot-grid { grid-template-columns: 1fr; }
  .chat-container { height: 500px; }
  .tab-btn { padding: 12px 12px; font-size: 13px; }
}
