:root {
    --bg: #0e1512;
    --bg2: #151f1a;
    --gruen: #6fbf73;
    --gruen-hell: #a8e6a3;
    --text: #dfe8e2;
    --text-leise: #8fa398;
    --rand: rgba(255, 255, 255, 0.08);
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== Uebersicht ===== */
.hub {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.hub-head { text-align: center; margin-bottom: 3rem; }

.hub-head h1 {
    font-size: clamp(2rem, 6vw, 3.2rem);
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, var(--gruen-hell), var(--gruen));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hub-sub { color: var(--text-leise); margin-top: 0.6rem; font-size: 1.05rem; }

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

.karte {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: linear-gradient(160deg, var(--bg2), #101815);
    border: 1px solid var(--rand);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.karte:hover {
    transform: translateY(-3px);
    border-color: rgba(111, 191, 115, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.karte-icon { font-size: 2.4rem; line-height: 1; }
.karte-name { font-size: 1.3rem; font-weight: 600; }
.karte-kurz { color: var(--gruen); font-size: 0.9rem; }
.karte-text { color: var(--text-leise); font-size: 0.88rem; line-height: 1.5; flex: 1; }

.karte-badge {
    align-self: flex-start;
    margin-top: 0.6rem;
    padding: 0.45rem 1rem;
    background: var(--gruen);
    color: #0b1410;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.karte-leer { opacity: 0.45; border-style: dashed; }
.karte-leer:hover { transform: none; box-shadow: none; border-color: var(--rand); }

/* ===== Spiel ===== */
body.im-spiel { overflow: hidden; height: 100vh; }

.spiel-rahmen { position: fixed; inset: 0; background: #000; }

#spielflaeche {
    display: block;
    width: 100%;
    height: 100%;
    /* Kein Weichzeichnen beim Skalieren - die Grafik wird bewusst
       in voller Geraeteaufloesung gerendert. */
    image-rendering: auto;
    touch-action: none;
}

.hud {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
    pointer-events: none;
    font-size: 0.85rem;
}

.hud-zurueck {
    pointer-events: auto;
    color: var(--text);
    text-decoration: none;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--rand);
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
}
.hud-zurueck:hover { background: rgba(0, 0, 0, 0.65); }

.hud-name { font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.hud-info { margin-left: auto; color: var(--text-leise); font-variant-numeric: tabular-nums;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }

/* ===== Hilfe ===== */
.hilfe {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(4, 8, 6, 0.82);
    backdrop-filter: blur(4px);
    z-index: 10;
}
.hilfe.aus { display: none; }

.hilfe-inner {
    max-width: 420px;
    padding: 2rem;
    text-align: center;
}
.hilfe-inner h2 { font-size: 1.8rem; margin-bottom: 0.6rem; color: var(--gruen-hell); }
.hilfe-inner p { color: var(--text-leise); line-height: 1.6; }

.tasten { margin: 1.6rem 0; display: flex; flex-direction: column; gap: 0.7rem; }
.taste-zeile { display: flex; align-items: center; gap: 0.4rem; justify-content: center; }

.taste {
    min-width: 2rem;
    padding: 0.35rem 0.5rem;
    background: #1d2b24;
    border: 1px solid var(--rand);
    border-bottom-width: 3px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}
.taste-breit { min-width: 4rem; }
.taste-text { color: var(--text-leise); font-size: 0.85rem; margin-left: 0.5rem; }

.hilfe-fuss { font-size: 0.8rem; opacity: 0.7; }

.hilfe-los {
    margin-top: 1.5rem;
    padding: 0.7rem 2rem;
    background: var(--gruen);
    color: #0b1410;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}
.hilfe-los:hover { background: var(--gruen-hell); }

/* ===== Touch-Stick ===== */
.stick {
    position: absolute;
    left: 1.5rem;
    bottom: 1.5rem;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--rand);
    display: none;
    touch-action: none;
}
.stick.an { display: block; }

.stick-knopf {
    position: absolute;
    left: 50%; top: 50%;
    width: 54px; height: 54px;
    margin: -27px 0 0 -27px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 720px) {
    .hub { padding: 2.5rem 1rem; }
}
