/* M3 Foto-Wall — gemeinsame Basis für Upload, Moderation und Wall.
   Branding steckt ausschließlich in den Tokens unten. Zum Umfärben am
   Dienstag reicht es, diesen einen Block zu ersetzen. */

:root {
    --brand-bg: #0e1116;
    --brand-bg-soft: #171b22;
    --brand-surface: #1e242d;
    --brand-border: #2c333e;
    --brand-accent: #c9a227;
    --brand-accent-ink: #14171c;
    --brand-text: #f2f4f7;
    --brand-muted: #9aa4b2;
    --ok: #2f9e6b;
    --danger: #c2453d;
    --radius: 14px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--brand-bg);
    color: var(--brand-text);
    font-family: var(--font);
    -webkit-text-size-adjust: 100%;
}

/* iOS: verhindert das Zoomen beim Fokussieren von Eingabefeldern */
input, button, textarea { font-family: inherit; font-size: 16px; }

.wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 20px 64px;
}

.logo {
    display: block;
    height: 44px;
    margin: 8px auto 20px;
}

h1 {
    font-size: 26px;
    line-height: 1.25;
    text-align: center;
    margin: 0 0 8px;
    font-weight: 650;
}

.lead {
    text-align: center;
    color: var(--brand-muted);
    margin: 0 0 28px;
    line-height: 1.5;
}

.card {
    background: var(--brand-bg-soft);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 14px;
    color: var(--brand-muted);
    margin-bottom: 8px;
}

input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    color: var(--brand-text);
}

input[type="text"]:focus {
    outline: 2px solid var(--brand-accent);
    outline-offset: 1px;
}

.btn {
    display: block;
    width: 100%;
    padding: 18px 20px;
    border: 0;
    border-radius: 12px;
    background: var(--brand-accent);
    color: var(--brand-accent-ink);
    font-size: 18px;
    font-weight: 650;
    cursor: pointer;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.985); }
.btn[disabled] { opacity: 0.5; cursor: default; }

.btn-secondary {
    background: var(--brand-surface);
    color: var(--brand-text);
    border: 1px solid var(--brand-border);
}

.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }

.hint {
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid rgba(201, 162, 39, 0.35);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.hint strong { color: var(--brand-accent); }

.status { text-align: center; margin-top: 18px; line-height: 1.6; min-height: 24px; }
.status.error { color: #ff8b83; }
.status.success { color: #6ddba4; }

.hidden { display: none !important; }

.spinner {
    width: 22px; height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--brand-text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: -4px;
    margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.progress {
    height: 6px;
    background: var(--brand-surface);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 16px;
}

.progress > i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--brand-accent);
    transition: width 0.25s ease;
}

/* Vorschau der ausgewählten Fotos */

.preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
}

.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-muted);
    font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
