/* ==========================================================================
   1LNTCWEB — Dark Minimal Design System
   ========================================================================== */

:root {
    --bg:        #101014;
    --bg-2:      #131318;
    --surface:   #18181f;
    --surface-2: #1d1d26;
    --surface-3: #24242f;
    --border:    #2a2a37;
    --border-2:  #353545;

    --text:      #e7e7f0;
    --text-2:    #b6b6c6;
    --muted:     #7e7e92;
    --faint:     #55556a;

    --accent:    #8b5cf6;
    --accent-2:  #a855f7;
    --accent-3:  #c084fc;
    --accent-dim: rgba(139, 92, 246, .14);
    --accent-glow: rgba(139, 92, 246, .40);

    --ok:   #34d399;
    --warn: #fbbf24;
    --err:  #f87171;
    --info: #60a5fa;

    --radius:   14px;
    --radius-sm: 9px;
    --radius-lg: 22px;

    --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --shadow: 0 18px 48px -18px rgba(0, 0, 0, .75);
    --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent-3); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 650; letter-spacing: -.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; color: var(--text-2); }

code, kbd, pre { font-family: var(--mono); }

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

/* ---------- Hintergrund-Effekte ---------- */
.bg-grid {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background-image:
        linear-gradient(rgba(139, 92, 246, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, .045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 85%);
}
.bg-glow {
    position: fixed; z-index: -1; pointer-events: none;
    top: -280px; left: 50%; transform: translateX(-50%);
    width: 900px; height: 620px; border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow), transparent 62%);
    filter: blur(70px); opacity: .5;
}

/* ---------- Topbar / Navigation ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    background: rgba(16, 16, 20, .72);
    border-bottom: 1px solid var(--border);
}
.topbar__inner {
    max-width: 1200px; margin: 0 auto; padding: .7rem 1.2rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
    display: flex; align-items: baseline; gap: 2px; font-weight: 800;
    font-size: 1.15rem; letter-spacing: .04em; color: var(--text);
}
.brand:hover { color: var(--text); }
.brand__mark {
    font-family: var(--mono); color: var(--accent-2);
    text-shadow: 0 0 14px var(--accent-glow);
}
.brand__accent { color: var(--accent); }
.brand__text { margin-left: 1px; }

.nav { display: flex; align-items: center; gap: .15rem; flex-wrap: wrap; }
.nav__link {
    position: relative; display: inline-flex; align-items: center; gap: .4rem;
    padding: .5rem .7rem; border-radius: var(--radius-sm);
    color: var(--text-2); font-size: .82rem; font-weight: 550;
    letter-spacing: .03em; white-space: nowrap;
    transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--surface-2); }
.nav__icon { font-size: .9em; opacity: .7; }
.nav__link.active { color: var(--accent-3); }
.nav__link.active::after {
    content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .18rem;
    height: 2px; border-radius: 2px; background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}
.nav__link--ghost { color: var(--muted); }
.nav__sep { width: 1px; height: 20px; background: var(--border-2); margin: 0 .5rem; }
.nav__user {
    font-family: var(--mono); font-size: .78rem; color: var(--accent-3);
    padding: .3rem .6rem; border: 1px solid var(--border-2); border-radius: 999px;
    background: var(--accent-dim);
}

.nav-toggle {
    display: none; flex-direction: column; gap: 5px; padding: .55rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s var(--ease); }

/* ---------- Layout ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 2.4rem 1.2rem 4rem; min-height: 70vh; }
.page--wide { max-width: 1400px; }
.page--center { max-width: 760px; }

.page-head { margin-bottom: 1.8rem; }
.page-head .kicker {
    font-family: var(--mono); font-size: .78rem; letter-spacing: .18em;
    text-transform: uppercase; color: var(--accent-2); margin-bottom: .4rem;
}
.page-head p { color: var(--muted); max-width: 68ch; }

/* ---------- Cards ---------- */
.card {
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem;
    box-shadow: var(--shadow);
}
.card--glow { position: relative; }
.card--glow::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit;
    padding: 1px; background: linear-gradient(135deg, var(--accent), transparent 45%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; pointer-events: none;
}
.card__title { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; font-size: 1rem; }

