/* Ideen WIRK-Wunder App — WUNDERbare MÖGLICHkeiten n.e.V. */

:root {
  --bg:           #0b1e0f;
  --bg-elev:      #112415;
  --bg-card:      #152a19;
  --bg-sidebar:   #091a0c;
  --border:       #1e3d24;
  --border-strong:#2a5532;
  --ink:          #f2f9ee;
  --ink-dim:      #b5d4ab;
  --ink-muted:    #6a9870;
  --accent:       #7cc520;
  --accent-bright:#98e028;
  --accent-deep:  #4a7a12;
  --sun:          #f5d000;
  --danger:       #e07060;
  --success:      #7cc520;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, system-ui, sans-serif;
  --sidebar-w: 320px;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ─── Layout ──────────────────────────────────────────── */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────────── */

.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.sidebar-head {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #0a1a0c;
  font-size: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(124,197,32,0.3);
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.1;
  color: var(--accent);
}

.brand-sub {
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 3px;
}

.sync-btn {
  margin-left: auto;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-deep);
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sync-btn:hover:not(:disabled) { background: var(--accent); color: #0a1a0c; }
.sync-btn:disabled { opacity: 0.6; cursor: wait; }

.new-btn {
  width: 100%;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-deep);
  border-radius: 4px;
  padding: 11px 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.15s;
}
.new-btn:hover { background: var(--accent); color: #0a1a0c; border-color: var(--accent); }

.search-wrap {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.search-wrap input {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 10px 14px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  transition: border-color 0.15s;
}
.search-wrap input::placeholder { color: var(--ink-muted); }
.search-wrap input:focus { outline: none; border-color: var(--accent-deep); }

.library-section {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 20px;
}
.library-section::-webkit-scrollbar { width: 6px; }
.library-section::-webkit-scrollbar-track { background: transparent; }
.library-section::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.library-section::-webkit-scrollbar-thumb:hover { background: var(--accent-deep); }

.library-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--ink-muted);
  padding: 10px 24px 14px;
}

.library-list { list-style: none; }

.library-item {
  padding: 12px 20px 12px 24px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}
.library-item:hover { background: rgba(124,197,32,0.04); }
.library-item.active { background: rgba(124,197,32,0.08); border-left-color: var(--accent); }

.li-row { display: flex; gap: 10px; align-items: flex-start; }
.li-main { flex: 1; min-width: 0; }

.li-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.li-fav-inline { color: var(--accent); margin-right: 4px; }

.score-pill {
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 7px;
}
.score-pill.green { background: rgba(124,197,32,0.12); color: var(--accent-bright); border: 1px solid var(--accent-deep); }
.score-pill.amber { background: rgba(245,208,0,0.1);  color: var(--sun); border: 1px solid #5a4a00; }
.score-pill.coral { background: rgba(224,112,96,0.1);  color: #e07060; border: 1px solid #5a2a20; }

.li-meta { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.li-date { font-size: 10px; color: var(--accent-deep); letter-spacing: 1px; text-transform: uppercase; }
.li-sub  { font-size: 11.5px; color: var(--ink-muted); line-height: 1.35; font-style: italic; }

.library-empty {
  display: none;
  padding: 30px 24px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
  font-style: italic;
}

/* ─── Main ────────────────────────────────────────────── */

.main {
  padding: 60px 64px 80px;
  background:
    radial-gradient(ellipse 900px 500px at 50% -150px, rgba(124,197,32,0.07), transparent 60%),
    var(--bg);
}

.hidden { display: none !important; }

/* ─── Hero / Formular ─────────────────────────────────── */

.view-new { max-width: 760px; }

.kicker {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.5px;
  margin: 16px 0 20px;
  color: var(--ink);
}
.hero h1 em { font-style: italic; color: var(--accent); }

.lede {
  font-size: 17px;
  max-width: 600px;
  color: var(--ink-dim);
  margin: 0 0 36px;
  line-height: 1.7;
}

.projekt-form { display: flex; flex-direction: column; gap: 20px; max-width: 720px; }

.form-field { display: flex; flex-direction: column; gap: 6px; }

.form-label { font-size: 13px; font-weight: 600; color: var(--ink-dim); }
.form-label .req { color: var(--accent); }
.form-label .optional { font-weight: 400; color: var(--ink-muted); font-size: 12px; }

.projekt-form input[type="text"],
.projekt-form textarea {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 14px 18px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.projekt-form input[type="text"]:focus,
.projekt-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,197,32,0.15);
}
.projekt-form input[type="text"]::placeholder,
.projekt-form textarea::placeholder { color: var(--ink-muted); }

/* Upload */
.upload-area {
  background: var(--bg-elev);
  border: 2px dashed var(--border-strong);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  cursor: default;
  transition: border-color 0.2s, background 0.2s;
}
.upload-area.drag-active { border-color: var(--accent); background: rgba(124,197,32,0.04); }
.upload-icon  { font-size: 28px; margin-bottom: 8px; }
.upload-text  { font-size: 14px; color: var(--ink-dim); margin-bottom: 4px; }
.upload-hint  { font-size: 12px; color: var(--ink-muted); margin-bottom: 12px; }
.upload-select-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-deep);
  border-radius: 4px;
  padding: 8px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.upload-select-btn:hover { background: var(--accent); color: #0a1a0c; }
.file-input { display: none; }

.upload-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(124,197,32,0.08);
  border: 1px solid var(--accent-deep);
  border-radius: 6px;
  padding: 12px 16px;
}
.upload-selected.hidden { display: none; }
.upload-file-icon { font-size: 18px; }
.upload-filename { flex: 1; font-size: 13px; color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-remove-btn { background: none; border: none; color: var(--ink-muted); cursor: pointer; font-size: 14px; padding: 2px 4px; }
.upload-remove-btn:hover { color: var(--danger); }

.upload-info { font-size: 12px; color: var(--ink-muted); line-height: 1.5; margin-top: 6px; }

.contributor-wrap { margin-top: 4px; }
.contributor-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  padding: 10px 4px;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 13.5px;
  transition: border-color 0.2s, color 0.2s;
}
.contributor-wrap input::placeholder { color: var(--ink-muted); opacity: 0.7; }
.contributor-wrap input:focus { outline: none; border-bottom-color: var(--accent); color: var(--ink); }

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: #0a1a0c;
  border: none;
  border-radius: 4px;
  padding: 18px 32px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
}
.submit-btn:hover:not(:disabled) { background: var(--accent-bright); transform: translateY(-1px); }
.submit-btn:disabled { opacity: 0.5; cursor: wait; }
.btn-arrow { font-size: 18px; }

.status { font-size: 14px; min-height: 22px; margin-top: 4px; letter-spacing: 0.3px; color: var(--ink-muted); }
.status.error   { color: var(--danger); }
.status.success { color: var(--success); }

/* ─── Lade-Ansicht ────────────────────────────────────── */

.view-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.loading-center { text-align: center; }

.gauge-wrap { display: inline-block; margin-bottom: 16px; }

.gauge-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 6px;
}

