/* ZAREX Git – Swiss Präzision dunkel (wie service.zarex.ch): Anthrazit, ZAREX-Grün. Liegt über dem Gitea-Dunkel-Thema. */
@font-face { font-family: "HKGrotesk"; src: url("../fonts/HKGrotesk-Regular.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "HKGrotesk"; src: url("../fonts/HKGrotesk-Bold.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "HKGrotesk"; src: url("../fonts/HKGrotesk-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }

:root {
  --fonts-proportional: "HKGrotesk", -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --color-primary: #76b900;
  --color-primary-contrast: #0d1300;
  --color-primary-hover: #8acf0a;
  --color-primary-active: #6aa600;
  --color-primary-dark-1: #6aa600; --color-primary-dark-2: #5e9400; --color-primary-dark-3: #538200; --color-primary-dark-4: #477000; --color-primary-dark-5: #3b5e00; --color-primary-dark-6: #2f4b00; --color-primary-dark-7: #233800;
  --color-primary-light-1: #8acf0a; --color-primary-light-2: #9fef00; --color-primary-light-3: #b1f233; --color-primary-light-4: #c2f566; --color-primary-light-5: #d4f899; --color-primary-light-6: #e5fbcc; --color-primary-light-7: #f2fde5;
  --color-primary-alpha-10: #76b9001a; --color-primary-alpha-20: #76b90033; --color-primary-alpha-30: #76b9004d; --color-primary-alpha-40: #76b90066; --color-primary-alpha-50: #76b90080; --color-primary-alpha-60: #76b90099; --color-primary-alpha-70: #76b900b3; --color-primary-alpha-80: #76b900cc; --color-primary-alpha-90: #76b900e6;
  --color-accent: #76b900;
  --color-body: #1a1c1f;
  --color-box-body: #232629;
  --color-box-body-highlight: #2a2d31;
  --color-box-header: #202326;
  --color-nav-bg: #141619;
  --color-nav-hover-bg: #232629;
  --color-header-bar: #141619;
  --color-footer: #141619;
  --color-text: #eceef0;
  --color-text-light: #c4c8cd;
  --color-text-light-1: #a2a9b2;
  --color-text-light-2: #8b929b;
  --color-text-light-3: #6b7280;
  --color-secondary: #34383e;
  --color-secondary-bg: #232629;
  --color-light-border: #34383e;
  --color-input-background: #141619;
  --color-input-border: #34383e;
  --color-menu: #232629;
  --color-card: #232629;
  --color-button: #2a2d31;
  --color-hover: #2a2d31;
  --color-active: #33373c;
  --border-radius: 6px;
}

/* Kopfzeile: ZAREX-Zeichen, kein Gitea-Hilfelink */
#navbar { border-bottom: 1px solid #34383e; }
#navbar-logo img { width: 26px; height: 26px; }
#navbar a[href="https://docs.gitea.com"] { display: none !important; }

/* Startseite: Laserschnitt des Z, Raster in die Tiefe, Lichtpunkte */
.page-content.zx-home { box-sizing: border-box; position: relative; overflow: hidden; min-height: calc(100vh - 152px); display: grid; place-items: center; padding: 56px 24px 80px; margin: 0 !important; background: radial-gradient(1200px 600px at 50% 38%, #1f2a14 0%, #15181b 45%, #0e1012 100%); isolation: isolate; }
.zx-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.zx-grid { position: absolute; left: -50%; right: -50%; bottom: -40%; height: 85%; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(118,185,0,.28) 1px, transparent 1px), linear-gradient(90deg, rgba(118,185,0,.28) 1px, transparent 1px);
  background-size: 64px 64px; transform: perspective(520px) rotateX(72deg); transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 100%);
  animation: zx-grid 2.4s linear infinite; }
@keyframes zx-grid { to { background-position: 0 64px, 0 0; } }
.zx-glow { position: absolute; width: 760px; height: 760px; left: 50%; top: 40%; translate: -50% -50%; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(118,185,0,.22) 0%, rgba(118,185,0,.07) 35%, transparent 65%); filter: blur(8px); animation: zx-breathe 6s ease-in-out infinite; }
@keyframes zx-breathe { 50% { transform: scale(1.12); opacity: .75; } }
.zx-scan { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.018) 0 1px, transparent 1px 3px); }
.zx-scan::after { content: ""; position: absolute; left: 0; right: 0; height: 140px; top: -140px; background: linear-gradient(to bottom, transparent, rgba(159,239,0,.06), transparent); animation: zx-sweep 7s linear infinite; }
@keyframes zx-sweep { to { top: 100%; } }