.grid { display: grid; gap: 1.1rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .6rem 1.1rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border-2); background: var(--surface-2);
    color: var(--text); font: inherit; font-size: .88rem; font-weight: 550;
    cursor: pointer; transition: all .2s var(--ease); text-decoration: none;
}
.btn:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.btn--primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent; color: #fff;
    box-shadow: 0 8px 26px -10px var(--accent-glow);
}
.btn--primary:hover { box-shadow: 0 12px 34px -8px var(--accent-glow); filter: brightness(1.08); }
.btn--ghost { background: transparent; }
.btn--danger { border-color: rgba(248,113,113,.4); color: var(--err); background: transparent; }
.btn--danger:hover { border-color: var(--err); background: rgba(248,113,113,.08); }
.btn--sm { padding: .38rem .7rem; font-size: .8rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field > label { font-size: .82rem; color: var(--text-2); font-weight: 550; letter-spacing: .02em; }
.input, .textarea, .select {
    width: 100%; padding: .62rem .8rem; color: var(--text);
    background: var(--bg-2); border: 1px solid var(--border-2);
    border-radius: var(--radius-sm); font: inherit; font-size: .9rem;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.textarea { min-height: 130px; resize: vertical; font-family: var(--mono); font-size: .86rem; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input[type="color"] { padding: .2rem; height: 42px; cursor: pointer; }

/* ---------- Flash ---------- */
.flash {
    padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem;
    border: 1px solid var(--border-2); background: var(--surface-2); font-size: .9rem;
}
.flash--ok  { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); color: #a7f3d0; }
.flash--err { border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); color: #fecaca; }
.flash--warn{ border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); color: #fde68a; }

/* ---------- Badges / Chips ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem;
    border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .03em;
    border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2);
}
.badge--accent { border-color: var(--accent); color: var(--accent-3); background: var(--accent-dim); }
.badge--ok { border-color: rgba(52,211,153,.4); color: #6ee7b7; }
.badge--warn { border-color: rgba(251,191,36,.4); color: #fcd34d; }
.badge--err { border-color: rgba(248,113,113,.4); color: #fca5a5; }

.chip {
    display: inline-flex; padding: .3rem .7rem; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
    font-size: .8rem; cursor: pointer; transition: all .18s var(--ease);
}
.chip:hover, .chip.active { border-color: var(--accent); color: var(--accent-3); }

/* ---------- Terminal (HOME) ---------- */
.terminal-wrap { display: grid; gap: 1.5rem; }
.terminal {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border-2); background: #0b0b0f;
    box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(139,92,246,.08) inset;
}
.terminal__bar {
    display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem;
    background: #121218; border-bottom: 1px solid var(--border);
}
.terminal__dots { display: flex; gap: .4rem; }
.terminal__dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.terminal__dots i:nth-child(1) { background: #ff5f57; }
.terminal__dots i:nth-child(2) { background: #febc2e; }
.terminal__dots i:nth-child(3) { background: #28c840; }
.terminal__title { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin: 0 auto; }
.terminal__body {
    font-family: var(--mono); font-size: .82rem; line-height: 1.65;
    padding: 1.1rem 1.2rem 1.4rem; min-height: 60vh; max-height: 78vh; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--border-2) transparent;
}
.terminal__body::-webkit-scrollbar { width: 9px; }
.terminal__body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }

.t-line { display: flex; gap: .6rem; white-space: pre-wrap; word-break: break-word; opacity: 0; animation: tIn .28s var(--ease) forwards; }
.t-key { color: var(--accent-2); min-width: 0; }
.t-val { color: var(--text); }
.t-sep { color: var(--faint); }
.t-line--head { color: var(--accent-3); font-weight: 600; }
.t-line--dim  { color: var(--muted); }
.t-line--ok   { color: var(--ok); }
.t-line--warn { color: var(--warn); }
.t-cursor { display: inline-block; width: 9px; height: 1.05em; background: var(--accent-2);
    vertical-align: text-bottom; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes tIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }

.terminal__prompt { color: var(--accent-2); }
.terminal__prompt b { color: var(--accent-3); }

/* Hero auf Home */
.hero { text-align: left; margin-bottom: 1.4rem; }
.hero h1 { margin-bottom: .4rem; }
.hero .glitch { color: var(--accent-2); text-shadow: 0 0 24px var(--accent-glow); }
.hero__sub { color: var(--muted); font-family: var(--mono); font-size: .85rem; }

/* ---------- Stat-Kacheln ---------- */
.stat { display: grid; gap: .2rem; }
.stat__value { font-size: 1.9rem; font-weight: 700; color: var(--text); font-family: var(--mono); }
.stat__label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Tabellen / Listen ---------- */
.list { display: grid; gap: .5rem; }
.list__item {
    display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
    transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.list__item:hover { border-color: var(--border-2); }
.list__grow { flex: 1; min-width: 0; }
.list__title { font-weight: 550; color: var(--text); }
.list__meta { font-size: .78rem; color: var(--muted); }
.list__item.is-done .list__title { text-decoration: line-through; color: var(--muted); }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--faint); font-family: var(--mono); font-size: .85rem; }

/* ---------- Kalender ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { text-align: center; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: .4rem 0; }
.cal__cell {
    min-height: 84px; padding: .4rem; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface); font-size: .78rem;
    display: flex; flex-direction: column; gap: .2rem; transition: border-color .2s var(--ease);
}
.cal__cell:hover { border-color: var(--border-2); }
.cal__cell--muted { opacity: .38; }
.cal__cell--today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-dim) inset; }
.cal__num { color: var(--muted); font-family: var(--mono); font-size: .74rem; }
.cal__cell--today .cal__num { color: var(--accent-3); font-weight: 700; }
.cal__ev {
    display: block; padding: .12rem .35rem; border-radius: 5px; font-size: .72rem;
    background: var(--accent-dim); color: var(--accent-3); border-left: 2px solid var(--accent);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; background: rgba(6,6,9,.7); backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.modal__panel { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); animation: tIn .25s var(--ease); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.modal__head h3 { margin: 0; }
.modal__body { padding: 1.2rem; }
.modal__close { background: none; border: 0; color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal__close:hover { color: var(--err); }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.gallery__item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: .5rem .6rem; font-size: .78rem; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; }
.lightbox { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; background: rgba(6,6,9,.92); padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius-sm); box-shadow: var(--shadow); }

/* ---------- Code ---------- */
pre.code { background: #0b0b0f; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; overflow-x: auto; font-size: .82rem; position: relative; }
pre.code code { color: var(--text-2); }
.code-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }

/* Prism-Theme an dunkle Palette angepasst */
pre[class*="language-"], code[class*="language-"] {
    font-family: var(--mono); font-size: .82rem; line-height: 1.6;
    color: #c8c8d8; background: #0b0b0f; text-shadow: none;
}
pre[class*="language-"] { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; margin: 0; }
:not(pre) > code[class*="language-"] { background: var(--surface-2); padding: .1em .4em; border-radius: 5px; }
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #6b6b80; }
.token.punctuation { color: #9a9ab0; }
.token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: #f87171; }
.token.boolean, .token.number { color: #fbbf24; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #34d399; }
.token.operator, .token.entity, .token.url { color: #a855f7; }
.token.atrule, .token.attr-value, .token.keyword { color: #c084fc; }
.token.function, .token.class-name { color: #60a5fa; }
.token.regex, .token.important, .token.variable { color: #f472b6; }

/* ---------- Utilities ---------- */
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.6rem; }
.text-err { color: var(--err); } .text-ok { color: var(--ok); }
.hidden { display: none !important; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 3rem; }
.footer__inner {
    max-width: 1200px; margin: 0 auto; padding: 1.4rem 1.2rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.footer__brand { font-family: var(--mono); font-weight: 700; color: var(--accent-2); letter-spacing: .1em; }
.footer__meta { font-size: .78rem; color: var(--faint); font-family: var(--mono); }

/* ---------- Sub-Navigation ---------- */
.subnav {
    display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1.6rem;
    padding: .35rem; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); overflow-x: auto;
}
.subnav__link {
    display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
    padding: .5rem .8rem; border-radius: var(--radius-sm); color: var(--text-2);
    font-size: .84rem; font-weight: 550; transition: all .18s var(--ease);
}
.subnav__link:hover { background: var(--surface-2); color: var(--text); }
.subnav__link.active { background: var(--accent-dim); color: var(--accent-3); }
.subnav__link .badge { margin-left: .1rem; }

/* ---------- Login ---------- */
.auth-card { max-width: 400px; margin: 6vh auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: .1rem;
        background: var(--bg-2); border-bottom: 1px solid var(--border);
        padding: .6rem .8rem 1rem; max-height: 0; overflow: hidden;
        transition: max-height .3s var(--ease), padding .3s var(--ease);
    }
    .nav.open { max-height: 520px; }
    .nav__link { padding: .7rem .8rem; }
    .nav__link.active::after { display: none; }
    .nav__sep { display: none; }
    .grid--2, .grid--3 { grid-template-columns: 1fr; }
    .terminal__body { min-height: 50vh; font-size: .76rem; }
}
@media (max-width: 480px) {
    body { font-size: 15px; }
    .page { padding: 1.6rem 1rem 3rem; }
    .cal__cell { min-height: 62px; }
}
