:root {
    --bg: #0f0f14;
    --surface: #1a1a22;
    --text: #e8e8ee;
    --muted: #9a9aa8;
    --twitch: #9146ff;
    --twitch-hover: #7a2ff0;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--twitch); }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    background: var(--surface);
}

.brand {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.account {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.account form { margin: 0; }

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.player-name { font-weight: 600; }

.content {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.button {
    display: inline-block;
    padding: .5rem 1rem;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.button.twitch { background: var(--twitch); }
.button.twitch:hover { background: var(--twitch-hover); }

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
}

.link-button:hover { color: var(--text); }

.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 2rem;
}

.landing { padding-top: 1rem; }

.landing picture {
    display: block;
    width: min(100%, 260px);
    margin: 0 auto;
}

.landing-logo {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(145, 70, 255, 0.35);
    margin-bottom: 1rem;
}

.landing-invite {
    font-size: 1.15rem;
    color: #fff;
}

/* ---- Canvas-App: alles nach dem Login laeuft auf einem Vollbild-Canvas ---- */

body.app {
    position: fixed;
    inset: 0;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

canvas.content {
    display: block;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    margin: 0;
    padding: 0;
    touch-action: none;
}

/* Unsichtbares Eingabefeld: liefert Tastatur (auch mobil), Text wird im Canvas gezeichnet */
.canvas-text-input {
    position: fixed;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    font-size: 16px; /* verhindert Auto-Zoom auf iOS */
    pointer-events: none;
}

/* ---- Hinweis auf die KI-Bilder vor dem Login ---- */

.ai-dialog {
    max-width: min(92vw, 34rem);
    padding: 1.6rem 1.5rem;
    border: 2px solid var(--twitch);
    border-radius: 16px;
    background: #16121f;
    color: var(--text);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
    text-align: center;
}

.ai-dialog::backdrop {
    background: rgba(5, 3, 12, .82);
}

.ai-dialog-kicker {
    margin: 0 0 .4rem;
    color: var(--muted);
    font-size: .95rem;
}

.ai-dialog-title {
    margin: 0 0 .8rem;
    font-size: clamp(1.6rem, 7vw, 2.3rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: .01em;
    color: #ffd23f;
    text-transform: uppercase;
}

.ai-dialog-lead {
    margin: 0 0 .8rem;
    font-size: 1.05rem;
}

.ai-dialog-strong {
    margin: 0 0 .8rem;
    padding: .8rem 1rem;
    border-radius: 12px;
    background: rgba(255, 210, 63, .12);
    font-size: 1.15rem;
    font-weight: 800;
}

.ai-dialog-note {
    margin: 0 0 1.4rem;
    color: var(--muted);
    font-size: .95rem;
}

.ai-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
}

.button.ghost {
    border: 1px solid rgba(255, 255, 255, .28);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.button.ghost:hover {
    border-color: rgba(255, 255, 255, .5);
}
