/* gewohnheit.app — Styles */
/* ---------- Theme-Variablen (Default = Dark) ---------- */
:root {
    --bg-a: #0e1330; --bg-b: #18204a;
    --panel: #181f45; --panel-2: #222a5a;
    --ink: #e9ebf8; --muted: #9aa2c8;
    --line: rgba(255,255,255,.10); --track: rgba(255,255,255,.13);
    --accent: #8b7cf6; --accent2: #f472b6;
    --ok: #34d399; --warn: #fbbf24;
    --card: var(--panel);
    --radius: 18px; --shadow: 0 18px 44px rgba(0,0,0,.45);
    --topbar: rgba(14,19,48,.82);
    --pill-bg: rgba(255,255,255,.09);
    --tint-ok: rgba(52,211,153,.12); --tint-ok-bd: rgba(52,211,153,.38);
    --flash-bg: rgba(52,211,153,.13); --flash-bd: rgba(52,211,153,.4); --flash-ink: #6ee7b7;
}
html[data-theme="light"] {
    --bg-a: #f5f3ff; --bg-b: #ede9fe;
    --panel: #ffffff; --panel-2: #faf9ff;
    --ink: #1e1b4b; --muted: #6b7280;
    --line: #e5e7eb; --track: #ece9fb;
    --accent: #6d28d9; --accent2: #db2777;
    --ok: #16a34a; --warn: #f59e0b;
    --shadow: 0 18px 44px rgba(30,27,75,.16);
    --topbar: rgba(255,255,255,.85);
    --pill-bg: #f3f0ff;
    --tint-ok: #f0fdf4; --tint-ok-bd: #bbf7d0;
    --flash-bg: #ecfdf5; --flash-bd: #a7f3d0; --flash-ink: #065f46;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink); -webkit-font-smoothing: antialiased; line-height: 1.5;
    transition: background-color .3s ease, color .3s ease;
}

/* Auth zentriert */
body.centered {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6 50%, #ec4899);
    padding: 24px; color: #fff;
}
body.centered .card { color: var(--ink); }

/* App-Layout */
body.app { background: linear-gradient(165deg, var(--bg-a), var(--bg-b)); background-attachment: fixed; min-height: 100vh; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 22px; background: var(--topbar); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 800; font-size: 19px; text-decoration: none; color: var(--ink); letter-spacing: -.02em; }
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar nav a { text-decoration: none; color: var(--accent); font-weight: 600; }
.nav-login, .footer-login { opacity: .8; }
.theme-btn {
    background: var(--pill-bg); border: 1px solid var(--line); color: var(--ink);
    width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 17px; line-height: 1;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 26px 18px 40px; }
.wrap > h1 { font-size: 30px; letter-spacing: -.02em; margin-bottom: 16px; }

/* Cards / Panels */
.card {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 28px; text-align: center; max-width: 460px; color: var(--ink);
}
.auth-card { width: 100%; }
.panel {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 22px; margin-bottom: 20px; border: 1px solid var(--line);
}
.panel h2 { font-size: 18px; margin-bottom: 14px; letter-spacing: -.01em; }
.logo { font-size: 52px; margin-bottom: 8px; }

/* Forms */
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
input[type=text], input[type=password], input[type=number], select {
    padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px;
    font-size: 15px; font-family: inherit; background: var(--panel-2); color: var(--ink);
}
input::placeholder { color: var(--muted); }
input:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }
label { font-size: 14px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.btn {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff; border: 0; padding: 11px 18px; border-radius: 12px;
    font-size: 15px; font-weight: 700; cursor: pointer; transition: transform .08s, filter .15s; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { filter: brightness(1.08); } .btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--pill-bg); color: var(--accent); border: 1px solid var(--line); }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 14px; }
