/* shared.css — Idea2Create Design System v3.0
   Source: i2c-design-tokens-v3.json
   Rule: Syne = Logo/Titel/Zahlen | IBM Plex Sans = alles andere
*/

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

/* ── CSS VARIABLES ── */
:root {
  --primary: #6B4EFF;
  --accent:  #00A6FB;
  --green:   #00C896;
  --gold:    #F5A623;
  --red:     #ef4444;
  --bg:      #080C16;
  --bg2:     #0D1220;
  --bg3:     #111827;
  --text:    #E8EDF5;
  --white:   #FFFFFF;
  --subtext: #5A6478;
  --border:  rgba(255,255,255,0.07);
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Dot grid */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(107,78,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107,78,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none; z-index: 0;
}

/* ── LOGO ── */
/* Design token: font Syne 800, 1.15rem, -0.01em, white. Span (the "2") = primary color, 1.25em */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  /* NO font-size:0 here - causes text to disappear */
}
.logo img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
/* The text part: IDEA2CREATE */
.logo-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: #fff;
  display: inline;
  /* Prevent whitespace from img→text creating a space */
  white-space: nowrap;
}
/* The "2" in IDEA2CREATE — larger because Syne renders numbers smaller */
.logo-name span {
  color: var(--primary) !important;
  font-size: 1.25em;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  vertical-align: middle;
  line-height: 0;
  display: inline;
}
/* auth-logo-text inside login card */
.auth-logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: #fff;
  user-select: none;
  display: inline-block;
}
.auth-logo-text span {
  color: var(--primary);
  font-size: 1.25em;
  font-weight: 800;
  font-family: inherit;
  vertical-align: middle;
  line-height: 0;
  display: inline;
}

/* ── HEADER ── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,12,22,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* ── NAV ── */
nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav a {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--subtext);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.18s;
  white-space: nowrap;
}
nav a:hover  { color: var(--white); background: rgba(255,255,255,0.06); }
nav a.active { color: var(--white); background: rgba(107,78,255,0.15); border: 1px solid rgba(107,78,255,0.25); }
nav a.submit-link { color: var(--green); background: rgba(0,200,150,0.08); border: 1px solid rgba(0,200,150,0.20); }
nav a.submit-link:hover { background: rgba(0,200,150,0.15); }

.beta-badge {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.62rem; font-weight: 700;
  background: rgba(245,166,35,0.12); color: var(--gold);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 100px; padding: 2px 7px; margin-left: 4px;
}

/* ── LANG TOGGLE ── */
#lang-toggle {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  color: var(--subtext);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 12px;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
#lang-toggle:hover { color: var(--white); background: rgba(255,255,255,0.09); }

/* ── AUTH HEADER ── */
.header-auth { display: flex; align-items: center; gap: 8px; }
.btn-login {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.78rem; font-weight: 700; color: var(--subtext);
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 14px; cursor: pointer;
  text-decoration: none; transition: all 0.18s; white-space: nowrap;
}
.btn-login:hover { color: var(--white); border-color: rgba(107,78,255,0.3); }
.btn-logout {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.78rem; font-weight: 700; color: var(--subtext);
  background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 14px; cursor: pointer;
  transition: all 0.18s; white-space: nowrap;
}
.btn-logout:hover { color: var(--red); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.05); }
.header-user {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.75rem; color: var(--subtext);
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── FOOTER ── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 24px 32px; text-align: center;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.77rem; color: var(--subtext);
}
footer a { color: var(--subtext); text-decoration: none; margin: 0 8px; transition: color 0.18s; }
footer a:hover { color: var(--white); }

/* ── BUTTONS ── */
.btn-primary {
  display: block; width: 100%; text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 0.9rem;
  padding: 14px 22px; border-radius: 12px; border: none;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 20px rgba(107,78,255,0.35);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #7c63ff, #00A6FB);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(107,78,255,0.55);
}
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  display: block; width: 100%; text-align: center;
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.65);
  font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; font-size: 0.84rem;
  padding: 11px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer; text-decoration: none; transition: background 0.18s, color 0.18s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.09); color: var(--white); }

