:root {
    --bg: #0a0f1c;
    --panel: rgba(17, 24, 39, 0.78);
    --panel-strong: #111827;
    --border: rgba(255, 255, 255, 0.10);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #7c3aed;
    --accent-2: #2563eb;
    --danger: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(124, 58, 237, 0.25), transparent 34rem),
        radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.18), transparent 30rem),
        var(--bg);
}

button,
input {
    font: inherit;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 440px);
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--panel);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    margin-bottom: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 14px 40px rgba(124, 58, 237, 0.28);
}

.eyebrow {
    margin: 0 0 6px;
    color: #c4b5fd;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.login-card h1 {
    font-size: 2rem;
}

.muted {
    color: var(--muted);
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.login-form label {
    margin-top: 7px;
    color: #cbd5e1;
    font-size: 0.88rem;
    font-weight: 700;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.86);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-form input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

.primary-button,
.secondary-button {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 160ms ease, opacity 160ms ease;
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
}

.primary-button {
    margin-top: 12px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.secondary-button {
    padding: 0 16px;
    color: #e2e8f0;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.8);
}

.alert {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.alert-error {
    color: #fecdd3;
    border: 1px solid rgba(251, 113, 133, 0.28);
    background: rgba(159, 18, 57, 0.22);
}

.field-error {
    color: var(--danger);
}

.app-shell {
    width: min(1500px, calc(100% - 36px));
    margin: 0 auto;
    padding: 42px 0 70px;
}

.topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.topbar h1 {
    margin-bottom: 4px;
}

.topbar .muted {
    margin-bottom: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-pill {
    max-width: 220px;
    overflow: hidden;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.image-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-strong);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.20);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.image-card:hover {
    transform: translateY(-4px);
    border-color: rgba(167, 139, 250, 0.50);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.30);
}

.image-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 260ms ease;
}

.image-card:hover img {
    transform: scale(1.025);
}

.image-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 14px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.image-meta span {
    display: block;
    overflow: hidden;
    color: #f8fafc;
    font-size: 0.84rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    padding: 70px 28px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    text-align: center;
    background: rgba(15, 23, 42, 0.48);
}

.empty-state p {
    max-width: 680px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.7;
}

.empty-icon {
    margin-bottom: 14px;
    color: #a78bfa;
    font-size: 3rem;
}

@media (max-width: 700px) {
    .login-card {
        padding: 28px 22px;
    }

    .app-shell {
        width: min(100% - 24px, 1500px);
        padding-top: 26px;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-actions {
        justify-content: space-between;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .image-card {
        border-radius: 16px;
    }
}


/* Bilder sind reine Galerieelemente und keine Links. */
.image-card {
    user-select: none;
    cursor: default;
}

.image-card img {
    -webkit-user-drag: none;
    user-select: none;
}


/* Temporäre Login-Sperre */
.lockout-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(251, 113, 133, 0.30);
    border-radius: 12px;
    color: #fecdd3;
    background: rgba(159, 18, 57, 0.20);
}

.lockout-box span {
    font-size: 0.90rem;
}

.lockout-box strong {
    min-width: 64px;
    font-variant-numeric: tabular-nums;
    font-size: 1.10rem;
    text-align: right;
}
