/* CYQORE Apps & Tools — Corporate Design (dark-first, Pink #E7095B) */
@font-face { font-family: 'CYQORE Sans'; src: url('/static/fonts/CYQORESans-Regular.woff2') format('woff2'); font-display: swap; }
:root {
  --pink: #E7095B; --pink-deep: #A61F42; --pink-glow: #F23D7B;
  --black: #000; --surface: #141416; --surface-2: #1B1B1F; --bordeaux: #2F0012;
  --text: #F5F5F7; --muted: #9CA0A8; --dim: #6B6F78;
  --border: 1px solid rgba(255,255,255,.07);
  --radius: 12px; --radius-card: 16px;
  --font: 'Inter', system-ui, Helvetica, Arial, sans-serif;
  --tech: 'CYQORE Sans', 'Michroma', var(--font);
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ok: #3DDC84; --warn: #FFB020; --down: #FF4D4D;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--black); color: var(--text); font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
.bg { position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 40% at 50% -6%, var(--bordeaux) 0%, rgba(47,0,18,.35) 35%, var(--black) 72%); }
a { color: var(--pink-glow); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.muted { color: var(--muted); }
.pink { color: var(--pink); }
.inline { display: inline; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: rgba(0,0,0,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: var(--border); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 22px; }
.brand span { font-family: var(--tech); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.top nav a:hover { color: var(--text); text-decoration: none; background: rgba(255,255,255,.05); }
.top nav a.on { color: var(--text); background: rgba(231,9,91,.16); }
.wrap { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
footer { text-align: center; color: var(--dim); font-size: 12px; padding: 18px; border-top: var(--border); }

/* Hero + Kacheln */
.kicker { font-family: var(--tech); font-size: 11.5px; letter-spacing: .35em; text-transform: uppercase; color: var(--pink); }
.hero { text-align: center; padding: 26px 0 10px; }
.hero h1 { margin: 12px 0 8px; font-size: clamp(32px, 5.5vw, 56px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.hero .sub { margin: 0 auto; max-width: 680px; color: var(--muted); font-size: 15.5px; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 26px auto 8px; }
.tile { min-width: 150px; padding: 16px 24px 14px; background: rgba(20,20,22,.85); border: var(--border); border-radius: var(--radius-card); }
.tile b { display: block; font-family: var(--tech); font-weight: 400; font-size: 28px; color: var(--pink); letter-spacing: .04em; }
.tile span { display: block; margin-top: 3px; font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* Suche + Chips */
.controls { padding: 16px 0 6px; }
.search { position: relative; max-width: 560px; margin: 0 auto 14px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--dim); pointer-events: none; }
.search input { width: 100%; padding: 12px 40px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.1); background: rgba(20,20,22,.9); color: var(--text); font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.search input::placeholder { color: var(--dim); }
.search input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(231,9,91,.18); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search .clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--muted); font: 700 14px/24px var(--font); cursor: pointer; }
.search .clear:hover { background: rgba(231,9,91,.2); color: var(--pink-glow); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sub-chips { margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.035); color: var(--text); font: 600 13px var(--font); cursor: pointer; transition: border-color .15s, background .15s; }
.sub-chips .chip { padding: 5px 11px; font-size: 12px; }
.chip small { font-size: 11px; font-weight: 500; color: var(--muted); }
.chip:hover { border-color: rgba(231,9,91,.55); }
.chip.on { background: var(--pink); border-color: var(--pink); color: #fff; box-shadow: 0 0 18px rgba(231,9,91,.35); }
.chip.on small { color: rgba(255,255,255,.8); }

/* Karten */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; margin-top: 22px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: var(--border); border-radius: var(--radius-card); overflow: hidden; color: var(--text); transition: border-color .18s, transform .18s, box-shadow .18s; }
.card:hover { text-decoration: none; border-color: rgba(231,9,91,.5); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 22px rgba(231,9,91,.12); }
.card.dim { opacity: .68; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.thumb .ph { display: flex; align-items: center; justify-content: center; height: 100%; background: radial-gradient(ellipse at 30% 20%, rgba(231,9,91,.22), rgba(20,20,22,0) 60%), var(--surface-2); }
.thumb .ph span { font-family: var(--tech); font-size: 40px; color: rgba(255,255,255,.18); }
.thumb .star { position: absolute; top: 10px; right: 10px; color: var(--pink); font-size: 16px; text-shadow: 0 0 10px rgba(231,9,91,.8); }
.card .body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 14px; flex: 1; }
.card .name { font-size: 15.5px; font-weight: 700; color: #fff; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: rgba(255,255,255,.08); color: #D5D8DE; white-space: nowrap; }
.badge.kind { background: rgba(231,9,91,.14); color: var(--pink-glow); }
.badge.tag { text-transform: none; letter-spacing: 0; font-weight: 600; }
.badge.st-live { background: rgba(61,220,132,.14); color: var(--ok); }
.badge.st-beta { background: rgba(255,176,32,.16); color: var(--warn); }
.badge.st-dev { background: rgba(255,176,32,.16); color: var(--warn); }
.badge.st-pause, .badge.st-archiv { background: rgba(255,255,255,.05); color: var(--dim); }
.card .tagline { margin: 2px 0 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; font: 11px var(--mono); color: var(--dim); }
.card .meta .dl { color: var(--muted); white-space: nowrap; }
.card .meta .host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }

/* Buttons + Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: var(--text); font: 600 13.5px var(--font); cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.09); }
.btn.primary { background: var(--pink); border-color: var(--pink); color: #fff; }
.btn.primary:hover { background: #C21E47; border-color: #C21E47; }
.btn.ghost { background: transparent; border-color: rgba(231,9,91,.6); color: var(--pink-glow); }
.btn.ghost:hover { background: rgba(231,9,91,.12); }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.danger { border-color: rgba(255,77,77,.5); color: var(--down); }
.btn.danger:hover { background: rgba(255,77,77,.12); }
.btn.full { width: 100%; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.35); color: var(--text); font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--pink); }
input[type=file] { padding: 8px; font-size: 13px; color: var(--muted); }
input[type=file]::file-selector-button { margin-right: 10px; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(231,9,91,.6); background: transparent; color: var(--pink-glow); font: 600 12.5px var(--font); cursor: pointer; }
input:focus, select:focus, textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(231,9,91,.18); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: #141416; }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.form { display: flex; flex-direction: column; gap: 14px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.f-grid .span2 { grid-column: span 2; }
.f-actions { display: flex; gap: 10px; }
.alert { padding: 10px 14px; border-radius: 10px; background: rgba(255,77,77,.12); border: 1px solid rgba(255,77,77,.35); color: #FF9A9A; font-size: 13.5px; margin-bottom: 14px; }
.alert.ok { background: rgba(61,220,132,.1); border-color: rgba(61,220,132,.35); color: var(--ok); }
.panel { background: var(--surface); border: var(--border); border-radius: var(--radius-card); padding: 20px 22px; }
.panel h2 { margin: 0 0 14px; font-size: 16px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.panel h2 small { color: var(--muted); font-size: 13px; font-weight: 500; }
.panel h3 { margin: 6px 0 0; font-size: 14px; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 18px; }

/* Login */
.login-page .wrap { display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 400px; padding: 34px 32px 30px; background: rgba(20,20,22,.9); border: var(--border); border-radius: 20px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(231,9,91,.08); }
.login-card .q { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 14px; }
.login-card h1 { margin: 10px 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.login-card p { margin: 0 0 18px; font-size: 13.5px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-card .btn { margin-top: 6px; }

/* Detail */
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--dim); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.d-head h1 { margin: 0 0 4px; font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.d-head .tagline { margin: 0 0 10px; color: var(--muted); font-size: 16px; }
.star-inline { color: var(--pink); font-size: .7em; vertical-align: middle; }
.d-actions { display: flex; gap: 8px; flex: none; }
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.d-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.d-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }
.gallery .main { display: block; border-radius: var(--radius-card); overflow: hidden; border: var(--border); background: var(--surface-2); }
.gallery .main img { width: 100%; display: block; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; width: 96px; aspect-ratio: 16/9; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: var(--surface-2); cursor: pointer; opacity: .6; transition: opacity .15s, border-color .15s; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.thumbs button.on, .thumbs button:hover { opacity: 1; border-color: var(--pink); }
.prose { font-size: 15px; color: var(--text); }
.prose p { margin: 0 0 12px; }
.prose h2, .prose h3 { margin: 18px 0 8px; font-size: 17px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 3px 0; }
.prose code { background: rgba(255,255,255,.07); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.facts dl { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.files li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.3); border: var(--border); }
.files .ext { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border-radius: 5px; background: rgba(231,9,91,.16); color: var(--pink-glow); }
.files .fname { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmeta { font-size: 12px; color: var(--dim); white-space: nowrap; }
.upload { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.shot-admin { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.shot-del { position: relative; width: 120px; aspect-ratio: 16/9; padding: 0; border: var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.shot-del img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .8; }
.shot-del span { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 6px; background: rgba(0,0,0,.7); color: var(--down); font: 700 13px/20px var(--font); }
.shot-del:hover img { opacity: 1; }
.users { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.users li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(0,0,0,.3); border: var(--border); font-size: 14px; }
.users li form { margin-left: auto; }

@media (max-width: 860px) {
  .d-grid { grid-template-columns: 1fr; }
  .d-side { position: static; }
  .d-head { flex-direction: column; }
  .f-grid { grid-template-columns: 1fr; }
  .f-grid .span2 { grid-column: auto; }
  .upload { grid-template-columns: 1fr; }
  .top { padding: 10px 14px; }
  .brand span { display: none; }
  .wrap { padding: 20px 14px 50px; }
  .files li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .files .fmeta { display: none; }
}
