* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #eef2f7;
    color: #1f2937;
}

/* Dark Theme */
.theme-dark {
    background: #0f172a;
    color: #e5e7eb;
}

.theme-dark .panel,
.theme-dark .chat-panel,
.theme-dark .sidebar,
.theme-dark .auth-card,
.theme-dark .installer-card,
.theme-dark .stat-card {
    background: #111827;
    color: #e5e7eb;
}

.theme-dark textarea,
.theme-dark input,
.theme-dark .admin-table td,
.theme-dark .admin-table th {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #334155;
}

.theme-dark .chat-messages {
    background: #0b1220;
}

.theme-dark .nav-pill {
    background: #1f2937;
    color: #e5e7eb;
}

.theme-dark .nav-pill.active {
    background: #2563eb;
    color: #fff;
}

.theme-dark .smiley-item {
    background: #1f2937;
    color: #e5e7eb;
}

/* App Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #1e293b;
    color: #fff;
}

.app-header a {
    color: #fff;
    text-decoration: none;
    margin-left: 14px;
}

/* App Layout */
.app-layout {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 16px;
    padding: 16px;
    min-height: calc(100vh - 56px);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Panels & Cards */
.panel,
.chat-panel,
.auth-card,
.installer-card,
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.chat-panel {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
}

/* Chat Topbar */
.chat-topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow: auto;
    padding: 8px;
    background: #f8fafc;
    border-radius: 10px;
}

/* Message Row - Alles in einer Reihe */
.message-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid #2563eb;
}

.theme-dark .message-row {
    background: #1f2937;
}

/* Avatar */
.message-row .avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #d1d5db;
    border: 2px solid #dbeafe;
}

/* Message Content - horizontal */
.message-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

/* Topline mit Name + Zeit */
.message-topline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.message-username {
    font-size: 15px;
    font-weight: bold;
    color: #111827;
}

.theme-dark .message-username {
    color: #e5e7eb;
}

.message-time {
    font-size: 12px;
    color: #6b7280;
}

.theme-dark .message-time {
    color: #94a3b8;
}

/* Message Body - Text und Smileys in einer Reihe */
.message-body {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 14px;
    line-height: 1.45;
    color: #1f2937;
    word-break: break-word;
}

.theme-dark .message-body {
    color: #e5e7eb;
}

/* Smiley Bilder */
.message-body img.smiley-inline,
.message-body img.smiley,
.message-body .smiley {
    width: 32px;
    height: 32px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
}

/* Leerer Chat */
.empty-chat {
    padding: 20px;
    color: #6b7280;
    text-align: center;
}

.theme-dark .empty-chat {
    color: #94a3b8;
}

/* Nachrichten-Tools */
.message-tools {
    margin-top: 10px;
}

.message-tools button {
    margin-right: 8px;
}

/* Chat Input */
.chat-input textarea {
    width: 100%;
    min-height: 20px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
}

.chat-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

/* Navigation Pills */
.nav-pill {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #0f172a;
    text-decoration: none;
    margin-bottom: 8px;
}

.nav-pill.active {
    background: #2563eb;
    color: #fff;
}

.nav-pill-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Online Users */
.online-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Avatar Styles allgemein */
.avatar {
    display: block;
    object-fit: cover;
    border-radius: 999px;
    background: #d1d5db;
    flex-shrink: 0;
}

.avatar-chat {
    width: 44px;
    height: 44px;
    border: 2px solid #dbeafe;
}

.avatar-online {
    width: 34px;
    height: 34px;
    border: 2px solid #bbf7d0;
}

.avatar-nav {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.35);
}

/* Popup Backdrop */
.popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-backdrop.hidden {
    display: none;
}

/* Popup Card */
.popup-card {
    background: #fff;
    padding: 16px;
    border-radius: 14px;
    max-width: 900px;
    width: min(92vw, 900px);
    max-height: 85vh;
    overflow: auto;
}

/* Smiley Tabs & Grid */
.smiley-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.smiley-tab,
.smiley-item,
button,
.secondary-button {
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
}

.smiley-tab.active {
    background: #1d4ed8;
}

.smiley-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.smiley-item {
    background: #f8fafc;
    color: #111827;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.smiley-item img {
    max-width: 36px;
    max-height: 36px;
}

.inline-smiley {
    width: 52px;
    height: 52px;
    object-fit: contain;
    vertical-align: middle;
}