.loading-msg { font-size: 16px; color: var(--ink-dim); margin-bottom: 18px; }

.loading-dots { display: flex; justify-content: center; gap: 6px; }
.loading-dots span {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: dot-pulse 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40%            { opacity: 1;    transform: scale(1); }
}

/* ─── Detail-Ansicht ──────────────────────────────────── */

.view-detail { animation: fadein 0.4s ease; }
@keyframes fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
  flex-wrap: wrap;
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.15s;
}
.back-btn:hover { color: var(--accent); }

.toolbar-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 7px 12px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover  { border-color: var(--accent); color: var(--accent); }
.icon-btn.active { color: var(--accent); border-color: var(--accent); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ─── Cards ───────────────────────────────────────────── */

#detail-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 30px 34px;
}

.card .kicker { margin-bottom: 10px; display: block; }

.project-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.2;
}

.project-info { font-size: 12.5px; color: var(--ink-muted); letter-spacing: 0.3px; }

/* Gauge Result */
.gauge-result-card { padding: 30px 34px; }
.gauge-result-wrap { display: flex; align-items: center; gap: 32px; }
.gauge-result-visual { flex-shrink: 0; }
.gauge-result-info { flex: 1; }

.score-number {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.score-number.score-green { color: var(--accent-bright); }
.score-number.score-amber { color: var(--sun); }
.score-number.score-coral { color: #e07060; }

.score-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.score-begruendung {
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.65;
  margin-bottom: 12px;
}
.score-tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.score-tag {
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  padding: 4px 12px;
  letter-spacing: 0.5px;
}
.score-tag.tag-green { background: rgba(124,197,32,0.12); color: var(--accent-bright); border: 1px solid var(--accent-deep); }
.score-tag.tag-amber { background: rgba(245,208,0,0.1);  color: var(--sun); border: 1px solid #5a4a00; }
.score-tag.tag-coral { background: rgba(224,112,96,0.1);  color: #e07060; border: 1px solid #5a2a20; }

/* Kernthema */
.kern-card {
  background: linear-gradient(135deg, rgba(124,197,32,0.08), rgba(124,197,32,0.02));
  border-color: var(--accent-deep);
}
.kernthema {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  font-style: italic;
}

/* Ideen-Grid */
.ideen-section { }

.section-h {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  margin: 8px 0 20px;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.ideen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.idee-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}
.idee-card:hover { border-color: var(--accent-deep); transform: translateY(-2px); }

.idee-card:first-child {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(124,197,32,0.08), var(--bg-card) 60%);
  border-color: var(--accent-deep);
}

.idee-num {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
}

.idee-card h4 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.idee-beschreibung {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
}

.idee-meta-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.idee-meta-item { display: flex; flex-direction: column; gap: 2px; }

.idee-meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}

.idee-meta-text {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.55;
}

/* Schritte */
.schritte-section { }

.schritte-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.schritt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.schritt-card:hover { border-color: var(--accent-deep); transform: translateY(-2px); }

.schritt-num {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.schritt-card h4 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.3;
}

.schritt-warum,
.schritt-wie {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.6;
  margin-top: 8px;
}
.schritt-warum strong,
.schritt-wie strong { color: var(--accent); font-weight: 500; letter-spacing: 0.3px; }

/* Fragen */
.fragen-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 18px;
}

.fragen-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: q;
}
.fragen-list li {
  counter-increment: q;
  font-size: 16px;
  color: var(--ink);
  padding: 16px 0 16px 38px;
  border-bottom: 1px solid var(--border);
  position: relative;
  line-height: 1.6;
}
.fragen-list li:last-child { border-bottom: none; }
.fragen-list li::before {
  content: counter(q, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 13px;
  font-family: var(--serif);
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
}

/* Impuls */
.impuls-card {
  background: linear-gradient(135deg, rgba(124,197,32,0.1), var(--bg-card) 70%);
  border-color: var(--accent-deep);
}
.herzens-impuls {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
  font-style: italic;
  text-align: center;
  padding: 4px 0;
}

/* ─── Responsive ──────────────────────────────────────── */

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .main { padding: 32px 20px 60px; }
  .ideen-grid { grid-template-columns: 1fr; }
  .schritte-grid { grid-template-columns: 1fr; }
}
