/* ==========================================================================
   DeutschPatch.de — Stylesheet
   Ein Spiegelserver für deutsche Übersetzungspatches.
   Ethos: kein Bloat, kein Tracking, kein Captcha, direkter Download.
   ========================================================================== */

:root {
    /* Farbpalette — CRT-Terminal mit Deutschland-Akzenten */
    --bg:        #0d0f0e;          /* tiefes Terminal-Schwarz */
    --bg-soft:   #14181a;          /* etwas hellerer Untergrund */
    --bg-card:   #1a1f1d;          /* Karten / Listenelemente   */
    --bg-hover:  #232927;          /* Hover-Zustand             */
    --line:      #2a312e;          /* Rahmen / Trennlinien      */

    --text:      #e8eae6;          /* Haupttext                 */
    --text-dim:  #9aa39c;          /* gedämpfter Text           */
    --text-mute: #6b746e;          /* sehr gedämpft             */

    --de-black:  #1a1a1a;          /* Deutschland Schwarz       */
    --de-red:    #dd0000;          /* Deutschland Rot           */
    --de-gold:   #ffce00;          /* Deutschland Gold          */

    --accent:    #ffce00;          /* Primärer Akzent = Gold    */
    --accent-2:  #dd0000;          /* Sekundärer Akzent = Rot   */
    --link:      #ffd633;          /* Linkfarbe                 */
    --link-hover:#fff0a8;          /* Link hover                */

    --ok:        #6dd47e;
    --warn:      #ffce00;

    --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", "DejaVu Sans Mono",
            "Consolas", "Courier New", monospace;
    --sans: "Inter", "Helvetica Neue", system-ui, -apple-system, "Segoe UI",
            Roboto, Arial, sans-serif;

    --maxw: 1080px;
    --radius: 4px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255,206,0,0.06), transparent),
        linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px);
    background-attachment: fixed;
    background-size: 100% 100%, 100% 28px;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; transition: color .12s ease; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* ---------- Layout-Helfer ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); }

/* ---------- Deutschland-Fahne (Deckstreifen oben) ---------- */
.flagbar {
    height: 4px;
    width: 100%;
    background: linear-gradient(to bottom,
        var(--de-black) 0 33.3%,
        var(--de-red)   33.3% 66.6%,
        var(--de-gold)  66.6% 100%);
    display: block;
}

/* ---------- Kopfbereich ---------- */
header.site {
    border-bottom: 1px solid var(--line);
    background: rgba(13, 15, 14, 0.85);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 50;
}
header.site .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(255,206,0,0.7);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(0.85); }
}
.brand .tld { color: var(--text-mute); font-weight: 400; }

nav.primary { display: flex; gap: 18px; align-items: center; font-size: 14px; }
nav.primary a { color: var(--text-dim); }
nav.primary a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Hero ---------- */
section.hero { padding: 70px 0 50px; }
.hero h1 {
    font-family: var(--mono);
    font-size: clamp(28px, 6vw, 48px);
    line-height: 1.1;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--accent); }
.hero .tagline {
    font-family: var(--mono);
    color: var(--text-dim);
    font-size: clamp(14px, 2vw, 17px);
    margin: 0 0 28px;
}
.hero .lede {
    max-width: 60ch;
    color: var(--text-dim);
    font-size: 17px;
    line-height: 1.7;
    margin: 0 0 28px;
}

