/* ============================================================
   derKIassistent – surf.css
   Styles nur für /surf/ (KI-Tool Interface)
   Einbinden zusätzlich zu main.css:
   <link rel="stylesheet" href="/assets/css/surf.css">
   ============================================================ */

/* ── CODE GATE ──────────────────────────────────────────────── */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--ink);
}
.gate-card {
  background: linear-gradient(135deg, #1a4a5e, #0e2d3d);
  border: 1px solid rgba(0,180,216,0.2);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.gate-logo {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 8px;
}
.gate-logo span { color: var(--wave); }
.gate-tagline { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 40px; }
.gate-title  { font-family: 'Unbounded', sans-serif; font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.gate-sub    { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 28px; line-height: 1.6; }

.gate-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  color: var(--white);
  font-family: 'Unbounded', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-align: center;
  padding: 16px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  text-transform: uppercase;
}
.gate-input:focus { border-color: var(--wave); }
.gate-input::placeholder {
  font-size: 13px;
  letter-spacing: 0.05em;
  font-weight: 400;
  color: var(--muted);
  font-family: 'Epilogue', sans-serif;
}

.gate-btn {
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  background: var(--wave);
  color: var(--ink);
  border: none;
  border-radius: 8px;
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
}
.gate-btn:hover:not(:disabled) { background: #00c4e8; }
.gate-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.gate-error   { margin-top: 16px; color: #f87171; font-size: 13px; display: none; }
.gate-error.visible { display: block; }
.gate-spinner { display: none; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; color: rgba(255,255,255,0.4); font-size: 13px; }
.gate-spinner.visible { display: flex; }

/* ── APP ────────────────────────────────────────────────────── */
#app { display: none; }
#app.visible { display: block; }

/* ── TOPBAR ─────────────────────────────────────────────────── */
.topbar {
  background: var(--ink);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo { font-family: 'Unbounded', sans-serif; font-size: 13px; font-weight: 700; color: var(--white); letter-spacing: 0.04em; }
.logo span { color: var(--wave); }
.code-badge {
  background: rgba(0,110,150,0.1);
  border: 1px solid rgba(0,110,150,0.3);
  color: var(--ocean);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 5px 14px;
  border-radius: 100px;
  font-family: 'Unbounded', monospace;
}

/* ── SURF HERO ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-mid) 60%, #c4e4ef 100%);
  padding: 48px 32px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,180,216,0.15) 0%, transparent 70%);
  top: -200px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13,148,136,0.1);
  border: 1px solid rgba(13,148,136,0.3);
  color: var(--teal);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(20px, 4vw, 32px);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 12px;
}
.hero h1 em { font-style: normal; color: var(--teal); }
.hero p { font-size: 14px; color: var(--muted); font-weight: 300; max-width: 460px; margin: 0 auto; line-height: 1.7; }

/* ── SETUP BAR ──────────────────────────────────────────────── */
.setup-bar {
  background: var(--bg-mid);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.setup-label { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.setup-bar input {
  flex: 1;
  min-width: 200px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: 'Epilogue', monospace;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
}
.setup-bar input:focus { border-color: var(--wave); }
.setup-bar input::placeholder { color: var(--muted); }
.key-status { font-size: 11px; padding: 6px 14px; border-radius: 100px; white-space: nowrap; }
.key-status.empty { background: rgba(0,110,150,0.08); color: var(--muted); border: 1px solid var(--border); }
.key-status.set   { background: rgba(5,150,105,0.15); color: #34d399; border: 1px solid rgba(5,150,105,0.3); }

/* ── MAIN TOOL AREA ─────────────────────────────────────────── */
.tool-main { background: var(--bg); min-height: calc(100vh - 60px); padding: 32px; }

/* ── TABS ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  background: var(--white);
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(11,20,32,0.08);
  max-width: 640px;
}
.tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-family: 'Epilogue', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--muted);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tab.active { background: var(--ocean); color: var(--white); box-shadow: 0 2px 8px rgba(11,20,32,0.25); }
.tab:not(.active):hover { background: var(--foam); color: var(--ocean); }

.panel { display: none; }
.panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .panel.active { grid-template-columns: 1fr; } }

@media (max-width: 600px) {
  .topbar {
    padding: 8px 16px;
    height: auto;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .logo { font-size: 12px; }
  .topbar .flex-center-gap {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  .logout-btn {
    font-size: 10px;
    padding: 4px 10px;
    margin-left: 0;
  }
  .topbar .plan-badge { font-size: 9px; padding: 4px 10px; }
  .topbar .lang-switcher-small { padding: 2px 4px; gap: 2px; }
  .topbar .lang-switcher-small a { font-size: 10px; padding: 3px 7px; }
  .tool-main { padding: 16px 12px; }
  .tabs {
    overflow-x: auto;
    max-width: 100%;
    padding: 4px;
    gap: 4px;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    font-size: 11px;
    padding: 9px 10px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
}

/* ── TOOL CARDS ─────────────────────────────────────────────── */
.tool-card { background: var(--white); border-radius: 12px; box-shadow: 0 2px 16px rgba(11,20,32,0.07); overflow: hidden; }
.tool-card .card-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.card-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.card-icon.blue  { background: var(--foam); }
.card-icon.amber { background: #fef9ec; }
.card-title { font-family: 'Unbounded', sans-serif; font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: 0.02em; }
.card-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tool-card .card-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }

/* ── CONFIG SECTION ─────────────────────────────────────────── */
.config-section { background: var(--foam); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.config-section label { display: block; font-size: 11px; font-weight: 500; color: var(--ocean); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.config-section textarea,
.config-section input {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: 'Epilogue', sans-serif;
  font-size: 13px;
  color: var(--ink);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.5;
}
.config-section textarea:focus,
.config-section input:focus { border-color: var(--ocean); }

.save-profile-btn {
  background: var(--ocean);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: 'Epilogue', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  align-self: flex-start;
}
.save-profile-btn:hover { background: var(--ink); }
.save-status { font-size: 11px; color: #34d399; display: none; font-style: italic; }

/* ── INPUT / OUTPUT ─────────────────────────────────────────── */
.input-label { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }

textarea.main-input {
  width: 100%;
  background: #f0f8fb;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-family: 'Epilogue', sans-serif;
  font-size: 14px;
  color: var(--ink);
  resize: vertical;
  min-height: 100px;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.6;
}
textarea.main-input:focus { border-color: var(--ocean); background: var(--white); }

.output-card { background: var(--white); border-radius: 12px; box-shadow: 0 2px 16px rgba(11,20,32,0.07); overflow: hidden; }
.output-header { padding: 14px 20px; background: var(--ocean); display: flex; align-items: center; justify-content: space-between; }
.output-title { font-family: 'Unbounded', sans-serif; font-size: 11px; font-weight: 700; color: var(--white); letter-spacing: 0.05em; display: flex; align-items: center; gap: 8px; }
.copy-btn { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); font-family: 'Epilogue', sans-serif; font-size: 11px; padding: 5px 12px; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.copy-btn:hover  { background: rgba(255,255,255,0.18); color: var(--white); }
.copy-btn.copied { color: #34d399; border-color: #34d399; }
.output-body { padding: 20px 22px; font-size: 14px; color: var(--ink); line-height: 1.75; white-space: pre-wrap; word-break: break-word; }

.social-outputs  { display: flex; flex-direction: column; gap: 16px; }
.social-variant  { border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; }
.variant-label   { background: var(--foam); padding: 8px 14px; font-size: 11px; font-weight: 500; color: var(--ocean); letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; }
.variant-body    { padding: 14px; font-size: 13px; color: var(--ink); line-height: 1.7; white-space: pre-wrap; }

/* ── TOOL BUTTONS ───────────────────────────────────────────── */
.btn-tool {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-tool-teal  { background: var(--teal); color: var(--white); }
.btn-tool-teal:hover:not(:disabled)  { background: #0f766e; }
.btn-tool-amber { background: var(--amber); color: var(--ink); }
.btn-tool-amber:hover:not(:disabled) { background: #d97706; color: var(--white); }
.btn-tool:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── LOADING / ERROR ────────────────────────────────────────── */
.loading { display: none; align-items: center; gap: 12px; padding: 20px 22px; color: var(--muted); font-size: 13px; font-style: italic; }
.loading.visible { display: flex; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--ocean); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-msg { display: none; background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 12px 16px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.error-msg.visible { display: block; }

/* ── EXAMPLE CHIPS ──────────────────────────────────────────── */
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.example-chip {
  background: var(--foam);
  border: 1px solid var(--border);
  color: var(--ocean);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s;
}
.example-chip:hover { background: var(--ocean); color: var(--white); border-color: var(--ocean); }

/* ── FOOTER NOTE ────────────────────────────────────────────── */
.footer-note { text-align: center; padding: 24px; color: var(--muted); font-size: 11px; font-style: italic; background: var(--bg-mid); }

/* ── Gate: Yoga/Fewo spezifische Klassen ── */
.gate-product {
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wave);
  margin-bottom: 16px;
}
.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.gate-form input[type="text"] {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  color: var(--white);
  font-family: 'Unbounded', monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 14px 16px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  text-transform: uppercase;
}
.gate-form input[type="text"]:focus { border-color: var(--wave); }
.gate-form input[type="text"]::placeholder {
  font-size: 13px;
  letter-spacing: 0.05em;
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  font-family: 'Epilogue', sans-serif;
  text-transform: none;
}
.gate-hint {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.gate-hint a { color: var(--wave); text-decoration: none; }
.gate-hint a:hover { text-decoration: underline; }
.gate-demo {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
}
.gate-demo a { color: var(--wave); text-decoration: none; }
.gate-demo a:hover { text-decoration: underline; }
.btn-gate {
  width: 100%;
  padding: 14px;
  background: var(--wave);
  color: var(--ink);
  border: none;
  border-radius: 8px;
  font-family: 'Unbounded', sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-gate:hover { background: #00c4e8; }
