/* ============================================================
   ===== USER-PROFIL · REDESIGN · RWE-ROT · MOBILE+DESKTOP =====
   ============================================================
   Ein Markup (user/user.php + user/tab_inhalt.php), per CSS Grid
   responsive umsortiert - siehe .profil-layout unten. Breakpoints:
   Basis (Mobile) < 768px · Tablet 768-1023px · Desktop >= 1024px
   (zweispaltig, Sidebar rechts). Die Keyframes "avatarOnlinePulse"/
   "avatarLivePulse" kommen aus system/online_status.php::avatarStatusCss(),
   das vor diesem Stylesheet in den Head geschrieben wird - hier nur
   referenziert, nicht neu definiert.
   ============================================================ */

/* ============================================================
   ===== LAYOUT-GRID =====
   ============================================================ */
.profil-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    grid-template-areas: "header" "sidebar" "tabs" "content";
    margin-bottom: 1.2rem;
    align-items: start;
}
.profil-header { grid-area: header; }
.profil-sidebar { grid-area: sidebar; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.profil-tabs-wrap { grid-area: tabs; min-width: 0; }
.profil-tab-content { grid-area: content; min-width: 0; }

@media (min-width: 1024px) {
    .profil-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        grid-template-areas: "header header" "tabs sidebar" "content sidebar";
        gap: 20px;
    }
    .profil-sidebar { position: sticky; top: 76px; }
}

/* ============================================================
   ===== HEADER-KARTE =====
   ============================================================ */