.icon-btn {
    background: var(--pill-bg); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px;
    cursor: pointer; font-size: 14px; color: var(--accent);
}
.icon-btn.danger { color: #f87171; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.mini-btn { padding: 9px 12px; font-size: 14px; }
.mini-num { width: 90px; }
.emoji-in { width: 64px; text-align: center; font-size: 18px; }
.error { color: #f87171; font-weight: 600; margin-bottom: 10px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
a { color: var(--accent); }
.flash {
    background: var(--flash-bg); border: 1px solid var(--flash-bd); color: var(--flash-ink);
    padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600;
}
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--pill-bg); color: var(--accent); }
.inline { display: inline-flex; gap: 6px; align-items: center; }
.hidden { display: none !important; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; text-align: center; }
.stat .num { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stat .lbl { font-size: 12.5px; color: var(--muted); }

/* Level-Panel */
.level-panel { padding: 16px 22px; }
.lvl-row { display: flex; align-items: center; gap: 16px; }
.lvl-badge {
    flex: 0 0 auto; width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 6px 16px rgba(139,124,246,.4);
}
.lvl-bar-wrap { flex: 1; }
.lvl-bar { height: 12px; background: var(--track); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.lvl-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 999px; transition: width .6s ease; }

/* Timer-Banner */
.timer-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    background: var(--tint-ok); border-color: var(--tint-ok-bd); }