/* Auth & Installer Pages */
.auth-page,
.installer-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-page {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(10, 20, 40, 0.78), rgba(60, 10, 90, 0.58)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 1000'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%25' stop-color='%230b1020'/%3E%3Cstop offset='50%25' stop-color='%231b2e6b'/%3E%3Cstop offset='100%25' stop-color='%23ff7a18'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='1000' fill='url(%23g)'/%3E%3Ccircle cx='1220' cy='180' r='170' fill='rgba(255,255,255,0.10)'/%3E%3Ccircle cx='210' cy='780' r='210' fill='rgba(255,255,255,0.08)'/%3E%3Ccircle cx='1380' cy='760' r='260' fill='rgba(255,195,0,0.18)'/%3E%3Ctext x='90' y='330' font-size='120' fill='rgba(255,255,255,0.10)' font-family='Arial' font-weight='700'%3ERadio Schlager%3C/text%3E%3Ctext x='90' y='445' font-size='120' fill='rgba(255,255,255,0.10)' font-family='Arial' font-weight='700'%3EParadies%3C/text%3E%3Ctext x='1130' y='430' font-size='150' fill='rgba(255,255,255,0.16)'%3E%E2%99%AA%3C/text%3E%3Ctext x='1000' y='610' font-size='190' fill='rgba(255,255,255,0.14)'%3E%E2%99%AB%3C/text%3E%3Ctext x='260' y='720' font-size='120' fill='rgba(255,255,255,0.12)'%3E%E2%99%AC%3C/text%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    pointer-events: none;
}

.auth-page::before {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -120px;
    background: radial-gradient(circle, rgba(255, 196, 0, 0.35), transparent 70%);
}

.auth-page::after {
    width: 360px;
    height: 360px;
    left: -100px;
    bottom: -100px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.24), transparent 70%);
}

.auth-card.large,
.installer-wrap.wide {
    width: min(960px, 100%);
}

.auth-card-brand {
    position: relative;
    z-index: 1;
    width: 460px;
    max-width: 90vw;
    padding: 22px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
    color: #fff;
    text-align: center;
}

.auth-branding {
    margin-bottom: 14px;
}

.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.auth-brand-logo .disc {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff3, #fff0 30%), linear-gradient(135deg, #1f2937, #0f172a);
    box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.1), inset 0 0 0 22px rgba(0, 0, 0, 0.3);
}

.auth-brand-logo .logo-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 28px;
    background: linear-gradient(135deg, #ff7a18, #ffb347);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    box-shadow: 0 14px 34px rgba(255, 122, 24, 0.35);
}

.auth-brand-subtitle,
.auth-intro {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    line-height: 1.5;
}