/* Prompt-Stil als Hommage ans Terminal */
.prompt {
    font-family: var(--mono);
    color: var(--text-mute);
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.prompt::before {
    content: "$";
    color: var(--accent);
    font-weight: 700;
}
.cursor {
    display: inline-block;
    width: 9px; height: 1.05em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: -2px;
    animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { to { background: transparent; } }

/* ---------- Stat-Band ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin: 40px 0 50px;
    border-radius: var(--radius);
    overflow: hidden;
}
.stat {
    background: var(--bg-soft);
    padding: 22px 18px;
    text-align: center;
}
.stat .num {
    font-family: var(--mono);
    font-size: clamp(22px, 4vw, 30px);
    color: var(--accent);
    font-weight: 700;
    display: block;
    line-height: 1;
}
.stat .lbl {
    font-size: 12px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 8px;
    display: block;
}

/* ---------- Sektionen ---------- */
section.block { padding: 44px 0; border-top: 1px solid var(--line); }
section.block > .wrap > h2 {
    font-family: var(--mono);
    font-size: clamp(20px, 3vw, 26px);
    margin: 0 0 22px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
}
section.block > .wrap > h2::before {
    content: "//";
    color: var(--accent-2);
    font-weight: 700;
}

/* ---------- Prinzipien ---------- */
.principles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.principle {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.principle:hover { background: var(--bg-hover); border-color: var(--de-gold); transform: translateY(-1px); }
.principle .ico {
    color: var(--ok);
    font-family: var(--mono);
    font-weight: 700;
    flex-shrink: 0;
    width: 20px; text-align: center;
}

/* ---------- Infrastruktur / Submit ---------- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.panel {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.panel h3 {
    font-family: var(--mono);
    margin: 0 0 14px;
    font-size: 16px;
    color: var(--accent);
    letter-spacing: 0.02em;
}
.panel p { color: var(--text-dim); margin: 0 0 12px; }
.panel p:last-child { margin-bottom: 0; }
.panel code, .panel .mono { color: var(--text); }
.kv { font-family: var(--mono); font-size: 14px; }
.kv .k { color: var(--text-mute); }
.kv .v { color: var(--text); }

/* ---------- Suchleiste ---------- */
.toolbar {
    position: sticky;
    top: 56px;
    z-index: 30;
    background: rgba(13,15,14,0.92);
    backdrop-filter: blur(6px);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    margin: 0 0 24px;
}
.search {
    display: flex;
    gap: 10px;
    align-items: center;
}
.search .field {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.search .field::before {
    content: ">_";
    position: absolute;
    left: 14px;
    font-family: var(--mono);
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    pointer-events: none;
}
.search input[type="search"] {
    width: 100%;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--mono);
    font-size: 15px;
    padding: 12px 14px 12px 40px;
    outline: none;
    transition: border-color .12s ease;
}
.search input[type="search"]::placeholder { color: var(--text-mute); }
.search input[type="search"]:focus { border-color: var(--accent); }
.search select {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    padding: 12px 14px;
    cursor: pointer;
    outline: none;
}
.search select:focus { border-color: var(--accent); }

/* Deaktivierte Suchfelder (ohne JS / bei blockiertem app.js) */
.search input[type="search"]:disabled,
.search select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.search .field:has(input:disabled)::before { opacity: 0.4; }

/* Hinweis-Banner: standardmäßig sichtbar, app.js blendet es aus */
.jswarn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 206, 0, 0.08);
    border: 1px solid rgba(255, 206, 0, 0.4);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
}
.jswarn .jswarn-ico {
    color: var(--accent);
    font-size: 18px;
    line-height: 1.3;
    flex-shrink: 0;
}
.jswarn b { color: var(--accent); }
/* Sobald app.js läuft, wird .js ans <html>-Element gesetzt → Banner ausblenden.
   Die Suchfelder bleiben bewusst deaktiviert dargestellt, bis app.js das
   'disabled'-Attribut entfernt — so signalisiert die graue Optik, dass die
   Suche (noch) nicht verfügbar ist. */
html.js .jswarn { display: none; }

.result-count {
    font-family: var(--mono);
    color: var(--text-mute);
    font-size: 13px;
    margin: 0 0 14px;
    min-height: 1.2em;
}
.result-count b { color: var(--accent); }

/* ---------- Spiele-Liste ---------- */
.game-list { list-style: none; margin: 0; padding: 0; }
.game {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    gap: 14px;
    align-items: start;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    transition: background .1s ease;
}
.game:hover { background: var(--bg-soft); }
.game .idx {
    font-family: var(--mono);
    color: var(--text-mute);
    font-size: 12px;
    padding-top: 2px;
    text-align: right;
    user-select: none;
}
.game .body { min-width: 0; }
.game .title {
    font-weight: 600;
    color: var(--text);
    display: inline;
}
.game .title:hover { color: var(--link-hover); }
.game .meta {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-mute);
    font-family: var(--mono);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
}
.game .meta .sep { color: var(--line); }
.game .meta .by  { color: var(--text-dim); }
.game .tag {
    display: inline-block;
    font-size: 11px;
    font-family: var(--mono);
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid var(--line);
    color: var(--text-dim);
    background: var(--bg);
}
.game .tag.warn  { color: var(--warn); border-color: rgba(255,206,0,0.5); background: rgba(255,206,0,0.08); }
.game .tag.var   { color: var(--accent); border-color: rgba(255,206,0,0.4); }
.game .dl {
    font-family: var(--mono);
    font-size: 13px;
    padding: 8px 14px;
    border: 1px solid var(--de-gold);
    color: var(--accent);
    border-radius: var(--radius);
    white-space: nowrap;
    align-self: center;
    transition: background .12s ease, color .12s ease;
}
.game .dl:hover { background: var(--accent); color: var(--bg); text-decoration: none; }
.game .dl.multi { border-color: var(--line); color: var(--text-dim); }
.game .dl.multi:hover { background: var(--bg-hover); color: var(--text); }