/* ── CATEGORY PILLS ── */
.card-category {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 100px; border: 1px solid;
}
.cat-Technologie    { color: #60A5FA; border-color: rgba(96,165,250,0.25);  background: rgba(96,165,250,0.07); }
.cat-Gesundheit     { color: #34D399; border-color: rgba(52,211,153,0.25);  background: rgba(52,211,153,0.07); }
.cat-Startup        { color: #A78BFA; border-color: rgba(167,139,250,0.25); background: rgba(167,139,250,0.07); }
.cat-Nachhaltigkeit { color: #6EE7B7; border-color: rgba(110,231,183,0.25); background: rgba(110,231,183,0.07); }
.cat-Finanzen       { color: #FCD34D; border-color: rgba(252,211,77,0.25);  background: rgba(252,211,77,0.07); }
.cat-Bildung        { color: #F9A8D4; border-color: rgba(249,168,212,0.25); background: rgba(249,168,212,0.07); }
.cat-Marketing      { color: #FB923C; border-color: rgba(251,146,60,0.25);  background: rgba(251,146,60,0.07); }
.cat-Social         { color: #38BDF8; border-color: rgba(56,189,248,0.25);  background: rgba(56,189,248,0.07); }
/* Phase 4 — new categories */
.cat-Handel         { color: #FCD34D; border-color: rgba(252,211,77,0.25);  background: rgba(252,211,77,0.07); }
.cat-Dienstleistung { color: #FB923C; border-color: rgba(251,146,60,0.25);  background: rgba(251,146,60,0.07); }
.cat-Anderes        { color: #94A3B8; border-color: rgba(148,163,184,0.25); background: rgba(148,163,184,0.07); }

/* ── SCORE BAR ── */
.score-wrap  { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.score-label { font-family: 'IBM Plex Sans', sans-serif; font-size: 0.67rem; color: var(--subtext); font-weight: 600; }
.score-value { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 800; color: var(--white); }
.score-bar   { width: 48px; height: 4px; background: rgba(255,255,255,0.08); border-radius: 100px; overflow: hidden; }
.score-fill  { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* ── FORM FIELDS ── */
.field { margin-bottom: 20px; }
.field-label {
  display: block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  color: rgba(255,255,255,0.75); margin-bottom: 6px; letter-spacing: 0.02em;
}
.field-label .req { color: var(--primary); margin-left: 2px; }
.field-hint {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.79rem; color: var(--subtext); margin-bottom: 6px;
}

input[type=text], input[type=email], textarea, select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 15px;
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem; outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  resize: vertical;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(107,78,255,0.45);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 4px rgba(107,78,255,0.1), 0 8px 40px rgba(0,0,0,0.4);
}
input::placeholder, textarea::placeholder { color: var(--subtext); font-weight: 400; }
select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A6478' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select option { background: var(--bg3); }

.char-footer { display: flex; justify-content: flex-end; margin-top: 4px; }
.char-count  { font-family: 'IBM Plex Sans', sans-serif; font-size: 0.7rem; color: var(--subtext); }

/* ── MISC ── */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.82rem; color: var(--subtext); text-decoration: none;
  margin-bottom: 28px; transition: color 0.18s;
}
.back-link:hover { color: var(--white); }

.banner { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; font-family: 'IBM Plex Sans', sans-serif; font-size: 0.86rem; font-weight: 600; margin-bottom: 24px; }
.banner-success { background: rgba(0,200,150,0.1);  border: 1px solid rgba(0,200,150,0.3);  color: var(--green); }
.banner-error   { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);  color: var(--red); }

/* ── FOUNDER BADGE ── */
.founder-badge-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.70rem; font-weight: 700;
  color: #111;
  background: linear-gradient(135deg, #F5A623, #f0c040);
  border-radius: 100px; padding: 3px 10px;
  box-shadow: 0 4px 16px rgba(245,166,35,0.3);
}

/* ── SPINNER ── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(107,78,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes blink   { 0%,100%{opacity:1} 50%{opacity:.2} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes scaleIn { from{transform:scale(.93)} to{transform:scale(1)} }
@keyframes pulse   { 0%,100%{opacity:1} 50%{opacity:.3} }


/* ── FIELD INPUT (alias for form inputs with class) ── */
.field-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 15px;
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem; outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field-input:focus {
  border-color: rgba(107,78,255,0.45);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 4px rgba(107,78,255,0.1);
}
.field-input::placeholder { color: var(--subtext); font-weight: 400; }
.field-textarea {
  width: 100%; resize: vertical; min-height: 90px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 15px;
  color: var(--text); font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem; outline: none; line-height: 1.6;
  transition: border-color 0.2s, background 0.2s;
}
.field-textarea:focus {
  border-color: rgba(107,78,255,0.45);
  background: rgba(255,255,255,0.07);
}
.field-textarea::placeholder { color: var(--subtext); }

hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  header { padding: 10px 14px; gap: 6px; }
  nav a span.nav-label { display: none; }
  nav a { padding: 7px 10px; min-width: 36px; justify-content: center; }
  .logo-name { display: none; }
  footer { padding: 18px 16px; font-size: 0.75rem; }
  /* Header-Einstellungen-Button: nur Icon auf mobile */
  #header-settings-btn span { display: none; }
  #header-settings-btn { padding: 7px 10px; }
  /* Lang-Toggle kleiner */
  #lang-toggle { padding: 5px 10px; font-size: .68rem; }
}
@media (max-width: 400px) {
  /* Sehr kleine Screens: DE/EN auch verstecken wenn nötig */
  nav a { padding: 6px 8px; }
}

/* ── CHAT WIDGET (alle Seiten) ─────────────────────────────────────── */
#chat-btn {
  position: fixed; bottom: 28px; right: 28px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 28px rgba(107,78,255,.5);
  z-index: 9999; transition: transform .2s, box-shadow .2s;
}
#chat-btn:hover { transform: scale(1.1); box-shadow: 0 8px 36px rgba(107,78,255,.65); }
#chat-btn svg { width: 24px; height: 24px; color: #fff; }
#chat-btn .chat-badge {
  position: absolute; top: -4px; right: -4px;
  width: 14px; height: 14px; background: var(--green);
  border-radius: 50%; border: 2px solid var(--bg);
  animation: blink 2s ease-in-out infinite;
}
#chat-window {
  position: fixed; bottom: 96px; right: 28px;
  width: 340px; max-height: 480px;
  background: var(--bg2); border: 1px solid rgba(107,78,255,.25);
  border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6);
  z-index: 9999; display: none; flex-direction: column; overflow: hidden;
  animation: scaleIn .25s cubic-bezier(.22,1,.36,1);
}
@keyframes scaleIn { from{transform:scale(.93)} to{transform:scale(1)} }
#chat-window.open { display: flex; }
.chat-header {
  background: rgba(107,78,255,.1); border-bottom: 1px solid rgba(107,78,255,.15);
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
}
.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: #fff; flex-shrink: 0;
}
.chat-header-text { font-size: .82rem; font-weight: 700; color: #fff; }
.chat-header-sub  { font-size: .72rem; color: var(--green); display: flex; align-items: center; gap: 4px; }
.chat-header-sub::before { content:''; display:inline-block; width:6px; height:6px; background:var(--green); border-radius:50%; }
.chat-close { background: none; border: none; color: var(--subtext); cursor: pointer; font-size: 1.1rem; padding: 4px; }
.chat-close:hover { color: #fff; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: rgba(107,78,255,.2) transparent;
}
.chat-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: .83rem; line-height: 1.5; }
.chat-msg.bot { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.85); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.bot a { color: var(--primary); text-decoration: none; }
.chat-msg.user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-typing { display: flex; align-self: flex-start; padding: 10px 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; border-bottom-left-radius: 4px; gap: 4px; align-items: center; }
.chat-typing span { width: 6px; height: 6px; background: var(--subtext); border-radius: 50%; animation: typingBounce 1.2s ease-in-out infinite; display: inline-block; }
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat-chip { background: rgba(107,78,255,.1); border: 1px solid rgba(107,78,255,.25); border-radius: 100px; padding: 5px 12px; font-size: .76rem; color: rgba(255,255,255,.7); cursor: pointer; font-family: 'IBM Plex Sans', sans-serif; transition: all .15s; }
.chat-chip:hover { background: rgba(107,78,255,.25); color: #fff; }
.chat-input-row { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid rgba(255,255,255,.05); }
#chat-input { flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 9px 13px; color: #fff; font-family: 'IBM Plex Sans', sans-serif; font-size: .82rem; outline: none; transition: border-color .2s; }
#chat-input::placeholder { color: var(--subtext); }
#chat-input:focus { border-color: rgba(107,78,255,.4); }
#chat-send { width: 36px; height: 36px; background: var(--primary); border: none; border-radius: 10px; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .2s; }
#chat-send:hover { background: #7c63ff; }
#chat-send svg { width: 14px; height: 14px; }
@media (max-width: 480px) {
  #chat-window { width: calc(100vw - 32px); right: 16px; }
  #chat-btn { right: 16px; bottom: 16px; }
}

/* ── BTN-SM TOUCH TARGET (mobile) ───────────────────────────────── */
.btn-sm {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 640px) {
  .btn-sm { min-height: 40px; padding: 8px 14px; font-size: .8rem; }
}

/* ── FLOATING BUTTONS iOS SAFE AREA ─────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #chat-btn, #fb-btn { bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* ── MOBILE BURGER NAV ─────────────────────────────────────────────── */
#burger-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--subtext);
  font-size: 1.1rem;
  line-height: 1;
  transition: all .18s;
}
#burger-btn:hover { color: #fff; border-color: rgba(107,78,255,.4); }

#mobile-menu {
  display: none;
  position: fixed;
  top: 57px;
  left: 0; right: 0;
  background: rgba(8,12,22,.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  z-index: 99;
  padding: 12px 0 16px;
  flex-direction: column;
}
#mobile-menu.open { display: flex; }
#mobile-menu a {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  color: var(--subtext);
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 0;
  transition: background .15s, color .15s;
}
#mobile-menu a:hover, #mobile-menu a.active { color: #fff; background: rgba(107,78,255,.12); }
#mobile-menu a.submit-link { color: var(--green); }
#mobile-menu .mobile-divider { height: 1px; background: var(--border); margin: 6px 24px; }

@media (max-width: 640px) {
  #burger-btn { display: block; }
  nav { display: none !important; }
}
@media (min-width: 641px) {
  #mobile-menu { display: none !important; }
  nav { display: flex !important; }
}