/* Badges */
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-chip { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.badge-chip.earned { background: linear-gradient(135deg,#f59e0b,#fbbf24); color: #3b2606; }
.badge-chip.locked { background: var(--pill-bg); color: var(--muted); }
.badge-chip .bi { font-size: 17px; }

/* HEUTE — Checkliste */
.today-list { display: flex; flex-direction: column; gap: 12px; }
.today-row { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; align-items: flex-start; }
.today-row.is-done { background: var(--tint-ok); border-color: var(--tint-ok-bd); }
.tr-check-form { flex: 0 0 auto; }
.tr-check { background: none; border: 0; cursor: pointer; font-size: 30px; line-height: 1; padding: 2px; }
.tr-main { flex: 1; min-width: 0; }
.tr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-head strong { font-size: 16px; }
.tr-emoji { font-size: 18px; }
.tr-streak { font-weight: 700; color: var(--warn); font-size: 13px; }
.tr-meta { margin-top: 4px; }
.tr-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.progress { height: 8px; background: var(--track); border-radius: 999px; margin: 8px 0 2px; overflow: hidden; }
.progress .bar { height: 100%; border-radius: 999px; }

/* Stoppuhr */
.timer { display: inline-flex; gap: 6px; align-items: center; }
.timer-run { display: inline-flex; gap: 6px; align-items: center; }
.timer-display { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px;
    background: var(--pill-bg); border: 1px solid var(--line); color: var(--ink);
    padding: 5px 9px; border-radius: 8px; min-width: 78px; text-align: center; }

/* Habit-Form */
.habit-form { display: flex; flex-direction: column; gap: 12px; }

/* Manage list */
.manage-list { display: flex; flex-direction: column; gap: 8px; }
.manage-row { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.manage-row summary { display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 12px 14px; cursor: pointer; list-style: none; }
.manage-row summary::-webkit-details-marker { display: none; }
.manage-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.manage-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Heatmap */
.heat-list { display: flex; flex-direction: column; gap: 18px; }
.heat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.hm-grid { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.hm-col { display: flex; flex-direction: column; gap: 3px; }
.hm-cell { width: 13px; height: 13px; border-radius: 3px; display: block; }

/* Session list */
.session-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.session-row { display: flex; align-items: baseline; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.session-row:last-child { border-bottom: 0; }
.se-date { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; flex: 0 0 auto; min-width: 78px; }
.se-title { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-delta { font-weight: 700; color: var(--ok); flex: 0 0 auto; }
.se-del-form { flex: 0 0 auto; display: flex; }
.se-del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 4px; opacity: .45; }
.se-del:hover { color: #f87171; opacity: 1; }

/* Legal */
.legal h2 { font-size: 16px; margin: 22px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal ul { color: var(--ink); margin-bottom: 8px; }
.legal ul { padding-left: 22px; } .legal li { margin-bottom: 6px; }
.legal code { background: var(--pill-bg); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.legal a { word-break: break-word; }

/* Footer */
.site-footer { text-align: center; padding: 34px 18px 50px; color: var(--muted); font-size: 14px; }
.site-footer .footer-main { margin-bottom: 6px; }
.site-footer a { color: var(--accent); font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Confetti */
#confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; display: none; }

/* ============================================================= */
/* ===================== LANDINGPAGE =========================== */
/* ============================================================= */
.grad { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.lp-hero {
    max-width: 1120px; margin: 0 auto; padding: 60px 20px 40px;
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.lp-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent);
    background: var(--pill-bg); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.lp-hero h1 { font-size: 48px; line-height: 1.08; letter-spacing: -.03em; margin-bottom: 18px; }
.lp-lead { font-size: 18px; color: var(--muted); max-width: 30em; margin-bottom: 26px; }
.lp-lead strong { color: var(--ink); }
.lp-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.lp-hero-note { font-size: 13.5px; color: var(--muted); }

/* Demo-Karte */
.card-glass { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 20px; }
.lp-demo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.lp-demo-title { font-weight: 800; font-size: 16px; }
.lp-level-ring { --p: 60; width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto;
    background: conic-gradient(var(--accent) calc(var(--p)*1%), var(--track) 0);
    display: flex; align-items: center; justify-content: center; }
.lp-level-ring span { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); display: flex;
    align-items: center; justify-content: center; font-weight: 800; }
.lp-heat { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.lp-heat-row { display: flex; align-items: center; gap: 10px; }
.lp-heat-label { flex: 0 0 96px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-heat-cells { flex: 1; display: flex; gap: 3px; }
.lp-cell { flex: 1; height: 14px; border-radius: 3px; }
.lp-heat-streak { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--warn); }
.lp-discord { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.lp-discord-bar { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.lp-discord-msg { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.lp-discord-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.lp-dbtn { font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 8px; background: #4e5d94; color: #fff; }
.lp-dbtn.done { background: #3ba55d; }
.lp-dbtn.ctrl { background: #4f545c; }

/* Sections */
.lp-section { max-width: 1000px; margin: 0 auto; padding: 56px 20px; text-align: center; }
.lp-h2 { font-size: 34px; letter-spacing: -.02em; margin-bottom: 12px; }
.lp-sub { font-size: 17px; color: var(--muted); max-width: 40em; margin: 0 auto 34px; }
.lp-sub em { color: var(--ink); font-style: normal; font-weight: 600; }
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left; }
.lp-feature { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.lp-fi { font-size: 30px; margin-bottom: 10px; }
.lp-feature h3 { font-size: 18px; margin-bottom: 6px; }
.lp-feature p { color: var(--muted); font-size: 14.5px; }

/* Kontakt */
.lp-contact { border-top: 1px solid var(--line); }
.lp-paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; text-align: left; max-width: 820px; margin: 0 auto 22px; }
.lp-path { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 10px; }
.lp-path-ic { font-size: 34px; }
.lp-path h3 { font-size: 20px; }
.lp-path p { color: var(--muted); flex: 1; }
.lp-path .btn { align-self: flex-start; margin-top: 6px; }
.lp-mail { color: var(--muted); }

@media (max-width: 880px) {
    .lp-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
    .lp-hero h1 { font-size: 38px; }
    .lp-grid { grid-template-columns: 1fr; }
    .lp-paths { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .stats { grid-template-columns: repeat(2,1fr); }
    .wrap > h1 { font-size: 23px; }
    .lp-hero h1 { font-size: 31px; }
    .lp-h2 { font-size: 26px; }
    .hm-cell { width: 11px; height: 11px; }
}