.game.hidden { display: none; }
.no-results {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-mute);
    font-family: var(--mono);
    display: none;
}
.no-results.show { display: block; }

/* "Nach oben" Sprunglink im Listenfuß */
.list-foot {
    text-align: center;
    margin-top: 30px;
    font-family: var(--mono);
    font-size: 13px;
}

/* ---------- Footer ---------- */
footer.site {
    border-top: 1px solid var(--line);
    margin-top: 60px;
    padding: 40px 0;
    background: var(--bg-soft);
}
footer.site .wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}
footer.site .col h4 {
    font-family: var(--mono);
    color: var(--accent);
    font-size: 13px;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 6px; }
footer.site a { color: var(--text-dim); font-size: 14px; }
footer.site a:hover { color: var(--accent); }
footer.site .copy {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--text-mute);
    font-size: 13px;
    font-family: var(--mono);
    text-align: center;
    width: 100%;
}

/* ---------- Impressum-Seite ---------- */
.legal { max-width: 720px; }
.legal h1 {
    font-family: var(--mono);
    font-size: clamp(22px, 4vw, 32px);
    margin: 30px 0 20px;
}
.legal h2 {
    font-family: var(--mono);
    font-size: 16px;
    color: var(--accent);
    margin: 28px 0 10px;
}
.legal p, .legal li { color: var(--text-dim); line-height: 1.7; }
.legal .note {
    border-left: 3px solid var(--accent-2);
    padding: 12px 16px;
    background: var(--bg-soft);
    margin: 20px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- Responsiv ---------- */
@media (max-width: 760px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .two-col { grid-template-columns: 1fr; }
    .game { grid-template-columns: 1fr; gap: 6px; padding: 14px 10px; }
    .game .idx { display: none; }
    .game .dl { justify-self: start; margin-top: 6px; }
    nav.primary { font-size: 13px; gap: 14px; }
    .toolbar { top: 52px; }
    .search { flex-wrap: wrap; }
    .search select { flex: 1; }
    section.hero { padding: 40px 0 30px; }
}

@media (max-width: 420px) {
    .stats { grid-template-columns: 1fr; }
}

/* ---------- Reduzierte Bewegung respektieren ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Druck ---------- */
@media print {
    body { background: #fff; color: #000; }
    header.site, .toolbar, footer.site, .flagbar, .no-results { display: none; }
    .game .dl { display: none; }
    .game { border-color: #ccc; }
    a { color: #000; }
}