.zx-home .zx-card { position: relative; z-index: 3; width: min(620px, 100%); text-align: center; }
.zx-logo { width: 150px; height: 150px; display: block; margin: 0 auto 26px; overflow: visible; }
.zx-logo .zx-fill { fill: url(#zx-metal); opacity: 0; transition: opacity 1.1s ease .1s; }
.zx-logo .zx-cut { fill: none; stroke: #c8ff5a; stroke-width: 1.4; stroke-linejoin: round; }
.zx-logo .zx-cut-glow { fill: none; stroke: #76b900; stroke-width: 5; opacity: .85; }
.zx-done .zx-logo .zx-fill { opacity: 1; }
.zx-done .zx-logo { animation: zx-pop 1.2s cubic-bezier(.2,.8,.2,1) both, zx-float 6s ease-in-out 1.2s infinite; filter: drop-shadow(0 0 18px rgba(118,185,0,.55)) drop-shadow(0 0 60px rgba(118,185,0,.25)); }
.zx-done .zx-logo .zx-cut { stroke: #9fef00; stroke-width: .8; opacity: .7; }
.zx-done .zx-logo .zx-cut-glow { animation: zx-pulse 3s ease-in-out infinite; }
@keyframes zx-pop { 0% { transform: scale(.96); } 40% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes zx-float { 50% { transform: translateY(-8px); } }
@keyframes zx-pulse { 50% { opacity: .35; } }

.zx-home .zx-brand { display: flex; justify-content: center; gap: .5em; font-size: 15px; font-weight: 700; color: #a2a9b2; margin: 0 0 8px; }
.zx-home .zx-brand span { opacity: 0; transform: translateY(10px); animation: zx-in .7s cubic-bezier(.2,.8,.2,1) forwards; }
.zx-home .zx-brand span:nth-child(1) { animation-delay: .2s; }
.zx-home .zx-brand span:nth-child(2) { animation-delay: .3s; }
.zx-home .zx-brand span:nth-child(3) { animation-delay: .4s; }
.zx-home .zx-brand span:nth-child(4) { animation-delay: .5s; }
.zx-home .zx-brand span:nth-child(5) { animation-delay: .6s; }
@keyframes zx-in { to { opacity: 1; transform: none; } }
.zx-home .zx-title { font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 18px; line-height: 1.05;
  background: linear-gradient(100deg, #ffffff 0%, #ffffff 38%, #c8ff5a 50%, #ffffff 62%, #ffffff 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateY(14px); animation: zx-in .9s .7s cubic-bezier(.2,.8,.2,1) forwards, zx-shine 5s 1.6s linear infinite; }
@keyframes zx-shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.zx-home .zx-line { width: 0; height: 3px; margin: 0 auto 24px; border-radius: 2px; background: linear-gradient(90deg, transparent, #9fef00, transparent); box-shadow: 0 0 14px #76b900; animation: zx-grow 1s 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes zx-grow { to { width: 140px; } }
.zx-home .zx-lead { font-size: 17px; line-height: 1.6; color: #c4c8cd; margin: 0 auto 34px; max-width: 480px; opacity: 0; transform: translateY(10px); animation: zx-in .8s 1.3s forwards; }
.zx-home .zx-btn { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 14px 40px; border-radius: 8px; font-weight: 700; font-size: 16px; letter-spacing: .02em;
  color: #0d1300 !important; text-decoration: none; background: linear-gradient(135deg, #9fef00, #76b900); box-shadow: 0 0 0 1px rgba(159,239,0,.6), 0 8px 30px rgba(118,185,0,.35);
  opacity: 0; transform: translateY(10px); overflow: hidden; transition: transform .2s; animation: zx-in .8s 1.6s forwards, zx-btn 2.8s 2.4s ease-in-out infinite; }
.zx-home .zx-btn::before { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: zx-gleam 3.5s 2.5s ease-in-out infinite; }
.zx-home .zx-btn i { font-style: normal; transition: transform .2s; }
.zx-home .zx-btn:hover { transform: translateY(-2px) scale(1.02); }
.zx-home .zx-btn:hover i { transform: translateX(5px); }
@keyframes zx-btn { 50% { box-shadow: 0 0 0 1px rgba(159,239,0,.9), 0 8px 44px rgba(118,185,0,.6); } }
@keyframes zx-gleam { 0%, 60% { left: -80px; } 100% { left: 120%; } }
.zx-home .zx-note { margin-top: 38px; font-size: 13px; color: #8b929b; line-height: 1.5; opacity: 0; animation: zx-in .8s 2s forwards; }
.zx-hud { position: absolute; z-index: 3; left: 24px; bottom: 18px; display: flex; gap: 18px; font: 500 11px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .12em; color: #6b7280; }
.zx-hud b { color: #9fef00; font-weight: 500; }
.zx-hud #zx-state { color: #c4c8cd; padding-left: 18px; border-left: 1px solid #34383e; }
.zx-cutting #zx-state { color: #ffcf5a; }
@media (prefers-reduced-motion: reduce) {
  .zx-grid, .zx-glow, .zx-scan::after, .zx-btn::before, .zx-logo { animation: none !important; }
  .zx-home .zx-brand span, .zx-home .zx-title, .zx-home .zx-lead, .zx-home .zx-btn, .zx-home .zx-note { opacity: 1 !important; transform: none !important; animation: none !important; }
  .zx-home .zx-line { width: 140px; animation: none; }
}
/* Anmelden: leichter grüner Schimmer im Hintergrund */
body:has(.page-content.user.signin) { background: radial-gradient(900px 500px at 50% 20%, #1c2414, #15181b 60%); }

/* Fusszeile */
.page-footer .zx-foot { color: var(--color-text-light-2); }
.page-footer .zx-foot strong { color: var(--color-text-light); font-weight: 600; }

/* ohne Mailversand: Passwort zurücksetzen nur über ZAREX */
a[href$="/user/forgot_password"] { display: none !important; }

/* ===== Epic: Stil der Startseite auf allen Seiten (Hintergrund, Glas, Licht) ===== */
body { background: radial-gradient(1400px 700px at 50% -10%, #1d2713 0%, #15181b 45%, #0e1012 100%) fixed !important; }
/* Hintergrund-Ebene (body_inner_pre.tmpl): Raster in die Tiefe, Licht, Lichtpunkte */
.zx-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.zx-bg .zx-bg-grid { position: absolute; left: -50%; right: -50%; bottom: -45%; height: 80%;
  background-image: linear-gradient(rgba(118,185,0,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(118,185,0,.16) 1px, transparent 1px);
  background-size: 72px 72px; transform: perspective(560px) rotateX(74deg); transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%); mask-image: linear-gradient(to bottom, transparent, #000 40%);
  animation: zx-grid-slow 6s linear infinite; }
@keyframes zx-grid-slow { to { background-position: 0 72px, 0 0; } }
.zx-bg .zx-bg-glow { position: absolute; width: 900px; height: 900px; left: 50%; top: -360px; translate: -50% 0;
  background: radial-gradient(circle, rgba(118,185,0,.13), transparent 60%); animation: zx-breathe 9s ease-in-out infinite; }
.zx-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; }
body:has(.zx-home) .zx-bg { display: none; }
.full.height { background: transparent !important; }

/* Kopfzeile: Glas + wandernde Lichtlinie */
#navbar { position: relative; background: rgba(14,16,18,.72) !important; backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid rgba(118,185,0,.18) !important; }
#navbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, transparent 35%, #9fef00 50%, transparent 65%, transparent 100%); background-size: 300% 100%; animation: zx-navline 7s linear infinite; opacity: .9; }
@keyframes zx-navline { from { background-position: 100% 0; } to { background-position: -200% 0; } }
#navbar-logo img { filter: drop-shadow(0 0 6px rgba(118,185,0,.7)); transition: filter .3s, transform .3s; }
#navbar-logo:hover img { filter: drop-shadow(0 0 12px rgba(159,239,0,.95)); transform: rotate(-6deg) scale(1.08); }
#navbar .item.active, #navbar a.item:hover { color: #c8ff5a !important; text-shadow: 0 0 12px rgba(159,239,0,.45); }

/* Seiteninhalt sanft einblenden */
.page-content:not(.zx-home) { animation: zx-page .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes zx-page { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Glas-Flächen mit leuchtender Kante */
.ui.segment, .ui.attached.segment, .ui.attached.header, .ui.top.attached.header, .ui.menu:not(.secondary):not(.text):not(.navbar),
.ui.card, .ui.cards > .card, .flex-list, .dashboard .ui.segment, .ui.modal, .tippy-box, .ui.dropdown .menu {
  background-color: rgba(30,33,37,.78) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-color: rgba(118,185,0,.16) !important; }
.ui.top.attached.header, .ui.attached.header { background: linear-gradient(180deg, rgba(118,185,0,.10), rgba(30,33,37,.82)) !important; }
.ui.segment:hover, .ui.card:hover { box-shadow: 0 0 0 1px rgba(118,185,0,.22), 0 10px 40px rgba(0,0,0,.35), 0 0 30px rgba(118,185,0,.06); transition: box-shadow .3s; }
.flex-list > .flex-item { transition: background .2s, box-shadow .2s; }
.flex-list > .flex-item:hover { background: rgba(118,185,0,.05) !important; box-shadow: inset 3px 0 0 #76b900; }

/* Code, Diffs, Dateien: ruhig und lesbar (kein Glas) */
.file-view, .code-view, .diff-file-box, .file-content, .repository .file-header, .markup pre, .ui.table.diff, .CodeMirror, .monaco-editor {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.file-view, .code-view, .diff-file-box .diff-file-body, .markup pre { background-color: #16181b !important; }

/* Knöpfe */
.ui.primary.button, .ui.primary.buttons .button, .ui.green.button {
  position: relative; overflow: hidden; border: none !important; color: #0d1300 !important; font-weight: 700;
  background: linear-gradient(135deg, #9fef00, #76b900) !important; box-shadow: 0 0 0 1px rgba(159,239,0,.5), 0 4px 18px rgba(118,185,0,.28); transition: transform .15s, box-shadow .25s; }
.ui.primary.button:hover, .ui.green.button:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(159,239,0,.9), 0 6px 28px rgba(118,185,0,.5); }
.ui.primary.button::after, .ui.green.button::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40px; left: -60px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg); transition: left .6s ease; }
.ui.primary.button:hover::after, .ui.green.button:hover::after { left: 120%; }
.ui.basic.button:hover, .ui.button:not(.primary):hover { box-shadow: 0 0 0 1px rgba(118,185,0,.35) inset !important; }

/* Eingaben */
.ui.form input:not([type="checkbox"]):not([type="radio"]), .ui.form textarea, .ui.input > input, .ui.selection.dropdown {
  background: rgba(10,12,14,.75) !important; border-color: #34383e !important; transition: border-color .2s, box-shadow .2s; }
.ui.form input:focus, .ui.form textarea:focus, .ui.input > input:focus, .ui.selection.dropdown.active {
  border-color: #76b900 !important; box-shadow: 0 0 0 3px rgba(118,185,0,.18), 0 0 18px rgba(118,185,0,.18) !important; }

/* Reiter (Code, Issues, Pull Requests …) */
.ui.secondary.pointing.menu .active.item, .ui.tabular.menu .active.item { border-color: #9fef00 !important; color: #c8ff5a !important; text-shadow: 0 0 12px rgba(159,239,0,.35); }
.repo-header .repo-title, .dashboard .header, h1, h2 { text-shadow: 0 0 22px rgba(118,185,0,.12); }
.ui.label.primary, .ui.primary.label, .ui.green.label { background: rgba(118,185,0,.18) !important; color: #c8ff5a !important; border: 1px solid rgba(159,239,0,.35) !important; }

/* ===== Anmelden: Laser-Karte ===== */
.page-content.user.signin, .page-content.user.two-factor, .page-content.user.reset.password, .page-content.user.must-change-password {
  min-height: calc(100vh - 170px); display: flex; flex-direction: column; justify-content: center; padding-bottom: 24px; }
.page-content.user .ui.top.attached.header.center { position: relative; padding-top: 92px !important; font-size: 20px; letter-spacing: .02em; border-radius: 12px 12px 0 0 !important; }
.page-content.user .ui.top.attached.header.center::before { content: ""; position: absolute; left: 50%; top: 22px; width: 54px; height: 54px; translate: -50% 0;
  background: url("../img/logo.svg") center / contain no-repeat; filter: drop-shadow(0 0 12px rgba(118,185,0,.8)) drop-shadow(0 0 32px rgba(118,185,0,.35)); animation: zx-float 6s ease-in-out infinite; }
.page-content.user .ui.top.attached.header.center::after { content: "ZAREX · SICHERE ANMELDUNG"; position: absolute; left: 0; right: 0; top: 4px; font: 600 10px/1 ui-monospace, Consolas, monospace; letter-spacing: .28em; color: #6b7280; }
.page-content.user .ui.attached.segment { border-radius: 0 0 12px 12px !important; }
.page-content.user .ui.top.attached.header.center,
.page-content.user .ui.top.attached.header.center + .ui.attached.segment { box-shadow: 0 0 0 1px rgba(118,185,0,.25), 0 30px 80px rgba(0,0,0,.5), 0 0 60px rgba(118,185,0,.08); animation: zx-card 4s ease-in-out infinite; }
@keyframes zx-card { 50% { box-shadow: 0 0 0 1px rgba(159,239,0,.45), 0 30px 80px rgba(0,0,0,.5), 0 0 80px rgba(118,185,0,.16); } }
.page-content.user .signin-passkey { opacity: .8; }

@media (prefers-reduced-motion: reduce) {
  .zx-bg .zx-bg-grid, .zx-bg .zx-bg-glow, #navbar::after, .page-content, .page-content.user .ui.top.attached.header.center::before,
  .page-content.user .ui.top.attached.header.center, .page-content.user .ui.attached.segment { animation: none !important; }
  .zx-bg canvas { display: none; }
}