.profil-header {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,0.07); border: 1px solid #efe6e6;
}
.profil-header-top {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 12px; padding: 20px 16px 0;
}
.profil-avatar { border-radius: 50%; line-height: 0; position: relative; flex-shrink: 0; }
.profil-avatar img, .profil-avatar span {
    border: 4px solid #fff !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22) !important;
}
.profil-actions { padding-bottom: 8px; }
.profil-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 0.85rem;
    cursor: pointer; text-decoration: none !important; border: 1.5px solid transparent;
    transition: all 0.15s ease; white-space: nowrap; font-family: inherit; line-height: 1;
}
.profil-btn-outline { background: #fff; border-color: #d9c9c9; color: #333 !important; }
.profil-btn-outline:hover { border-color: #a70909; color: #a70909 !important; background: #fff5f5; }
.profil-follow { background: #a70909; border-color: #a70909; color: #fff !important; }
.profil-follow:hover { background: #8a0707; border-color: #8a0707; }
.profil-follow.glocke-abo-aktiv { background: #fff; border-color: #cbb8b8; color: #333 !important; }
.profil-follow.glocke-abo-aktiv:hover { background: #fff1f1; border-color: #dc3545; color: #dc3545 !important; }
.profil-follow .profil-label-abo { display: none; }
.profil-follow.glocke-abo-aktiv .profil-label-folgen { display: none; }
.profil-follow.glocke-abo-aktiv .profil-label-abo { display: inline; }

.profil-identity { padding: 10px 18px 18px; }
.profil-name {
    font-size: 1.35rem; font-weight: 800; color: #1c1c1c; line-height: 1.2;
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
}
.profil-handle { color: #8a8a8a; font-size: 0.9rem; margin-top: 2px; }
.profil-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: #667085; font-size: 0.83rem; }
.profil-meta i { color: #a70909; margin-right: 5px; }
.profil-verein-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #667085; }
.profil-online-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.profil-online-dot { width: 9px; height: 9px; border-radius: 50%; background: #a70909; flex-shrink: 0; }
.profil-online-status.ist-online { color: #16a34a; }
.profil-online-status.ist-online .profil-online-dot { background: #22c55e; box-shadow: 0 0 6px 1px rgba(34,197,94,.8); animation: avatarOnlinePulse 2s ease-in-out infinite; }
.profil-online-status.ist-live { color: #dc2626; text-decoration: none; }
.profil-online-status.ist-live .profil-online-dot { background: #dc2626; box-shadow: 0 0 6px 1px rgba(220,38,38,.8); animation: avatarLivePulse 1.3s ease-in-out infinite; }

/* ============================================================
   ===== SIDEBAR-KARTEN (Stats / Online-Zeit / Verein / Abzeichen / Admin) =====
   ============================================================ */
.profil-card {
    background: #fff; border-radius: 16px; padding: 16px 18px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.07); border: 1px solid #efe6e6;
}
.profil-card-titel {
    font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
    color: #a08a8a; margin: 0 0 12px;
}

/* --- Stats: klickbare Kacheln statt Fließtext --- */
.profil-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 1024px) { .profil-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.profil-stat {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 12px 6px; border-radius: 12px; background: #f8f4f4;
    text-decoration: none !important; color: inherit; min-height: 60px;
    transition: background 0.15s ease, transform 0.1s ease; cursor: pointer; border: none;
}
.profil-stat:hover { background: #f1d3d3; }
.profil-stat:active { transform: scale(0.97); }
.profil-stat b { font-size: 1.05rem; font-weight: 800; color: #1c1c1c; }
.profil-stat span { font-size: 0.7rem; color: #8a7f7f; font-weight: 600; text-align: center; }

/* --- Online-Zeit: Zeilen statt gequetschter Pill-Reihe --- */
.profil-onlinezeit-liste { display: flex; flex-direction: column; gap: 2px; }
.profil-onlinezeit-zeile {
    display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #667085;
    padding: 7px 0; border-bottom: 1px solid #f5efef;
}
.profil-onlinezeit-zeile:last-child { border-bottom: none; padding-bottom: 0; }
.profil-onlinezeit-zeile i { color: #a70909; width: 16px; text-align: center; flex-shrink: 0; }
.profil-onlinezeit-zeile b { color: #1c1c1c; font-weight: 700; margin-left: auto; }

/* --- Lieblingsverein-Karte (zusätzlich zum Avatar-Corner-Badge) --- */
.profil-verein-inhalt { display: flex; align-items: center; gap: 10px; }
.profil-verein-name { font-weight: 700; color: #1c1c1c; font-size: 0.9rem; }

/* --- Abzeichen-Fortschritt --- */
.profil-abzeichen-aktuell { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.profil-abzeichen-icon {
    width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 1.05rem; color: #fff; flex-shrink: 0;
}
.profil-abzeichen-label { font-weight: 800; color: #1c1c1c; font-size: 0.92rem; }
.profil-abzeichen-sub { font-size: 0.74rem; color: #8a8a8a; }
.profil-abzeichen-bar { height: 8px; border-radius: 999px; background: #f1e6e6; overflow: hidden; }
.profil-abzeichen-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #a70909, #e0b64a); }
.profil-abzeichen-fortschritt-text { font-size: 0.75rem; color: #8a7f7f; margin-top: 6px; }

/* --- Admin: Fake-Follower setzen --- */
.profil-admin-follow { display: flex; flex-direction: column; gap: 8px; }
.profil-admin-follow-select {
    padding: 8px 12px; border-radius: 8px; border: 1.5px solid #d9c9c9; font-size: 0.85rem;
    color: #333; width: 100%;
}

/* ============================================================
   ===== TABS (scrollbar auf Mobile/Tablet, statisch ab 1024px) =====
   ============================================================ */
.profil-tabs-wrap {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,0.07); border: 1px solid #efe6e6;
}
.profil-tabs {
    display: flex; overflow-x: auto; scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.profil-tabs::-webkit-scrollbar { display: none; }
.profil-tab {
    flex: 0 0 auto; scroll-snap-align: start; text-align: center;
    padding: 15px 16px 13px; font-size: 0.85rem; font-weight: 700; color: #6b6b6b !important;
    text-decoration: none !important; position: relative; white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.profil-tab i { margin-right: 5px; }
.profil-tab:hover { background: #faf3f3; color: #a70909 !important; }
.profil-tab .profil-tab-cnt { color: #b0a0a0; margin-left: 3px; }
.profil-tab.aktiv { color: #a70909 !important; }
.profil-tab.aktiv .profil-tab-cnt { color: #a70909; }
.profil-tab.aktiv::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: 0;
    height: 4px; border-radius: 4px 4px 0 0; background: #a70909;
}
@media (min-width: 1024px) {
    .profil-tabs { overflow-x: visible; }
    .profil-tab { flex: 1 1 0; }
    .profil-tab.aktiv::after { left: 50%; right: auto; transform: translateX(-50%); width: 60%; max-width: 70px; }
}

/* ============================================================
   ===== TAB-INHALT (AJAX-Ziel #userTabContent) =====
   ============================================================ */
.profil-tab-content {
    background: #fff; border-radius: 16px; padding: 1.2rem;
    box-shadow: 0 2px 14px rgba(0,0,0,0.07); border: 1px solid #efe6e6;
}

.user-beitrag-item { padding: 0.8rem 0; border-bottom: 1px solid #f0f0f0; }
.user-beitrag-item:last-child { border-bottom: none; }
.user-beitrag-thema { font-weight: 700; color: #a70909; text-decoration: none; font-size: 0.9rem; }
.user-beitrag-thema:hover { text-decoration: underline; }
.user-beitrag-forum { font-size: 0.75rem; color: #999; margin-left: 6px; }
.user-beitrag-auszug { font-size: 0.85rem; color: #555; margin-top: 4px; }
.user-beitrag-zeit { font-size: 0.72rem; color: #aaa; margin-top: 4px; }

.user-leer { text-align: center; color: #999; padding: 1.5rem; font-size: 0.85rem; }

.user-pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.user-pagination a { padding: 0.45rem 0.9rem; border-radius: 999px; background: #f4eded; color: #a70909; font-weight: 600; text-decoration: none; font-size: 0.8rem; }
.user-pagination a:hover { background: #ecdcdc; }
.user-pagination a.aktiv { background: #a70909; color: #fff; }

/* --- Medien: Filter-Chips mit Live-Zähler --- */
.user-filter-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.user-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
    background: #f4eded; color: #6b6b6b !important; text-decoration: none !important;
    border: 1.5px solid transparent; transition: all 0.15s ease;
}
.user-chip:hover { background: #f1d3d3; color: #a70909 !important; }
.user-chip.aktiv { background: #a70909; color: #fff !important; }
.user-chip-cnt { opacity: 0.75; font-weight: 700; font-size: 0.72rem; }

/* Kanal-Kachel: Teilen/Bearbeiten/Loeschen als gestapelte Saeule statt
   einzeln positionierter Buttons - Anzahl variiert (1-3) je nach Medientyp
   und Berechtigung, Flex uebernimmt den Abstand automatisch. */
.user-media-kanal-aktionen {
    position: absolute; top: 7px; right: 7px; z-index: 3;
    display: flex; flex-direction: column; gap: 6px;
}
.user-media-kanal-aktionen .user-media-bookmark-btn { position: static; }

/* --- Kanal: Upload-Leiste - 1:1 dieselben Klassen/Farben wie die Forum-
   Schnellantwort (system/assets/css/schnellantwort.css), damit der Kanal-
   Upload optisch identisch zum Forum-Upload wirkt statt wie ein eigenes
   Widget. Absichtlich dieselben Klassennamen wie dort (kein Namenskonflikt,
   schnellantwort.css wird auf user.php nicht geladen). --- */
.kanal-upload-bar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.kanal-upload-status { font-size: 0.8rem; color: #6b7280; }
.upload-dropzone-label {
    background: #993234; color: white; padding: 8px 16px; border-radius: 6px;
    cursor: pointer; font-weight: 500; font-size: 0.85rem;
    transition: background 0.2s, transform 0.2s;
    display: inline-flex; align-items: center; gap: 6px; border: none; position: relative;
}
.upload-dropzone-label:hover { background: #7a2628; transform: translateY(-1px); }
.upload-progress-track { width: 100%; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.upload-progress-fill { width: 0%; height: 100%; background: linear-gradient(90deg, #993234, #dc3545); border-radius: 3px; transition: width 0.3s; }
.upload-type-menu {
    display: none; position: fixed; background: #fff; border: 1px solid #e5dfdf;
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); padding: 8px; gap: 4px; z-index: 9999;
}
.upload-type-menu.open { display: flex; }
.upload-type-btn {
    display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; padding: 8px 6px;
    border: none; border-radius: 8px; background: #f5f0f0; color: #993234; font-size: 0.6rem;
    font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.upload-type-btn i { font-size: 1rem; }
.upload-type-btn:hover { background: #993234; color: #fff; }

/* --- Kanal: Bearbeiten-Modal (Verwischen-Boxen auf fertigem Bild/Video),
   Grundgeruest (Overlay/Header/Body/Footer) wiederverwendet, sonst nur noch
   fuer dieses Modal im Einsatz (Upload laeuft jetzt ueber die Leiste oben). --- */
.kanal-upload-modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(20,20,20,0.6);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 9999; align-items: center; justify-content: center; padding: 1rem;
}
.kanal-upload-modal-overlay.sichtbar { display: flex; }
.kanal-upload-modal { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.kanal-upload-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid #f0e8e8; }
.kanal-upload-modal-header h3 { margin: 0; font-size: 1.05rem; color: #1c1c1c; }
.kanal-upload-modal-header h3 i { color: #a70909; margin-right: 6px; }
.kanal-upload-modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; color: #999; cursor: pointer; padding: 0 4px; }
.kanal-upload-modal-close:hover { color: #a70909; }
.kanal-upload-modal-body { padding: 1.1rem 1.2rem; overflow-y: auto; }
.kanal-upload-modal-footer { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 1rem 1.2rem; border-top: 1px solid #f0e8e8; }
.kanal-bearbeiten-modal { max-width: 680px; }
.kanal-bearbeiten-hinweis { font-size: 0.8rem; color: #8a7f7f; margin: 0 0 0.8rem; }
.kanal-bearbeiten-stage {
    position: relative; width: 100%; background: #111; border-radius: 10px;
    overflow: hidden; line-height: 0;
}
.kanal-bearbeiten-stage img, .kanal-bearbeiten-stage video { width: 100%; height: auto; display: block; }
.kanal-bearbeiten-box-btn { margin-top: 0.9rem; }
.kanal-bearbeiten-status { font-size: 0.8rem; color: #8a7f7f; margin-top: 0.6rem; min-height: 1.1em; }

/* Boxen-Ebene: reines Positionier-/Groessen-Overlay (die eigentliche
   Verpixelung passiert serverseitig), Vorbild: .ls-zensur-ebene in
   livestreams/start.php. pointer-events:none auf der Ebene, damit Klicks
   ausserhalb der Boxen (z.B. Video-Controls) durchgereicht werden. */
.kanal-blur-ebene { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.kanal-blur-box {
    pointer-events: auto;
    position: absolute; border: 2px dashed rgba(255,255,255,0.9); box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
    background: rgba(167,9,9,0.14); cursor: move; touch-action: none;
}
.kanal-blur-box-entfernen {
    position: absolute; top: -12px; right: -12px; width: 22px; height: 22px; border-radius: 50%;
    background: #a70909; color: #fff; border: 2px solid #fff; font-size: 0.68rem; cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center; z-index: 2;
}
.kanal-blur-box-resize {
    position: absolute; right: -7px; bottom: -7px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; border: 2px solid #a70909; cursor: nwse-resize; z-index: 2; touch-action: none;
}

/* Zuschnitt-Rahmen + Text-Vorschau: weitere Ebenen auf .kanal-bearbeiten-stage,
   rein visuell (pointer-events:none) - Vorbild .ls-crop-overlay/.ls-text-preview
   in livestreams/editor.php. */
.kanal-crop-overlay {
    position: absolute; border: 2px dashed rgba(255,255,255,0.85); box-shadow: 0 0 0 2000px rgba(0,0,0,0.45);
    pointer-events: none; display: none; top: 0; left: 0; right: 0; bottom: 0; z-index: 3;
}
.kanal-text-preview {
    position: absolute; left: 0; right: 0; text-align: center; color: #fff; font-weight: 700;
    text-shadow: 0 0 6px rgba(0,0,0,0.9), 0 0 2px rgba(0,0,0,0.9); pointer-events: none; padding: 0 10px;
    word-wrap: break-word; display: none; z-index: 5;
}

/* --- Kanal-Video-Werkzeuge (Schneiden/Zuschnitt/Ton/Farbe/Text) - 1:1
   dieselben Klassen/Farben wie livestreams/editor.php (.ls-editor-box etc.),
   gleiche Nachbearbeitungs-Toolbox wie bei Livestream-Aufzeichnungen. --- */
.kanal-bearbeiten-box { background: #f8f4f4; border-radius: 12px; padding: 0.9rem; margin-top: 0.8rem; }
.kanal-bearbeiten-box h4 { font-size: 0.85rem; margin: 0 0 0.6rem; color: #4a3a3a; }
.kanal-bearbeiten-box h4 i { color: #a70909; margin-right: 4px; }
.kanal-bearbeiten-hint-klein { font-size: 0.75rem; color: #8a7f7f; margin: 0 0 0.5rem; }

.kanal-trim-track {
    position: relative; height: 44px; border-radius: 8px; margin-bottom: 0.5rem;
    background: #1a1414;
    background-image: repeating-linear-gradient(90deg, #2a2020 0px, #2a2020 2px, #1a1414 2px, #1a1414 22px);
    touch-action: none;
}
.kanal-trim-grau { position: absolute; top: 0; bottom: 0; background: rgba(0,0,0,0.68); border-radius: 8px; }
.kanal-trim-grau-links { left: 0; }
.kanal-trim-grau-rechts { right: 0; }
.kanal-trim-handle {
    position: absolute; top: -4px; bottom: -4px; width: 18px; margin-left: -9px; background: #a70909;
    border-radius: 6px; cursor: ew-resize; touch-action: none; display: flex; align-items: center;
    justify-content: center; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,0.3); z-index: 2;
}
.kanal-trim-handle::before { content: ''; width: 3px; height: 16px; background: rgba(255,255,255,0.85); border-radius: 2px; }
.kanal-trim-schnitt-bloecke { position: absolute; top: 0; bottom: 0; left: 0; right: 0; pointer-events: none; }
.kanal-trim-schnitt-block {
    position: absolute; top: 0; bottom: 0; background: rgba(167,9,9,0.6);
    border-left: 2px solid #a70909; border-right: 2px solid #a70909; pointer-events: auto; cursor: pointer;
}
.kanal-trim-schnitt-entfernen {
    position: absolute; top: -8px; right: -8px; width: 18px; height: 18px; border-radius: 50%;
    background: #a70909; color: #fff; border: 2px solid #fff; font-size: 0.6rem; line-height: 1;
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3;
}
.kanal-trim-auswahl { position: absolute; top: 0; bottom: 0; background: rgba(167,9,9,0.4); border: 2px dashed #a70909; pointer-events: none; }
.kanal-schnitt-liste { display: flex; flex-direction: column; gap: 4px; }
.kanal-schnitt-eintrag {
    display: flex; align-items: center; justify-content: space-between; background: #fdf1f1;
    border-radius: 8px; padding: 5px 10px; font-size: 0.78rem; color: #4a3a3a;
}
.kanal-schnitt-eintrag button { background: none; border: none; color: #a70909; cursor: pointer; font-size: 0.85rem; }

.kanal-preset-wahl { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0.6rem; }
.kanal-preset-wahl button {
    padding: 7px 14px; border-radius: 16px; border: 1px solid #e0d5d5; background: #fff; color: #4a3a3a;
    font-size: 0.8rem; cursor: pointer;
}
.kanal-preset-wahl button.kanal-preset-aktiv { background: #a70909; color: #fff; border-color: #a70909; }

.kanal-slider-feld { margin-bottom: 0.6rem; }
.kanal-slider-feld label { display: flex; justify-content: space-between; font-size: 0.8rem; color: #4a3a3a; margin-bottom: 3px; }
.kanal-slider-feld input[type="range"] { width: 100%; accent-color: #a70909; }

.kanal-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; color: #4a3a3a; cursor: pointer; }
.kanal-checkbox-label input { width: 17px; height: 17px; accent-color: #a70909; }

.kanal-feld { margin-bottom: 0.6rem; }
.kanal-feld label { display: block; font-size: 0.78rem; font-weight: 600; color: #4a3a3a; margin-bottom: 4px; }
.kanal-feld input[type="text"], .kanal-feld select {
    width: 100%; padding: 8px 10px; border: 1px solid #e0d5d5; border-radius: 8px; font-size: 0.85rem; box-sizing: border-box;
}
.kanal-feld-reihe { display: flex; gap: 8px; }
.kanal-feld-reihe > div { flex: 1; }

/* --- Follower: Pill-Umschalter (Follower/Folgt) --- */
.user-pill-umschalter { display: flex; gap: 1.4rem; margin-bottom: 0.9rem; border-bottom: 1px solid #f2eded; padding-bottom: 0.8rem; }
.user-pill { font-size: 0.9rem; font-weight: 700; color: #8a8a8a !important; text-decoration: none !important; }
.user-pill b { color: inherit; font-weight: 800; margin-left: 3px; }
.user-pill.aktiv { color: #1c1c1c !important; }

/* --- Folgt/Follower-Listen: 2 Spalten ab Desktop --- */
.user-people-liste { display: flex; flex-direction: column; gap: 0; }
@media (min-width: 1024px) {
    .user-people-liste { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 12px; }
}
.user-people-item {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.4rem;
    border-bottom: 1px solid #f2eded;
}
.user-people-item:last-child { border-bottom: none; }
.user-people-item:hover { background: #faf7f7; border-radius: 10px; }
.user-people-link { display: flex; align-items: center; gap: 0.7rem; flex: 1; min-width: 0; text-decoration: none !important; color: inherit; }
.user-people-info { min-width: 0; }
.user-people-name { font-weight: 700; font-size: 0.9rem; color: #1c1c1c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-people-status { font-size: 0.74rem; color: #999; margin-top: 1px; }
.user-people-status.ist-online { color: #16a34a; font-weight: 600; }
.user-people-entfernen {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; border: none;
    background: #f4eded; color: #a70909; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.user-people-entfernen:hover { background: #f1d3d3; }

/* --- Medien als kompakte Kacheln (Fotos/Video/Audio/PDF einheitlich) -
   Wiedergabe/Vergroesserung passiert im Profil per Klick, oeffnet den
   echten Player (Plyr/PDF-Flipbook) bzw. das Vollbild in einem Overlay. --- */
.user-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.7rem; padding: 0.2rem 0; }
@media (min-width: 1024px) {
    .user-media-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.9rem; }
}

/* ===== DATEIEN-TAB: generische Anhaenge (IPA, APK, ZIP, DOCX, ...) als =====
   ===== Liste statt Kachel-Grid - rwe-file-wrapper ist eine Zeile, keine  =====
   ===== quadratische Kachel wie Foto/Video (siehe system/file_viewer.php) */
.user-dateien-liste { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.2rem 0; }
.user-dateien-liste .rwe-file-wrapper { max-width: none; margin: 0; }
.user-datei-kontext { font-size: 0.72rem; color: #999; margin: -0.3rem 0 0.2rem 2px; }
.user-datei-kontext a { color: #a70909; text-decoration: none; }
.user-datei-kontext a:hover { text-decoration: underline; }

.user-media-tile {
    position: relative; aspect-ratio: 4 / 3; width: 100%; display: block;
    border: none; padding: 0; border-radius: 12px; overflow: hidden;
    cursor: pointer; background: #2a2a2a; box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.user-media-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-media-tile.user-media-audio {
    background: linear-gradient(155deg, #a70909 0%, #5c0303 100%);
    display: flex; align-items: center; justify-content: center;
}
.user-media-tile.user-media-audio i.user-media-noten { font-size: 2.1rem; color: rgba(255,255,255,0.85); }
.user-media-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.16); transition: background 0.15s ease;
}
.user-media-tile:hover .user-media-play { background: rgba(0,0,0,0.32); }
.user-media-play i {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.94); color: #a70909;
    display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.user-media-badge {
    position: absolute; left: 7px; bottom: 7px; background: rgba(0,0,0,0.62); color: #fff;
    font-size: 0.62rem; font-weight: 600; padding: 3px 8px 3px 7px; border-radius: 999px;
    display: flex; align-items: center; gap: 4px; letter-spacing: 0.02em;
}
/* --- Bookmark-Button auf jeder Medien-Kachel: eigener Wrapper noetig, da
   .user-media-tile selbst ein <button> ist (kein <button> im <button>) --- */
.user-media-tile-wrap { position: relative; }
.user-media-bookmark-btn {
    position: absolute; top: 7px; right: 7px; z-index: 3;
    width: 28px; height: 28px; border: none; border-radius: 50%;
    background: rgba(0,0,0,0.55); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}
.user-media-bookmark-btn:hover { background: rgba(167,9,9,0.9); transform: scale(1.08); }
.user-media-bookmark-btn.is-bookmarked { background: rgba(167,9,9,0.9); }
/* --- Overlay je Medienelement: zeigt den echten Player/Vollbild gross --- */
.user-media-overlay {
    display: none; position: fixed; inset: 0;
    background-color: rgba(20,20,20,0.75);
    background-image: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.6)), var(--user-media-overlay-bild, url('/A6AE3E00-71BB-4861-BEC4-3917FEADCE99.png'));
    background-size: cover; background-position: center; background-repeat: no-repeat;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 9999; align-items: center; justify-content: center; padding: 1rem;
}
.user-media-overlay.sichtbar { display: flex; }
/* .user-media-frame liegt AUSSERHALB der scrollbaren Box (die overflow-y:
   auto hat) - der Schliessen-Button sitzt auf diesem Rahmen, damit er
   niemals vom Scroll-Container der Box abgeschnitten/verdeckt wird. */
.user-media-frame { position: relative; max-width: 600px; width: 100%; max-height: 90vh; }
.user-media-box {
    background: #fff; border-radius: 14px; width: 100%; max-height: 90vh;
    overflow-y: auto; padding: 1rem;
}
.user-media-close {
    position: absolute; top: -20px; right: -20px; width: 44px; height: 44px; border-radius: 50%;
    background: #a70909; color: #fff; border: 4px solid #fff; font-size: 1.15rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2;
    box-shadow: 0 3px 12px rgba(0,0,0,0.45);
}
.user-media-close:hover { background: #8a0707; }
@media (max-width: 480px) {
    /* Nah am oberen Bildschirmrand ist ausserhalb der Box kein Platz mehr -
       Button dann leicht in die Box hineinziehen statt abzuschneiden. */
    .user-media-close { top: -16px; right: -8px; width: 38px; height: 38px; font-size: 1rem; }
}
.user-media-meta { margin-top: 0.7rem; font-size: 0.78rem; color: #999; display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; }
.user-media-meta .user-video-kontext { color: #a70909 !important; text-decoration: none; font-weight: 600; }
.user-media-meta .user-video-kontext:hover { text-decoration: underline; }

/* ============================================================
   ===== TABLET (768-1023px): mehr Luft statt nur Skalierung =====
   ============================================================ */
@media (min-width: 768px) {
    .profil-header-top { padding: 24px 20px 0; }
    .profil-identity { padding: 12px 22px 18px; }
    .profil-name { font-size: 1.55rem; }
    .profil-tab { font-size: 0.92rem; }
}

/* ============================================================
   ===== GAST-SPERRE (siehe $gast_sperre_aktiv in user/user.php):
   ===== Kopfbereich (.profil-header) bleibt scharf, alles darunter
   ===== bleibt komplett im HTML, wird aber fuer echte Gaeste (kein
   ===== Login, kein Bot) per CSS verschwommen - gleiche Technik wie
   ===== .post-row.gast-verschwommen in thema/inhalt.php. =====
   ============================================================ */
.profil-sidebar.gast-verschwommen,
.profil-tabs-wrap.gast-verschwommen,
.profil-tab-content.gast-verschwommen {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}
.gast-profil-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.gast-profil-overlay.sichtbar { display: flex; }
.gast-gate-box {
    position: relative;
    text-align: center;
    max-width: 340px;
    width: 100%;
    padding: 1.5rem 1.6rem;
    background: #000;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.45);
    overflow: hidden;
}
/* Dezenter roter Glow im Hintergrund, wie das .x-auth-Panel auf login.php */
.gast-gate-box::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    top: -90px;
    right: -80px;
    background: #a70909;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    pointer-events: none;
}
.gast-gate-box > * { position: relative; z-index: 1; }
.gast-gate-logo {
    max-width: 56px;
    height: auto;
    margin-bottom: 0.7rem;
    filter: drop-shadow(0 0 24px rgba(167, 9, 9, 0.5));
}
.gast-gate-box h3 { font-size: 1.05rem; color: #fff; margin: 0 0 0.5rem; font-weight: 800; }
.gast-gate-box p { font-size: 0.85rem; color: #71767b; margin: 0 0 1rem; line-height: 1.4; }
.gast-gate-btn {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    background: #a70909;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}
.gast-gate-btn:hover {
    background: #c81212;
    color: #fff;
    box-shadow: 0 6px 20px rgba(167, 9, 9, 0.45);
}
.gast-spotlight-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #71767b;
    cursor: pointer;
    padding: 4px;
}
.gast-spotlight-modal-close:hover { color: #fff; }