.auth-intro {
    margin: 0 0 16px;
    font-size: 13px;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.auth-form,
.installer-form {
    display: grid;
    gap: 14px;
}

.auth-label,
.form-row,
.section-title,
.button-row,
.form-row-full {
    display: grid;
    gap: 6px;
}

.auth-label > span {
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.auth-form input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-size: 13px;
    outline: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.auth-form input:focus {
    border-color: rgba(255, 179, 71, 0.85);
    box-shadow: 0 0 0 4px rgba(255, 179, 71, 0.22);
    transform: translateY(-1px);
}

.auth-form button {
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff7a18, #ffb347);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: 0 16px 30px rgba(255, 122, 24, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-form button:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 20px 38px rgba(255, 122, 24, 0.34);
    filter: brightness(1.03);
}

.auth-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    font-size: 14px;
}

.auth-links,
.auth-links a {
    color: rgba(255, 255, 255, 0.94);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.installer-form.two-col {
    grid-template-columns: 1fr 1fr;
}

.form-row-full,
.section-title,
.button-row {
    grid-column: 1 / -1;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-top: 6px;
}

/* Notice Messages */
.notice {
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 12px;
}

.notice-success {
    background: #dcfce7;
    color: #166534;
}

.notice-error {
    background: rgba(127, 29, 29, 0.88);
    color: #fff;
    border: 1px solid rgba(254, 202, 202, 0.2);
}

/* Checkbox Row */
.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Admin Area */
.admin-wrap {
    padding: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    border: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.inline-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card h3 {
    margin: 0 0 8px;
}

/* Profile Avatar */
.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 12px 0;
}

/* Responsive Design */
@media (max-width: 1000px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar.right {
        order: 3;
    }

    .installer-form.two-col,
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .auth-page,
    .installer-body {
        padding: 16px;
    }

    .auth-card-brand {
        padding: 20px 16px 18px;
        border-radius: 20px;
    }

    .auth-card h1 {
        font-size: 20px;
    }

    .auth-brand-logo {
        gap: 10px;
    }

    .auth-brand-logo .disc {
        width: 38px;
        height: 38px;
    }

    .auth-brand-logo .logo-center {
        width: 64px;
        height: 64px;
        font-size: 22px;
        border-radius: 18px;
    }

    .auth-links {
        gap: 8px;
        line-height: 1.5;
    }

    .auth-links-buttons {
        grid-template-columns: 1fr;
    }
}

/* Smiley Popup (draggable) */
.smiley-popup {
    position: fixed;
    top: 110px;
    left: 110px;
    z-index: 9999;
    display: block;
    width: min(92vw, 900px);
    max-width: 900px;
    max-height: 85vh;
}

.smiley-popup.hidden {
    display: none;
}

.smiley-popup-card {
    width: min(92vw, 900px);
    max-width: 900px;
    max-height: 85vh;
    overflow: auto;
}

.smiley-popup-header {
    cursor: move;
    user-select: none;
    touch-action: none;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.popup-close {
    font-size: 24px;
    line-height: 1;
    padding: 6px 10px;
    background: #e2e8f0;
    color: #0f172a;
}

.theme-dark .popup-close {
    background: #334155;
    color: #e5e7eb;
}

.online-user-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border: 1px solid #e5e7eb;
    background: transparent;
    color: inherit;
    border-radius: 12px;
    padding: 10px 12px;
    margin: 0 0 10px 0;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
}

.online-user-button span {
    display: inline-block;
    color: inherit;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.online-user-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.action-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
}

.action-modal.hidden {
    display: none;
}

.action-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.action-modal-card {
    position: relative;
    width: min(92vw, 420px);
    margin: 10vh auto 0;
    background: #fff;
    color: #111827;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.theme-dark .action-modal-card {
    background: #111827;
    color: #e5e7eb;
}

.action-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.action-user-preview {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-modal-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.private-message-text {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
}

.theme-dark .private-message-text {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #334155;
}

.theme-dark .online-user-button {
    border-color: #334155;
    background: #111827;
}

/* BUTTON FIX – funktioniert garantiert */
.auth-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.auth-btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: bold;
    text-decoration: none;
    font-size: 12px;
    transition: 0.2s;
}

/* Grün = Registrieren */
.auth-btn.green {
    background: linear-gradient(135deg, #ff7a18, #ffb347);
    color: #fff;
}

.auth-btn.green:hover {
    transform: scale(1.05);
}

/* Weißer Button */
.auth-btn.white {
    background: linear-gradient(135deg, #ff7a18, #ffb347);
    color: #fff;
}

.auth-btn.white:hover {
  transform: scale(1.05);
}


.auth-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-separator::before,
.auth-separator::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.guest-form {
    display: grid;
    gap: 14px;
}

.guest-btn {
    width: 100%;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.guest-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 20px 38px rgba(37, 99, 235, 0.34);
    filter: brightness(1.04);
}


.guest-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #86efac);
    color: #052e16;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}

.theme-dark .guest-badge {
    background: linear-gradient(135deg, #4ade80, #bbf7d0);
    color: #052e16;
}


/* Galerie */
.gallery-btn {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8) !important;
    color: #fff;
}

.gallery-upload-btn {
    width: 100%;
}

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

.gallery-item {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    color: #111827;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

.gallery-item:hover {
    transform: translateY(-2px);
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

.gallery-item span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.chat-gallery-image {
    max-width: min(260px, 100%);
    max-height: 260px;
    width: auto;
    height: auto;
    border-radius: 12px;
    margin: 4px 0;
    display: inline-block;
    box-shadow: 0 8px 20px rgba(0,0,0,0.20);
    vertical-align: middle;
}

.theme-dark .gallery-item {
    background: #1f2937;
    color: #e5e7eb;
}

.back-btn {
    display: inline-block;
    margin-bottom: 15px;
    padding: 8px 14px;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.back-btn:hover {
    background: #1d4ed8;
}

/* =========================
   ADMIN GALERIE (FIX 5x + 200px)
========================= */

.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(5, 200px); /* genau 5 nebeneinander */
    justify-content: center;
    gap: 15px;
}

.gallery-admin-card {
    width: 200px;
    background: #fff;
    padding: 8px;
    border-radius: 12px;
    text-align: center;
    overflow: hidden;
    transition: 0.2s;
}

.gallery-admin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.gallery-admin-card img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.gallery-admin-info {
    margin: 6px 0;
    font-size: 12px;
}

/* Dark Mode */
.theme-dark .gallery-admin-card {
    background: #1f2937;
    color: #e5e7eb;
}

/* Responsive (optional aber empfohlen) */
@media (max-width: 1100px) {
    .gallery-admin-grid {
        grid-template-columns: repeat(3, 200px);
    }
}

@media (max-width: 700px) {
    .gallery-admin-grid {
        grid-template-columns: repeat(2, 200px);
    }
}

/* =========================
   ADMIN HEADER ZENTRIEREN
========================= */

.admin-wrap {
    display: flex;
    flex-direction: column;
    align-items: center; /* alles mittig */
}

/* Zurück Button */
.back-btn {
    display: inline-block;
    margin-bottom: 10px;
    text-align: center;
}

/* Titel */
.admin-wrap h2 {
    text-align: center;
    margin-bottom: 20px;
}


/* =========================
   GALERIE + ADMIN GALERIE BACKGROUND
========================= */

.admin-wrap {
    background: linear-gradient(135deg, #0f172a, #1e3a8a, #ff7a18);
    min-height: 100vh;
    padding: 20px;
    border-radius: 20px;
}

.admin-wrap h2,
.admin-wrap .back-btn {
    color: #fff;
}

.gallery-admin-card {
    background: rgba(255, 255, 255, 0.92);
}

.theme-dark .admin-wrap {
    background: linear-gradient(135deg, #020617, #1e293b, #0ea5e9);
}

.gallery-grid {
    background: linear-gradient(135deg, #1e293b, #0ea5e9);
    padding: 10px;
    border-radius: 12px;
}

.gallery-user {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}

.theme-dark .gallery-user {
    color: #cbd5e1;
}
