/*!
 * nerdheim.xyz
 * Copyright (c) 2026 Robert Hennig. Alle Rechte vorbehalten.
 *
 * Dieser Quellcode ist urheberrechtlich geschützt.
 * Die Nutzung, Vervielfältigung, Bearbeitung, Weitergabe, Veröffentlichung,
 * Dekompilierung oder sonstige Verwertung dieses Codes oder wesentlicher Teile
 * davon ist ohne vorherige ausdrückliche schriftliche Genehmigung des Rechteinhabers
 * untersagt.
 *
 * Eigentümer und Rechteinhaber:
 * Robert Hennig
 *
 * Dieser Hinweis darf nicht entfernt, verändert oder unkenntlich gemacht werden.
 */


@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@300;400;500&display=swap');

:root {
    --black:    #0f0f0f;
    --white:    #f5f5f5;
    --gray:     #888;
    --lgray:    #e0e0e0;
    --blue:     #89c4e1;
    --skin:     #f5c5a3;
    --header-h: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--black);
    min-height: 100vh;
}
body.encoder input[type="file"] { display: none !important; }
body.encoder .after-upload { display: none; }

/* ── HEADER ── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 2px solid #222;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 36px;
    width: auto;
}

.logo-text {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--blue);
}

nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

nav a {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    color: var(--gray);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
}

nav a:hover  { color: var(--blue); }
nav a.active { color: var(--white); }

/* ── FOOTER ── */
footer {
    text-align: center;
    padding: 32px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--gray);
    border-top: 1px solid var(--lgray);
}

/* ── IMPRESSUM ── */
main.impressum {
    max-width: 720px;
    margin: 0 auto;
    padding: 80px 32px 120px;
}

.page-label {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 16px;
}

h1 {
    font-family: 'Space Mono', monospace;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 48px;
    padding-bottom: 24px;
}

main.impressum h1 {
    border-bottom: 2px solid var(--lgray);
    padding-bottom: 24px;
}

.section {
    margin-bottom: 48px;
}

.section h2 {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--lgray);
}

.section p {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.8;
    color: #333;
}

.section address {
    font-style: normal;
    font-size: 15px;
    font-weight: 300;
    line-height: 2;
    color: #333;
}

.email-protect {
    display: inline-block;
    font-size: 15px;
    color: var(--black);
    font-weight: 400;
}

.email-protect::before {
    content: attr(data-user) "\0040" attr(data-domain);
}

.highlight {
    color: var(--blue);
    font-weight: 500;
}

.notice {
    background: var(--black);
    color: var(--white);
    padding: 20px 24px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.7;
    font-weight: 300;
    border-left: 3px solid var(--skin);
}

/* ── STARTSEITE ── */
main.start {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nerd {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-h) - 80px);
    padding: 40px 32px;
    text-align: center;
}

.nerd-quote {
    font-family: 'Space Mono', monospace;
    font-size: clamp(22px, 4.5vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--black);
    max-width: 700px;
    min-height: 1.4em;
    white-space: pre;
}

.nerd-quote::after {
    content: "▮";
    font-size: 1.4em;
    color: var(--blue);
    animation: blink 1.6s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 40px 32px 80px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s, transform 0.8s;
}

.cards.visible {
    opacity: 1;
    transform: translateY(0);
}

.card {
    background: var(--black);
    color: var(--white);
    border-radius: 8px;
    padding: 28px 32px;
    width: 280px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 3px solid var(--blue);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.card-title {
    font-family: 'Space Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

.card-desc {
    font-size: 13px;
    font-weight: 300;
    color: var(--gray);
    line-height: 1.6;
}

/* ── DROPDOWN ── */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    background: var(--black);
    border: 1px solid #333;
    border-radius: 6px;
    min-width: 200px;
    padding: 8px 0;
    z-index: 200;
}

.nav-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--gray);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s, background 0.2s;
}

.dropdown-menu a:hover {
    color: var(--blue);
    background: #1a1a1a;
}

/* ── MOBILE ── */
@media (max-width: 600px) {
    header { padding: 0 16px; }
    nav { gap: 16px; }
    nav a { font-size: 11px; }
    main.impressum { padding: 48px 20px 80px; }
    h1 { font-size: 28px; }
    .nerd { padding: 60px 20px 40px; }
    .cards { padding: 20px 20px 60px; }
    .card { width: 100%; }
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--black);
    border-bottom: 2px solid #222;
    padding: 16px 0;
    z-index: 99;
    width: 100%;
}

.mobile-menu a {
    display: block;
    padding: 12px 24px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--gray);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mobile-menu a:hover { color: var(--blue); }
.mobile-menu.open { display: block; }

.mobile-submenu-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 24px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: var(--gray);
    background: none;
    border: none;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mobile-submenu-btn:hover { color: var(--blue); }

.mobile-submenu-items {
    display: none;
    background: #1a1a1a;
}

.mobile-submenu-items.open { display: block; }

.mobile-submenu-items a {
    padding-left: 40px;
}

@media (max-width: 600px) {
    nav { display: none; }
    .hamburger { display: flex; }
}

/* ── ENCODER ── */
body.encoder {
    background: #f0f0f0;
    display: block;
}

body.encoder main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-h));
    padding: 20px;
}

body.encoder .encoder-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 32px;
    width: 100%;
    max-width: 680px;
}

body.encoder h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 22px;
    padding-bottom: 0;
    border-bottom: none;
}

body.encoder .drop-zone {
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 52px 20px;
    text-align: center;
    cursor: pointer;
    font-size: 15px;
    color: #888;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
}

body.encoder .drop-zone:hover,
body.encoder .drop-zone.dragover {
    border-color: #666;
    background: #f0f0f0;
}

body.encoder input[type="file"] { display: none; }

body.encoder .after-upload { display: none; margin-top: 20px; }
body.encoder .after-upload.visible { display: block; }

body.encoder .file-info {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.encoder .file-name { font-weight: 700; font-size: 14px; color: #111; }
body.encoder .file-meta { font-size: 12px; color: #888; }

body.encoder .btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

body.encoder button {
    padding: 13px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: #111;
    color: #fff;
}

body.encoder button:hover { background: #333; }

body.encoder #fieldList {
    display: none;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px;
    background: #fafafa;
    font-family: monospace;
    font-size: 12px;
    white-space: pre;
    max-height: 400px;
    overflow-y: auto;
}

body.encoder .toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #111;
    color: #fff;
    padding: 10px 24px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.25s;
    pointer-events: none;
    white-space: nowrap;
}

body.encoder .toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}