/* ============================================================
   🌈 EVO FEED — STYLE SHEET (Endversion, inkl. Delete-Modal)
   ============================================================ */

/* ------------------ Farbvariablen ----------------- */
:root {
  --bg: #f7fbff;
  --surface: #ffffff;
  --muted: #64748b;
  --text: #0f1724;
  --accent: #2563eb;
  --accent-2: #34d399;
  --radius: 12px;
  --shadow-1: 0 6px 20px rgba(16,24,40,0.06);
  --shadow-2: 0 12px 40px rgba(16,24,40,0.08);
  --focus: rgba(37,99,235,0.18);
  --border: rgba(15,23,42,0.06);
  --danger: #ef4444;
}

:root[data-theme="dark"] {
  --bg: #071022;
  --surface: linear-gradient(180deg,#071227,#0b1622);
  --muted: #9aa6b2;
  --text: #e6eef6;
  --accent: #4ea8ff;
  --accent-2: #34d399;
  --shadow-1: 0 8px 30px rgba(2,6,23,0.6);
  --shadow-2: 0 20px 60px rgba(2,6,23,0.7);
  --focus: rgba(78,168,255,0.18);
  --border: rgba(255,255,255,0.08);
  --danger: #f87171;
}

/* ------------------ Global ----------------- */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  padding: 1rem;
  transition: background .25s ease, color .25s ease;
}
.container { max-width: 1100px; margin: 0 auto; }

/* ---------------- Header ---------------- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.auth { display: flex; gap: 8px; align-items: center; }

/* ---------------- Typografie ---------------- */
h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 15px; color: var(--muted); margin: 8px 0 12px; font-weight: 600; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------------- Material Symbols ---------------- */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  display: inline-flex;
  vertical-align: middle;
  line-height: 1;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---------------- Karten / Container ---------------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }

/* ---------------- Buttons ---------------- */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s ease;
}
button:focus { outline: 0; box-shadow: 0 0 0 3px var(--focus); }

.btn-primary {
  background: linear-gradient(180deg,var(--accent),color-mix(in srgb,var(--accent) 85%, black 15%));
  color: #fff;
  box-shadow: var(--shadow-2);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.danger-btn { background: linear-gradient(180deg, var(--danger), color-mix(in srgb, var(--danger) 85%, black 12%)); }

/* ---------------- Floating Action Button ---------------- */
.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(180deg,var(--accent),var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 30px rgba(16,24,40,0.12);
  font-weight: 600;
  border: 0;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:active { transform: translateY(1px); }

/* ---------------- Projektformular ---------------- */
#projectForm {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 52px;
  padding: 6px;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  width: 100%;
  max-width: 560px;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 28px;
  position: relative;
}
#projectForm label { display: none; }

#projectInput {
  flex: 1 1 auto;
  height: 100%;
  padding: 0 14px;
  border: none;
  outline: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}
#projectInput::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }

#projectGoBtn {
  flex: 0 0 auto;
  height: 100%;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(180deg,var(--accent),var(--accent-2));
  color: #fff;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
#projectGoBtn[disabled] { filter: grayscale(1) contrast(.8) opacity(.75); cursor: not-allowed; }
#projectGoBtn:hover { transform: translateY(-1px); filter: brightness(1.05); }
#projectGoBtn:active { transform: translateY(0); filter: brightness(0.95); }

@media (max-width: 600px) {
  #projectForm { max-width: 100%; margin: 0 auto 34px; }
}

/* ---------------- Projektkarten ---------------- */
#projectList { list-style: none; padding-left: 0; margin: 0; padding-top: 6px; }
.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-1);
  margin-bottom: 12px;
  transition: all 0.25s ease;
}
.project-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.project-info { display: flex; flex-direction: column; gap: 4px; }
.project-title { font-size: 16px; font-weight: 600; }

/* ---------------- Icon Buttons ---------------- */
.icon-btn {
  border: none;
  background: linear-gradient(180deg, rgba(37,99,235,0.1), rgba(37,99,235,0.05));
  color: var(--accent);
  border-radius: 12px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.25s ease; cursor: pointer;
}
.icon-btn:hover {
  background: linear-gradient(180deg,var(--accent),var(--accent-2));
  color: #fff; box-shadow: 0 4px 10px rgba(37,99,235,0.3); transform: translateY(-2px);
}
.icon-btn.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 15%, transparent); }
.icon-btn.danger:hover { background: linear-gradient(180deg, var(--danger), color-mix(in srgb, var(--danger) 85%, black 12%)); color:#fff; }

/* ---------------- Idea/Item Cards ---------------- */
.idea-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-1);
  margin: 12px 0;
  border: 1px solid var(--border);
}
.idea-head { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.avatar {
  width:36px; height:36px; border-radius:9999px;
  background: rgba(37,99,235,0.12);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; color: var(--accent);
}
.idea-title { font-weight:700; font-size:16px; letter-spacing:-0.01em; }

/* Content-Box */
.idea-content-box {
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(16,24,40,0.08);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 8px 0 10px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
:root[data-theme="dark"] .idea-content-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(78,168,255,0.1);
  box-shadow: 0 0 20px rgba(78,168,255,0.05);
}

/* Progressbar */
.progress-outer {
  background: linear-gradient(90deg, rgba(37,99,235,0.08), rgba(37,99,235,0.04));
  border-radius: 999px;
  height: 12px; overflow: hidden; position: relative; margin: 6px 0 10px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.progress-inner {
  height: 100%; text-align: center; font-size: 11px; color: #fff; line-height: 12px;
  background: linear-gradient(90deg, #2563eb 0%, #34d399 100%);
  background-size: 200% 100%;
  animation: gradient-move 3s linear infinite;
  transition: width 0.4s ease;
}
@keyframes gradient-move { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }

/* Tags */
.tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.tag-chip { display:inline-block; padding:2px 8px; border-radius:9999px; background: rgba(37,99,235,0.12); color: var(--accent); font-size:12px; }
:root[data-theme="dark"] .tag-chip { background: rgba(78,168,255,0.12); }

/* Meta + Actions */
.idea-meta { font-size:12px; color: var(--muted); margin-top: 4px; }
.idea-actions { display:flex; gap:12px; margin-top:10px; }

/* ---------------- Confirm Modal (Delete) ---------------- */
.confirm-backdrop {
  position: fixed; inset: 0;
  background: rgba(3,10,20,0.45);
  display: none; align-items: center; justify-content: center;
  padding: 16px; z-index: 9999;
}
.confirm-backdrop[aria-hidden="false"] { display: flex; }
.confirm-modal {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  padding: 18px;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  animation: confirm-in .2s ease forwards;
}
@keyframes confirm-in {
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.confirm-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--danger); margin-bottom: 8px;
}
.confirm-extra { margin: 6px 0 0; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

/* ---------------- Mobile ---------------- */
@media (max-width: 600px) {
  body { padding: 16px; }
  header { flex-direction: column; align-items: flex-start; gap: 20px; }
  .auth { flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
  .idea-actions { justify-content: space-between; }
  .idea-actions .icon-btn { flex: 1; }
}

/* ---------------- Transitions ---------------- */
button, .card, .idea-card, .fab, .icon-btn, .project-card { transition: all 0.25s ease; }
button:hover { transform: translateY(-1px); }
.idea-card:hover, .project-card:hover { box-shadow: var(--shadow-2); }