/* ==========================================================================
   1. GLOBALE VARIABLEN & DESIGN-SYSTEM
   ========================================================================== */
:root {
    --bg-main: #0c0c0e;
    --bg-card: #141416;
    --border-color: #222226;
    --text-main: #e1e1e6;
    --text-muted: #888894;
    --primary: #00e676;
    --primary-hover: #00c865;
    --accent-glow: rgba(0, 230, 118, 0.15);
    
    /* Touch-Optimierung für Mobilgeräte */
    --touch-target: 44px; 
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100dvh; /* Dynamische Höhe für mobile Browser-Leisten */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* ==========================================================================
   2. START-SCREEN (LANDINGPAGE & ANMELDUNG) - PERFEKT FÜR HOCHKANT
   ========================================================================== */
#login-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; 
    height: 100vh; height: 100dvh;
    background: radial-gradient(circle at 50% 30%, #16161a 0%, var(--bg-main) 80%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Verhindert das Abschneiden auf kurzen Bildschirmen im Hochkantmodus */
    padding: 24px 12px;
    overflow-y: auto; /* Aktiviert sauberes Scrollen, falls der Inhalt höher als das Display ist */
}

.login-wrapper {
    margin: auto; /* Zentriert die Box perfekt vertikal, solange genug Platz da ist */
    display: grid;
    grid-template-columns: 1fr; /* Standard: 1 Spalte für mobile Geräte & Hochkant */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 950px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    overflow: hidden;
}

/* Linke Spalte: Hero-Bereich (Wird im Hochkant-Modus ausgeblendet) */
.login-hero-side {
    display: none; 
    padding: 40px;
    background: linear-gradient(135deg, #111113 0%, #080809 100%);
    border-right: 1px solid var(--border-color);
    flex-direction: column;
    justify-content: center;
}

.brand-title {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}
.brand-title span {
    color: var(--primary);
    text-shadow: 0 0 15px var(--accent-glow);
}

.brand-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.feat-card {
    display: flex;
    gap: 15px;
    margin-bottom: 16px;
    background: rgba(255,255,255,0.01);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.feat-card:hover {
    border-color: rgba(0, 230, 118, 0.15);
    background: rgba(255,255,255,0.02);
}
.feat-icon { font-size: 24px; line-height: 1; }
.feat-text h4 { margin: 0 0 4px 0; font-size: 15px; color: #fff; }
.feat-text p { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* Rechte Spalte: Anmeldeformular */
.login-form-side {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #141416;
}

.form-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #fff;
    letter-spacing: -0.3px;
}

.login-form-side input, .login-form-side select {
    width: 100%;
    height: var(--touch-target);
    padding: 0 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    margin-bottom: 12px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.2s ease;
}
.login-form-side input:focus, .login-form-side select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 10px var(--accent-glow);
}
.entry-language-select {
    font-weight: 700;
    border-color: rgba(255,255,255,0.16) !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)) !important;
}
.entry-language-select option {
    color: #111;
}

.disclaimer-box {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    font-size: 11px;
    color: var(--text-muted);
    max-height: 120px;
    overflow-y: auto;
    margin: 4px 0 14px 0;
    line-height: 1.45;
}
.disclaimer-box strong { color: var(--text-main); }

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: var(--text-main);
    text-align: left;
    margin-bottom: 20px;
    cursor: pointer;
    line-height: 1.4;
    user-select: none;
}
.checkbox-container input {
    width: 16px; height: 16px;
    margin: 2px 0 0 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.start-btn {
    background: var(--primary);
    color: #000;
    font-weight: bold;
    border: none;
    height: 48px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
}
.start-btn:hover { background: var(--primary-hover); }
.start-btn:active { transform: scale(0.98); }

/* ==========================================================================
   3. MAIN APPLICATION INTERFACE & SIDEBAR OPTIMIERUNG
   ========================================================================== */
#app-container {
    display: flex;
    width: 100vw;
    height: 100vh; height: 100dvh;
    background: var(--bg-main);
}

#sidebar {
    width: 100%; /* Mobil-First */
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

#app-container.chat-active #sidebar { display: none; }

/* Schwebendes Premium-Design für die eigene Profilkarte */
.profile-card {
    margin: 14px 14px 6px 14px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s ease;
}
.profile-card:hover {
    border-color: rgba(255,255,255,0.05);
}
.profile-card.gender-M { border-left: 4px solid #52a3ff; }
.profile-card.gender-W { border-left: 4px solid #ff52a3; }
.profile-card.gender-D { border-left: 4px solid #a352ff; }

.profile-nick-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
    --user-accent: #fff;
}
.profile-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
}
.profile-nick-text {
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    color: var(--user-accent);
}
.profile-language-select {
    max-width: 132px;
    min-height: 26px;
    padding: 2px 22px 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
    font-size: 12px;
    cursor: pointer;
}
.profile-language-select:focus {
    outline: none;
    border-color: var(--primary);
}
.profile-language-select option {
    color: #111;
}

.sidebar-header {
    padding: 15px 20px 5px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: bold;
}

#chat-stats {
    margin: 4px 10px 4px 10px;
    padding: 7px 9px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0,230,118,0.065), rgba(255,255,255,0.02));
    box-shadow: 0 2px 9px rgba(0,0,0,0.14);
}
.chat-stats-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    color: var(--text-main);
    font-size: 10px;
    line-height: 1.25;
}
.chat-stats-mainline {
    justify-content: space-between;
    margin-bottom: 4px;
}
.chat-stats-main {
    color: var(--text-main);
    font-weight: 800;
}
.chat-stats-main b {
    color: var(--primary);
    font-size: 17px;
    line-height: 1;
}
.chat-stats-muted {
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
}
.chat-stats-details span {
    color: var(--text-muted);
    white-space: nowrap;
}
.chat-stats-details span:nth-child(1),
.chat-stats-details span:nth-child(2) {
    color: var(--text-main);
    font-weight: 700;
}

/* v86: breiter goldener Entertainment-Button unter dem eigenen Profil */
.entertainment-sidebar-btn {
    display: block;
    width: calc(100% - 20px);
    margin: 6px 10px 8px 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 219, 112, 0.72);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff1a8 0%, #f6c744 45%, #c98511 100%);
    color: #211304;
    box-shadow: 0 8px 22px rgba(201, 133, 17, 0.28), inset 0 1px 0 rgba(255,255,255,0.55);
    font-weight: 950;
    letter-spacing: .3px;
    text-transform: uppercase;
    cursor: pointer;
}
.entertainment-sidebar-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}
.entertainment-sidebar-btn:active {
    transform: translateY(0);
}

#user-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.lang-group-header {
    font-size: 11px;
    color: var(--primary);
    padding: 12px 10px 6px 10px;
    font-weight: bold;
    text-transform: uppercase;
}
.active-chats-header { color: #ffb300; }

.chatter-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.02), 0 4px 14px rgba(0,0,0,0.28);
}
.chatter-avatar-core {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.chatter-avatar.is-generic .chatter-avatar-core {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--avatar-accent, #a352ff), rgba(255,255,255,0.12));
}
.chatter-avatar.s4c-gold-ring {
    border-color: rgba(255, 211, 110, 0.96);
    box-shadow: 0 0 0 2px rgba(255, 211, 110, 0.38), 0 0 16px rgba(255, 192, 55, 0.28), 0 4px 14px rgba(0,0,0,0.28);
}
.chatter-avatar.s4c-gold-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 210deg, #8a5400, #fff1a8, #f6c744, #b46a00, #fff5bd, #8a5400);
    z-index: -1;
    opacity: .92;
}
.chatter-avatar.s4c-gold-ring::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
    pointer-events: none;
}
.chatter-avatar.s4c-gold-legend::before {
    animation: s4cGoldSpin 9s linear infinite;
}
.s4c-avatar-stars {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1px 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff6bf, #f7c94a 45%, #b56f00);
    color: #3a2100;
    border: 1px solid rgba(255,255,255,.62);
    box-shadow: 0 3px 9px rgba(0,0,0,.33);
    font-size: 9px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -1px;
    white-space: nowrap;
}
.msg-avatar .s4c-avatar-stars { top: -8px; font-size: 7px; padding: 1px 3px; }
.profile-avatar .s4c-avatar-stars { top: -10px; }
.s4c-gold-name {
    color: #f6c744 !important;
    text-shadow: 0 0 7px rgba(246, 199, 68, .35);
}
.s4c-gold-name-legend {
    background: linear-gradient(90deg, #fff4b0, #f6c744, #ff9f2a, #fff4b0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    text-shadow: none;
}
.s4c-voice-mic-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 3px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff6bf, #f7c94a 48%, #a86500);
    color: #2b1600;
    border: 1px solid rgba(255,255,255,.7);
    box-shadow: 0 2px 8px rgba(246, 199, 68, .24);
    font-size: 11px;
    line-height: 1;
    vertical-align: middle;
}
.msg-meta .s4c-voice-mic-badge { width: 14px; height: 14px; font-size: 9px; margin-left: 4px; }

.s4c-cam-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 3px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff6bf, #f7c94a 48%, #a86500);
    color: #2b1600;
    border: 1px solid rgba(255,255,255,.7);
    box-shadow: 0 2px 8px rgba(246, 199, 68, .24);
    font-size: 11px;
    line-height: 1;
    vertical-align: middle;
}
.msg-meta .s4c-cam-badge { width: 14px; height: 14px; font-size: 9px; margin-left: 4px; }

@keyframes s4cGoldSpin { to { transform: rotate(360deg); } }
.user-item-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.user-item-copy {
    min-width: 0;
    flex: 1;
}
.user-item-top {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex-wrap: wrap;
}
.user-nick {
    color: var(--user-accent, #fff);
    font-weight: 700;
}
.user-age {
    font-size: 12px;
    color: var(--text-muted);
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 5px;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.02);
    transition: all 0.15s ease;
}
.user-item:hover { background: rgba(255,255,255,0.05); }
.user-item.selected { background: rgba(0, 230, 118, 0.08); border-color: rgba(0, 230, 118, 0.15); }
.user-item.gender-M .user-tag { background: rgba(82,163,255,0.12); color: #52a3ff; }
.user-item.gender-W .user-tag { background: rgba(255,82,163,0.12); color: #ff52a3; }
.user-item.gender-D .user-tag { background: rgba(163,82,255,0.12); color: #a352ff; }

.user-tag {
    font-size: 10px;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 4px;
}

.unread-dot {
    width: 8px; height: 8px; background: #ff5252; border-radius: 50%;
    display: inline-block; margin-left: 6px;
}

/* Chat-Fenster */
#chat-window {
    display: none;
    flex: 1;
    flex-direction: column;
    background: var(--bg-main);
    position: relative;
    height: 100%;
}

#app-container.chat-active #chat-window { display: flex; }

#chat-header-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
}

#back-btn {
    display: block;
    background: transparent; border: none; color: #fff;
    font-size: 22px; cursor: pointer; padding: 4px 8px;
}

#chat-header {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.25;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    letter-spacing: .01em;
}

#chat-header.private-chat-secure {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-header-name,
.chat-header-extra {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-header-name {
    flex: 0 1 auto;
}
.chat-header-extra {
    flex: 1 1 auto;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
}
.chat-e2ee-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(92, 255, 166, 0.28);
    background: rgba(92, 255, 166, 0.10);
    color: #8fffd0;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .03em;
}

#chat-header-actions { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
#block-btn,
#clear-history-btn {
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 31px;
    line-height: 1;
}
#block-btn {
    border: 1px solid rgba(255, 82, 82, 0.32);
    background: rgba(255, 82, 82, 0.10);
    color: #ff8a8a;
}
#clear-history-btn {
    border: 1px solid rgba(255, 179, 0, 0.32);
    background: rgba(255, 179, 0, 0.10);
    color: #ffc857;
}
#block-btn::before { content: "🚫"; font-size: 13px; line-height: 1; }
#clear-history-btn::before { content: "🗑️"; font-size: 13px; line-height: 1; }
#block-btn:hover { background: rgba(255, 82, 82, 0.18); }
#clear-history-btn:hover { background: rgba(255, 179, 0, 0.18); }
#block-btn:disabled,
#clear-history-btn:disabled { opacity: 0.45; cursor: not-allowed; }
#block-btn[hidden],
#clear-history-btn[hidden] { display: none; }

#chatbox {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
    position: relative;
}
.msg.me {
    background: var(--primary);
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}
.msg.partner {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.msg-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.msg-avatar {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}
.msg-meta { font-size: 10px; color: var(--text-muted); margin-bottom: 0; font-weight: bold; }
.msg-meta-name { color: var(--user-accent, var(--text-muted)); }
.msg.me .msg-meta-name { color: rgba(0, 0, 0, 0.72); }
.msg-time {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    line-height: 1;
    color: var(--text-muted);
    text-align: right;
    opacity: 0.78;
    user-select: none;
}
.msg.me .msg-time {
    color: rgba(0, 0, 0, 0.55);
}

.system-msg {
    align-self: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    margin: 6px 0;
    text-align: center;
    max-width: 90%;
}

.system-msg.system-error {
    color: #ff5252;
    font-weight: bold;
    border-color: rgba(255, 82, 82, 0.35);
}

#chat-input-area {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#message-input {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    height: var(--touch-target);
    padding: 0 12px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}
#message-input:disabled { opacity: 0.5; cursor: not-allowed; }

.file-label {
    background: var(--border-color);
    color: #fff;
    height: var(--touch-target);
    width: var(--touch-target);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}
.file-label:hover { background: #32323a; }

#send-btn {
    background: var(--primary);
    color: #000; font-weight: bold; border: none;
    height: var(--touch-target);
    padding: 0 16px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
#send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Banner */
#ad-banner {
    background: #1a160c;
    border: 1px solid #ffb30022;
    margin: 0 12px 10px 12px;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.ad-body { display: flex; flex-direction: column; gap: 2px; }
.ad-meta { display: flex; align-items: center; gap: 6px; }
.ad-badge { font-size: 9px; background: #ffb300; color: #000; padding: 1px 4px; border-radius: 3px; font-weight: bold; }
.ad-title { font-size: 12px; font-weight: bold; color: #ffb300; }
.ad-subtitle { font-size: 11px; color: var(--text-muted); }
.ad-action-btn { background: #ffb300; color: #000; text-decoration: none; font-size: 11px; font-weight: bold; padding: 6px 10px; border-radius: 4px; white-space: nowrap; }

/* Thumbnails */
.chat-image, .chat-video { cursor: zoom-in; transition: transform 0.2s, opacity 0.2s; max-width: 100%; max-height: 220px; border-radius: 6px; margin-top: 5px; display: block; -webkit-touch-callout: default; user-select: auto; }
.chat-image:hover, .chat-video:hover { transform: scale(1.01); opacity: 0.9; }

/* KUGELSICHERE LUPEN-STYLING ENGINE */
.chat-lightbox {
    display: none; position: fixed; top: 0; left: 0; 
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.96); z-index: 99999; 
    justify-content: center; align-items: center;
    cursor: zoom-out; opacity: 0; transition: opacity 0.2s ease-in-out;
    padding: 16px;
}
.chat-lightbox.show { display: flex; opacity: 1; }

#chat-lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.chat-lightbox-actions {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    display: flex;
    gap: 8px;
    z-index: 100000;
}
.chat-lightbox-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.20);
    background: rgba(20,20,22,0.88);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    border-radius: 999px;
    padding: 10px 12px;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}
.chat-lightbox-btn:hover { background: rgba(40,40,44,0.95); }
.chat-lightbox-close {
    font-size: 22px;
    min-width: 42px;
    padding: 7px 12px 9px;
}
/* Zwingt jedes Riesenbild mathematisch exakt in das Browserfenster */
#chat-lightbox-content img, 
#chat-lightbox-content video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    -webkit-touch-callout: default;
    user-select: auto;
    touch-action: manipulation;
}

/* ==========================================================================
   4. MEDIA QUERIES (UPGRADES FÜR TABLETS & DESKTOPS / PERFEKTES HOCHKANT)
   ========================================================================== */
@media (min-width: 769px) and (min-aspect-ratio: 1/1) {
    #sidebar { width: 320px; display: flex !important; }
    #chat-window { display: flex !important; }
    #back-btn { display: none; }
    #chat-header-bar { padding: 15px 20px; }
    #chatbox { padding: 20px; }
    .msg { max-width: 70%; }
    #chat-input-area { padding: 15px 20px; gap: 12px; }
    #ad-banner { margin: 0 20px 15px 20px; padding: 12px; }
}

/* 11-Zoll-Tablet im Hochformat: links schmale Liste, rechts Chat sofort sichtbar */
@media (min-width: 700px) and (max-aspect-ratio: 1/1) {
    #sidebar {
        width: 260px;
        min-width: 260px;
        max-width: 260px;
        display: flex !important;
    }

    #app-container.chat-active #sidebar {
        display: flex !important;
    }

    #chat-window {
        display: flex !important;
    }

    #back-btn {
        display: none;
    }

    #chat-header-bar {
        padding: 14px 16px;
    }

    #chatbox {
        padding: 18px;
    }

    .msg {
        max-width: 78%;
    }

    #chat-input-area {
        padding: 14px 16px;
        gap: 10px;
    }

    #ad-banner {
        margin: 0 16px 12px 16px;
    }

    .user-item {
        padding: 12px 9px;
    }

    .user-item-main {
        gap: 8px;
    }

    .chatter-avatar {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }
}

@media (min-width: 821px) and (min-aspect-ratio: 1/1) {
    .login-wrapper { grid-template-columns: 1.1fr 0.9fr; }
    .login-hero-side { display: flex; }
    .login-form-side { padding: 40px; }
    #login-screen { padding: 20px; }
}

/* ==========================================================================
   5. BROWSER SPECIFIC CONTRAST FIXES
   ========================================================================== */
select option {
    background-color: #141416 !important;
    color: #ffffff !important;
}
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
select:-webkit-autofill {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #0c0c0e inset !important;
    transition: background-color 5000s ease-in-out 0s;
}
::placeholder {
    color: #666670 !important;
    opacity: 1;
}
/* ==========================================================================
   6. RESPONSIVE FEINSCHLIFF: SICHTBARKEIT & ELEGANZ
   ========================================================================== */
#sidebar {
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
}

#chat-window,
#chat-input-area,
#chat-header-bar,
.user-item,
.user-item > div:first-child {
    min-width: 0;
}

#chatbox {
    width: 100%;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

#message-input {
    min-width: 0;
}

#chat-header {
    min-width: 0;
}

#chat-input-area {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

@media (max-width: 420px) {
    #chat-input-area {
        gap: 7px;
        padding-left: 10px;
        padding-right: 10px;
    }

    #send-btn {
        padding-left: 13px;
        padding-right: 13px;
    }

    .msg {
        max-width: calc(100% - 18px);
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .login-wrapper {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .login-hero-side {
        display: none !important;
    }

    .login-form-side {
        padding: 20px;
    }

    #login-screen {
        align-items: flex-start;
        padding: 14px;
    }
}

/* Tablet-Hochformat: Hinweise auf dem Startscreen sichtbar halten */
@media (min-width: 700px) and (max-aspect-ratio: 1/1) {
    #login-screen {
        padding: 24px;
    }

    .login-wrapper {
        max-width: 680px;
        grid-template-columns: 1fr;
    }

    .login-hero-side {
        display: flex;
        padding: 28px 32px 18px;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
        justify-content: flex-start;
    }

    .brand-title {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .brand-subtitle {
        margin-bottom: 16px;
    }

    .feat-card {
        margin-bottom: 10px;
        padding: 12px 14px;
    }

    .login-form-side {
        padding: 28px 32px 32px;
    }
}

/* Sehr niedrige Tablet-Hochformate: Hinweise kompakter machen statt ausblenden */
@media (min-width: 700px) and (max-aspect-ratio: 1/1) and (max-height: 900px) {
    .login-hero-side {
        padding-top: 22px;
        padding-bottom: 12px;
    }

    .brand-subtitle {
        display: none;
    }

    .feat-card {
        margin-bottom: 8px;
        padding: 10px 12px;
    }

    .feat-icon {
        font-size: 21px;
    }

    .feat-text p {
        font-size: 11px;
        line-height: 1.3;
    }

    .login-form-side {
        padding-top: 22px;
    }
}


@media (max-width: 520px) {
    #block-btn,
    #clear-history-btn { font-size: 0; padding: 6px 8px; min-width: 32px; }
    #block-btn::before,
    #clear-history-btn::before { font-size: 14px; }
}

@media (max-width: 520px) {
    .chat-lightbox-actions {
        left: 10px;
        right: 10px;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    .chat-lightbox-btn {
        font-size: 12px;
        padding: 10px 11px;
    }
}

.preferred-lang-header {
    color: var(--primary);
    background: rgba(0, 230, 118, 0.035);
    border-radius: 6px;
}

.profile-busy-row {
    margin-top: 8px;
}
.busy-toggle-btn {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.10);
    background: linear-gradient(180deg, rgba(0, 230, 118, 0.13), rgba(0, 180, 100, 0.07));
    color: #b9ffe0;
    border-radius: 18px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 14px rgba(0,0,0,0.12);
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.busy-toggle-btn:hover {
    transform: translateY(-1px);
}
.busy-toggle-btn.active {
    background: linear-gradient(180deg, rgba(255, 193, 7, 0.18), rgba(255, 152, 0, 0.08));
    color: #ffe1a0;
    border-color: rgba(255, 193, 7, 0.24);
}


/* v36 Freunde/Erreichbarkeit */
.friend-reachability-row {
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
    margin-top:5px;
    padding-top:5px;
    border-top:1px solid rgba(255,255,255,0.06);
    font-size:12px;
    color:var(--text-muted);
}
.friend-reachability-row select,
.friend-relation-wrap select {
    border:1px solid rgba(255,255,255,0.14);
    border-radius:999px;
    background:rgba(0,0,0,0.22);
    color:var(--text-main);
    padding:4px 8px;
    font-size:12px;
    max-width:135px;
}
.friend-relation-wrap {
    display:inline-flex;
    align-items:center;
    gap:4px;
    font-size:12px;
    color:var(--text-muted);
    margin-right:6px;
    white-space:nowrap;
}

/* v39: einheitliche Freundschaftsfarben im Chatfenster und in der linken Liste */
.user-item.friend-status-friend,
.user-item.friend-status-best,
.user-item.friend-status-unreachable {
    position: relative;
    overflow: hidden;
}
.user-item.friend-status-friend {
    border-color: rgba(77, 214, 136, 0.20);
    background: linear-gradient(90deg, rgba(77, 214, 136, 0.095), rgba(255,255,255,0.018) 42%, rgba(255,255,255,0.02));
}
.user-item.friend-status-best {
    border-color: rgba(255, 196, 71, 0.26);
    background: linear-gradient(90deg, rgba(255, 196, 71, 0.12), rgba(255,255,255,0.018) 42%, rgba(255,255,255,0.02));
}
.user-item.friend-status-unreachable {
    border-color: rgba(255, 93, 93, 0.20);
    background: linear-gradient(90deg, rgba(255, 93, 93, 0.075), rgba(255,255,255,0.015) 42%, rgba(255,255,255,0.02));
}
.user-item.friend-status-friend::before,
.user-item.friend-status-best::before,
.user-item.friend-status-unreachable::before {
    content: '';
    position: absolute;
    inset: 8px auto 8px 0;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: var(--friend-status-color, rgba(255,255,255,0.2));
}
.user-item.friend-status-friend { --friend-status-color: #4dd688; }
.user-item.friend-status-best { --friend-status-color: #ffc447; }
.user-item.friend-status-unreachable { --friend-status-color: #ff6b6b; }
.user-item.friend-status-friend.selected,
.user-item.friend-status-best.selected,
.user-item.friend-status-unreachable.selected {
    box-shadow: inset 0 0 0 1px rgba(0,230,118,0.12), 0 8px 22px rgba(0,0,0,0.18);
}
.friend-user-badges {
    display:flex;
    flex-wrap:wrap;
    gap:5px;
    margin-top:5px;
    max-width: 100%;
}
.friend-badge {
    display:inline-flex;
    align-items:center;
    gap:3px;
    border-radius:999px;
    padding:2px 7px;
    font-size:10px;
    line-height:1.35;
    font-weight:800;
    letter-spacing:.01em;
    border:1px solid rgba(255,255,255,0.08);
    background:rgba(255,255,255,0.08);
    color:var(--text-muted);
    white-space: nowrap;
}
.friend-badge.friend {
    background:rgba(77,214,136,0.14);
    border-color:rgba(77,214,136,0.24);
    color:#aaffcc;
}
.friend-badge.best {
    background:rgba(255,196,71,0.16);
    border-color:rgba(255,196,71,0.28);
    color:#ffdd84;
}
.friend-badge.unreachable {
    background:rgba(255,93,93,0.13);
    border-color:rgba(255,93,93,0.24);
    color:#ffb5b5;
}
@media (max-width: 700px) {
    .user-item.friend-status-friend::before,
    .user-item.friend-status-best::before,
    .user-item.friend-status-unreachable::before {
        top: 7px;
        bottom: 7px;
    }
    .friend-user-badges { gap:4px; margin-top:4px; }
    .friend-badge { font-size:9.5px; padding:1px 6px; }
}
@media (max-width: 700px) {
    .friend-relation-wrap span { display:none; }
    .friend-relation-wrap select { max-width:92px; padding:4px 6px; }
}

/* v38: mobiler Chatkopf wieder lesbar + Freundschaftssteuerung platzsparend */
@media (max-width: 700px) {
    #chat-header-bar {
        min-height: 58px;
        padding: 9px 10px;
        gap: 8px;
        flex-wrap: wrap;
        align-content: center;
    }
    #back-btn {
        order: 1;
        flex: 0 0 auto;
        padding: 4px 7px;
        font-size: 22px;
        line-height: 1;
    }
    #chat-header {
        order: 2;
        flex: 1 1 calc(100% - 48px);
        min-width: 150px;
        font-size: 16px;
        line-height: 1.25;
        font-weight: 800;
    }

    #chat-header.private-chat-secure { gap: 6px; }
    .chat-e2ee-badge { padding: 3px 6px; font-size: 10px; }
    .chat-header-extra { font-size: 12px; }
    #chat-header-actions {
        order: 3;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 1px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    #chat-header-actions::-webkit-scrollbar { display: none; }
    .friend-relation-wrap {
        flex: 0 0 auto;
        margin-right: 0;
        gap: 5px;
        font-size: 12px;
        max-width: 48vw;
    }
    .friend-relation-wrap span {
        display: inline;
        max-width: 68px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .friend-relation-wrap select,
    #block-btn,
    #clear-history-btn {
        min-height: 30px;
        font-size: 12px;
        padding: 5px 8px;
    }
    .friend-relation-wrap select {
        max-width: 118px;
    }
}

@media (max-width: 380px) {
    #chat-header-bar { padding: 8px 8px; gap: 6px; }
    #chat-header { font-size: 15px; }

    .chat-e2ee-badge span:last-child { display: none; }
    .chat-e2ee-badge { width: 24px; height: 24px; justify-content: center; padding: 0; }
    .friend-relation-wrap span { display: none; }
    .friend-relation-wrap select { max-width: 104px; }
    #block-btn,
    #clear-history-btn { padding-left: 7px; padding-right: 7px; }
}

@media (min-width: 701px) {
    #chat-header-actions { min-width: max-content; }
}


/* Safe manual update notice */
.set4chat-update-notice {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 10050;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(92vw, 620px);
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(18, 22, 33, 0.94);
    color: #fff;
    box-shadow: 0 14px 38px rgba(0,0,0,.32);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(12px);
    font-size: 14px;
}
.set4chat-update-text { line-height: 1.25; }
.set4chat-update-btn,
.set4chat-update-later {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.set4chat-update-btn {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff;
}
.set4chat-update-later {
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.88);
}
@media (max-width: 520px) {
    .set4chat-update-notice {
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        transform: none;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
        font-size: 13px;
        border-radius: 16px;
    }
    .set4chat-update-btn { grid-column: 1 / 2; }
    .set4chat-update-later { grid-column: 2 / 3; }
}

/* Sterne-Wallet */
.stars-wallet{
  margin-top:10px;
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:linear-gradient(135deg, rgba(255,205,80,.16), rgba(255,255,255,.05));
  box-shadow:0 8px 24px rgba(0,0,0,.16);
}
.stars-wallet-main{display:flex;align-items:center;gap:8px;font-weight:800;letter-spacing:.01em;color:var(--text-main,#fff)}
.stars-wallet-icon{filter:drop-shadow(0 2px 5px rgba(0,0,0,.35))}
.stars-wallet-balance{font-size:14px;line-height:1.15}
.stars-wallet-sub{margin-top:3px;font-size:10px;line-height:1.35;color:var(--text-muted,#aeb6c4)}
.stars-gift-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:31px;
  padding:6px 11px;
  border:1px solid rgba(255,211,106,.40);
  border-radius:999px;
  background:linear-gradient(135deg,rgba(255,211,106,.18),rgba(168,85,247,.13));
  color:#fff1ba;
  font-size:12px;
  font-weight:900;
  line-height:1;
  letter-spacing:.01em;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.12);
  transition:background .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease;
}
.stars-gift-btn:hover{
  background:linear-gradient(135deg,rgba(255,211,106,.25),rgba(168,85,247,.19));
  border-color:rgba(255,226,154,.62);
  transform:translateY(-1px);
  box-shadow:0 9px 24px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.14);
}
.stars-gift-btn:active{transform:translateY(0) scale(.98)}
.stars-gift-btn:disabled{opacity:.45;cursor:not-allowed;transform:none;box-shadow:none}
.stars-gift-btn[hidden]{display:none}
.stars-gift-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.10);
  font-size:13px;
  flex:0 0 auto;
}
.stars-gift-label{overflow:hidden;text-overflow:ellipsis}

.stars-wallet-buttons{display:grid;grid-template-columns:1fr;gap:6px;margin-top:7px}
.stars-redeem-btn{border:1px solid rgba(255,211,106,.45);background:rgba(255,211,106,.12);color:#ffe29a;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:900;cursor:pointer;width:100%;}
.stars-buy-info-btn{margin-left:auto;flex:0 0 auto;width:24px;height:24px;border-radius:999px;border:1px solid rgba(255,211,106,.52);background:linear-gradient(135deg,rgba(255,211,106,.28),rgba(255,255,255,.08));color:#fff1ba;font-size:14px;font-weight:900;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.16);}
.stars-redeem-btn:hover,.stars-buy-info-btn:hover{background:rgba(255,211,106,.2);}

@media (max-width: 620px){
  .stars-wallet{margin-top:8px;padding:8px 9px;border-radius:12px}
  .stars-wallet-balance{font-size:13px}
  .stars-buy-info-btn{width:22px;height:22px;font-size:13px}
  .stars-wallet-sub{font-size:9px}
  #chat-header-actions .stars-gift-btn{font-size:11px;padding:6px 8px;gap:5px;max-width:52vw}
  #chat-header-actions .stars-gift-icon{width:17px;height:17px;font-size:12px}
  #chat-header-actions .stars-gift-label{max-width:34vw}
}


/* Sterne-Geschenk im Chat */
.stars-chat-card{
  border:1px solid rgba(255,211,106,.38);
  border-radius:16px;
  padding:10px 12px;
  background:linear-gradient(135deg,rgba(255,211,106,.16),rgba(168,85,247,.10));
  box-shadow:0 8px 24px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.08);
  color:var(--text-main,#fff);
  max-width:min(360px,100%);
}
.stars-chat-card-title{
  font-size:12px;
  font-weight:900;
  letter-spacing:.03em;
  color:#ffe29a;
  margin-bottom:4px;
  text-transform:uppercase;
}
.stars-chat-card-main{
  font-size:14px;
  font-weight:800;
  line-height:1.35;
}
@media (max-width:620px){
  .stars-chat-card{border-radius:14px;padding:9px 10px}
  .stars-chat-card-main{font-size:13px}
}


/* v60: lesbare Dropdowns auf der Start-/Anmeldeseite */
#login-screen select,
#login-screen .form-group select,
#input-language,
#gender,
#interest {
  min-height: 42px;
  width: 100%;
  padding: 9px 38px 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background-color: rgba(12,16,28,.96);
  color: var(--text-main, #ffffff);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  appearance: auto;
  -webkit-appearance: menulist;
}
#login-screen select:focus,
#input-language:focus,
#gender:focus,
#interest:focus {
  outline: none;
  border-color: var(--primary, #00e676);
  box-shadow: 0 0 0 3px rgba(0,230,118,.14);
}
#login-screen select option,
#input-language option,
#gender option,
#interest option {
  color: #111111;
  background: #ffffff;
  font-weight: 700;
}
@media (max-width: 620px) {
  #login-screen select,
  #input-language,
  #gender,
  #interest {
    min-height: 46px;
    font-size: 16px;
  }
}


/* v61: Additiver Profil-Drawer ohne Änderung an Login-/Profil-Logik */
.profile-card.profile-drawer-enhanced{
  padding: 10px 11px;
  border-radius: 16px;
}
.profile-card.profile-drawer-enhanced > #lng-profile-label{
  display:none !important;
}
.profile-drawer-shell{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.profile-drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.profile-drawer-head-main{
  min-width:0;
  flex:1 1 auto;
}
.profile-drawer-head-main .profile-nick-row{
  margin:0;
  min-width:0;
}
.profile-drawer-head-main .profile-avatar{
  width:32px;
  height:32px;
  flex-basis:32px;
}
.profile-drawer-head-main .profile-nick-text{
  font-size:15px;
  max-width:150px;
  display:inline-block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.profile-drawer-head-actions{
  display:flex;
  align-items:center;
  gap:7px;
  flex:0 0 auto;
}
.profile-drawer-star-pill,
.profile-drawer-toggle{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.055);
  color:var(--text-main,#fff);
  border-radius:999px;
  min-height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 5px 14px rgba(0,0,0,.13);
}
.profile-drawer-star-pill{
  gap:5px;
  padding:5px 9px;
  border-color:rgba(255,211,106,.36);
  background:linear-gradient(135deg,rgba(255,211,106,.16),rgba(255,255,255,.055));
  color:#ffe29a;
  font-size:11px;
  font-weight:900;
  max-width:92px;
}
.profile-drawer-star-pill span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.profile-drawer-toggle{
  width:30px;
  padding:0;
  font-size:14px;
  font-weight:900;
}
.profile-drawer-body{
  border-top:1px solid rgba(255,255,255,.075);
  padding-top:8px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.profile-drawer-body[hidden]{display:none !important;}
.profile-drawer-body > div[style*="font-size:12px"]{
  margin:0 !important;
  padding:7px 9px !important;
  border:1px solid rgba(255,255,255,.07) !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.03) !important;
}
.profile-drawer-body .profile-busy-row{margin-top:0;}
.profile-drawer-body .busy-toggle-btn{width:100%;justify-content:center;}
.profile-drawer-body .profile-language-select{max-width:100%;}
.profile-drawer-body #friend-reachability-row{
  margin:0;
  padding:8px 9px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:12px;
  background:rgba(255,255,255,.03);
}
.profile-card.profile-drawer-enhanced #stars-wallet{
  margin-top:0;
  padding:9px 10px;
  border-radius:13px;
}
.profile-card.profile-drawer-enhanced #stars-wallet .stars-wallet-sub{
  font-size:9.5px;
}
@media (min-width: 900px){
  .profile-card.profile-drawer-enhanced{margin:12px 14px 7px 14px;}
}
@media (max-width: 620px){
  .profile-card.profile-drawer-enhanced{margin:9px 10px 5px 10px;padding:9px 10px;}
  .profile-drawer-head-main .profile-avatar{width:30px;height:30px;flex-basis:30px;}
  .profile-drawer-head-main .profile-nick-text{font-size:14px;max-width:38vw;}
  .profile-drawer-star-pill{max-width:74px;padding:5px 8px;font-size:10.5px;}
  .profile-drawer-toggle{width:29px;min-height:29px;}
}


/* v62: Mobile Chatkopf - Aktionen bleiben sichtbar neben Geschenk-Button */
@media (max-width: 700px) {
  #chat-header-actions {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: visible;
    padding-bottom: 0;
  }
  #chat-header-actions .stars-gift-btn,
  #chat-header-actions #clear-history-btn,
  #chat-header-actions #block-btn {
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
  }
  #chat-header-actions .stars-gift-btn {
    gap: 0;
  }
  #chat-header-actions .stars-gift-label {
    display: none !important;
  }
  #chat-header-actions .stars-gift-icon {
    width: 20px;
    height: 20px;
    font-size: 13px;
    background: transparent;
    box-shadow: none;
  }
  #chat-header-actions #clear-history-btn,
  #chat-header-actions #block-btn {
    font-size: 0;
    gap: 0;
  }
  #chat-header-actions #clear-history-btn::before,
  #chat-header-actions #block-btn::before {
    font-size: 14px;
  }
  #chat-header-actions .friend-relation-wrap {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }
  #chat-header-actions .friend-relation-wrap select {
    width: 100%;
    max-width: 132px;
    min-width: 74px;
  }
}

@media (max-width: 380px) {
  #chat-header-actions {
    gap: 4px;
  }
  #chat-header-actions .stars-gift-btn,
  #chat-header-actions #clear-history-btn,
  #chat-header-actions #block-btn {
    flex-basis: 30px;
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
  }
  #chat-header-actions .friend-relation-wrap select {
    max-width: 118px;
    min-width: 68px;
  }
}

/* v63: Silber-/Gold-Sterne */
.stars-wallet-split{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin-top:8px;
}
.stars-wallet-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
  padding:7px 8px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.035);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}
.stars-wallet-row-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  font-weight:900;
}
.stars-wallet-row strong{
  font-size:13px;
  font-weight:950;
  line-height:1;
  white-space:nowrap;
}
.stars-wallet-row-silver{
  border-color:rgba(214,225,236,.28);
  background:linear-gradient(135deg,rgba(210,225,235,.13),rgba(255,255,255,.035));
  color:#e5edf4;
}
.stars-wallet-row-gold{
  border-color:rgba(255,211,106,.38);
  background:linear-gradient(135deg,rgba(255,211,106,.18),rgba(255,255,255,.045));
  color:#ffe29a;
}
.stars-wallet-row-silver strong{color:#f1f6fb;text-shadow:0 1px 6px rgba(214,225,236,.25);}
.stars-wallet-row-gold strong{color:#ffe08a;text-shadow:0 1px 8px rgba(255,211,106,.30);}
.stars-wallet-balance{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media (max-width: 620px){
  .stars-wallet-split{gap:6px;margin-top:7px;}
  .stars-wallet-row{padding:6px 7px;border-radius:11px;}
  .stars-wallet-row-label{font-size:10px;}
  .stars-wallet-row strong{font-size:12px;}
}


/* Silber/Gold Geschenk-Auswahl */
.stars-gift-choice-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.58);backdrop-filter:blur(8px);padding:18px}
.stars-gift-choice-dialog{width:min(360px,100%);border-radius:18px;border:1px solid rgba(255,255,255,.14);background:linear-gradient(145deg,rgba(20,24,34,.98),rgba(10,13,20,.98));box-shadow:0 24px 70px rgba(0,0,0,.45);padding:16px;color:var(--text-main,#fff)}
.stars-gift-choice-title{font-size:16px;font-weight:900;margin-bottom:5px}
.stars-gift-choice-hint{font-size:12px;line-height:1.45;color:var(--text-muted,#aeb6c4);margin-bottom:12px}
.stars-gift-choice-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
.stars-gift-choice-btn{border-radius:14px;border:1px solid rgba(255,255,255,.14);padding:11px 10px;display:flex;flex-direction:column;gap:5px;align-items:flex-start;color:#fff;cursor:pointer;background:rgba(255,255,255,.05);font-weight:900}
.stars-gift-choice-btn span{font-size:11px;color:var(--text-muted,#aeb6c4);font-weight:700}
.stars-gift-choice-btn.silver{background:linear-gradient(135deg,rgba(210,220,235,.16),rgba(255,255,255,.05));border-color:rgba(220,230,245,.34)}
.stars-gift-choice-btn.gold{background:linear-gradient(135deg,rgba(255,211,106,.18),rgba(255,255,255,.05));border-color:rgba(255,211,106,.44);color:#ffe8a6}
.stars-gift-choice-cancel{width:100%;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:var(--text-muted,#aeb6c4);padding:8px 10px;font-weight:800;cursor:pointer}
.stars-chat-card-silver{border-color:rgba(220,230,245,.35);background:linear-gradient(135deg,rgba(210,220,235,.10),rgba(255,255,255,.03))}
.stars-chat-card-gold{border-color:rgba(255,211,106,.42);background:linear-gradient(135deg,rgba(255,211,106,.13),rgba(255,255,255,.03))}
@media (max-width:420px){.stars-gift-choice-actions{grid-template-columns:1fr}.stars-gift-choice-dialog{padding:14px;border-radius:16px}}


/* Pay-to-DM / Kontaktwunsch mit Gold */
.pay-to-dm-notice{
  border:1px solid rgba(255,211,106,.28);
  background:linear-gradient(135deg,rgba(255,211,106,.12),rgba(255,255,255,.035));
  color:var(--text-main,#fff);
  border-radius:13px;
  padding:10px 12px;
  line-height:1.35;
}
.pay-to-dm-notice strong{color:#ffe29a}
.pay-to-dm-confirmed{border-color:rgba(255,211,106,.26);color:#ffe29a}
.pay-to-dm-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  margin:0 0 6px 0;
  padding:4px 8px;
  border:1px solid rgba(255,211,106,.35);
  border-radius:999px;
  background:rgba(255,211,106,.12);
  color:#ffe29a;
  font-size:10px;
  font-weight:900;
  letter-spacing:.02em;
}
@media (max-width:620px){
  .pay-to-dm-notice{font-size:12px;padding:9px 10px}
  .pay-to-dm-badge{font-size:9.5px;padding:3px 7px}
}


/* Paid image offers */
.paid-image-card {
    margin-top: 6px;
    border: 1px solid rgba(255, 215, 64, 0.35);
    background: rgba(255, 215, 64, 0.08);
    border-radius: 12px;
    padding: 10px;
    max-width: min(280px, 100%);
}
.paid-image-title { font-weight: 800; font-size: 13px; margin-bottom: 8px; color: var(--text-primary); }
.paid-image-preview-wrap { position: relative; overflow: hidden; border-radius: 10px; background: rgba(0,0,0,.18); }
.paid-image-preview { display: block; width: 100%; max-height: 220px; object-fit: cover; filter: blur(2px); transform: scale(1.02); }
.paid-image-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.8); background: rgba(0,0,0,.10); }
.paid-image-info { margin-top: 8px; font-weight: 800; font-size: 13px; }
.paid-image-hint { margin-top: 4px; font-size: 11px; color: var(--text-muted); line-height: 1.35; }
.paid-image-buy-btn { margin-top: 9px; width: 100%; border: 0; border-radius: 999px; padding: 9px 12px; cursor: pointer; font-weight: 800; background: linear-gradient(135deg,#ffd54a,#ff9f1a); color: #2d1600; box-shadow: 0 6px 18px rgba(255,170,0,.22); }
.paid-image-buy-btn:disabled { cursor: default; opacity: .72; background: rgba(255,255,255,.14); color: var(--text-muted); box-shadow: none; }
.paid-image-sent { margin-top: 8px; font-size: 12px; color: var(--text-muted); font-weight: 700; }

/* v82: Partnerstatus „nicht erwünscht" */
.user-item.friend-status-unwanted {
    border-color: rgba(255, 82, 82, 0.45);
    background: linear-gradient(135deg, rgba(255,82,82,.10), rgba(255,255,255,.04));
}
.user-item.friend-status-unwanted::before {
    background: #ff6b6b;
}
.friend-badge.unwanted {
    background: rgba(255,82,82,.18);
    color: #ffb6b6;
    border-color: rgba(255,82,82,.32);
}

/* v92: Premium-Einstellungen im normalen Chat */
.premium-profile-tools {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.premium-tools-title {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 800;
    margin-bottom: 7px;
}
.premium-tools-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.premium-tools-actions button,
.premium-showcase-mini button {
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: var(--text-main);
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}
.premium-tools-actions button:hover,
.premium-showcase-mini button:hover {
    border-color: var(--primary);
    background: rgba(0,230,118,0.10);
}
.premium-showcase-mini-list {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}
.premium-showcase-mini {
    position: relative;
    min-width: 0;
    border-radius: 9px;
    overflow: hidden;
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.08);
}
.premium-showcase-mini img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.premium-showcase-mini span {
    position: absolute;
    left: 3px;
    bottom: 3px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(0,0,0,0.68);
    color: #ffd36a;
    font-size: 9px;
    font-weight: 900;
}
.premium-showcase-mini button {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    padding: 0;
    background: rgba(120,0,0,0.72);
    color: #fff;
}
#chat-window.has-partner-premium-color #chat-header-bar {
    border-bottom-color: color-mix(in srgb, var(--partner-chat-color) 55%, var(--border-color));
    box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--partner-chat-color) 35%, transparent);
}
#chat-window.has-partner-premium-color .private-chat-secure .chat-header-name,
#chat-window.has-partner-premium-color .msg.partner .msg-meta-name {
    color: var(--partner-chat-color) !important;
}
#chat-window.has-partner-premium-color .msg.partner .bubble,
#chat-window.has-partner-premium-color .msg:not(.me) .bubble {
    border-color: color-mix(in srgb, var(--partner-chat-color) 28%, var(--border-color));
}
.premium-partner-showcase {
    margin: 10px 0;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,211,106,0.24);
    background: linear-gradient(135deg, rgba(255,211,106,0.10), rgba(255,255,255,0.035));
}
.premium-partner-showcase-title {
    font-weight: 900;
    color: #ffd36a;
    margin-bottom: 3px;
}
.premium-partner-showcase-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 9px;
}
.premium-partner-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 8px;
}
.premium-showcase-card {
    position: relative;
    min-height: 112px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: #111;
    cursor: pointer;
    padding: 0;
}
.premium-showcase-card img {
    width: 100%;
    height: 100%;
    min-height: 112px;
    object-fit: cover;
    display: block;
}
.premium-showcase-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.78));
}
.premium-showcase-lock {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(0,0,0,0.58);
    backdrop-filter: blur(8px);
}
.premium-showcase-card strong {
    position: absolute;
    left: 7px;
    bottom: 7px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.64);
    color: #ffd36a;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
@supports not (color: color-mix(in srgb, red 50%, blue)) {
    #chat-window.has-partner-premium-color #chat-header-bar { border-bottom-color: var(--partner-chat-color); }
    #chat-window.has-partner-premium-color .msg:not(.me) .bubble { border-color: var(--partner-chat-color); }
}
@media (max-width: 640px) {
    .premium-tools-actions button { flex: 1 1 calc(50% - 6px); }
    .premium-partner-showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v93: Verkaufsbilder oben im Chat + Chat-Hintergrunddesigns */
.premium-partner-showcase-bar{
    display:none;
    border-bottom:1px solid rgba(255,211,106,0.16);
    background:linear-gradient(135deg, rgba(255,211,106,0.10), rgba(255,255,255,0.035));
    padding:9px 10px 10px;
    gap:8px;
}
.premium-partner-showcase-bar.is-visible{
    display:grid;
    grid-template-columns:minmax(130px, .85fr) minmax(0, 1.6fr);
    align-items:center;
}
.premium-showcase-top-head{
    min-width:0;
    display:grid;
    gap:2px;
}
.premium-showcase-top-head strong{
    color:#ffd36a;
    font-size:12px;
    line-height:1.15;
}
.premium-showcase-top-head span{
    color:var(--text-muted);
    font-size:10px;
    line-height:1.2;
}
.premium-showcase-top-rail{
    display:flex;
    gap:7px;
    overflow-x:auto;
    overflow-y:hidden;
    padding-bottom:2px;
    scrollbar-width:thin;
}
.premium-showcase-top-card{
    position:relative;
    flex:0 0 68px;
    height:72px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,0.12);
    border-radius:13px;
    background:#111;
    padding:0;
    cursor:pointer;
    box-shadow:0 8px 18px rgba(0,0,0,0.22);
}
.premium-showcase-top-card img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}
.premium-showcase-top-card::after{
    content:"";
    position:absolute;
    inset:auto 0 0 0;
    height:52%;
    background:linear-gradient(180deg, transparent, rgba(0,0,0,0.82));
}
.premium-showcase-top-card .premium-showcase-lock{
    top:5px;
    right:5px;
    width:22px;
    height:22px;
    font-size:11px;
}
.premium-showcase-top-card strong{
    position:absolute;
    left:5px;
    bottom:5px;
    z-index:2;
    padding:3px 6px;
    border-radius:999px;
    color:#ffd36a;
    background:rgba(0,0,0,0.68);
    font-size:10px;
    line-height:1;
}

#chat-window[data-chat-theme="default"] #chatbox{background:var(--bg-main);}
#chat-window[data-chat-theme="velvet"] #chatbox{background:radial-gradient(circle at 15% 0%,rgba(255,211,106,.16),transparent 34%),radial-gradient(circle at 100% 24%,rgba(168,85,247,.16),transparent 32%),linear-gradient(160deg,#140a16,#08070b 64%,#050406);}
#chat-window[data-chat-theme="neon"] #chatbox{background:radial-gradient(circle at 12% 18%,rgba(0,230,255,.18),transparent 30%),radial-gradient(circle at 92% 12%,rgba(255,82,163,.16),transparent 28%),linear-gradient(160deg,#050710,#090314 68%,#020204);}
#chat-window[data-chat-theme="ocean"] #chatbox{background:radial-gradient(circle at 18% 0%,rgba(74,222,255,.15),transparent 32%),radial-gradient(circle at 85% 75%,rgba(37,99,235,.18),transparent 36%),linear-gradient(160deg,#031b2a,#06101f 62%,#03070d);}
#chat-window[data-chat-theme="rose"] #chatbox{background:radial-gradient(circle at 15% 10%,rgba(251,113,133,.16),transparent 32%),radial-gradient(circle at 90% 70%,rgba(236,72,153,.14),transparent 34%),linear-gradient(160deg,#1d0710,#100713 62%,#050306);}
#chat-window[data-chat-theme="forest"] #chatbox{background:radial-gradient(circle at 20% 0%,rgba(52,211,153,.14),transparent 32%),radial-gradient(circle at 90% 80%,rgba(132,204,22,.12),transparent 34%),linear-gradient(160deg,#04180f,#07110b 64%,#030503);}
#chat-window[data-chat-theme="galaxy"] #chatbox{background:radial-gradient(circle at 12% 12%,rgba(129,140,248,.20),transparent 26%),radial-gradient(circle at 88% 20%,rgba(217,70,239,.14),transparent 28%),radial-gradient(circle at 50% 92%,rgba(56,189,248,.10),transparent 34%),linear-gradient(160deg,#080818,#05030d 64%,#010104);}
#chat-window[data-chat-theme="sunset"] #chatbox{background:radial-gradient(circle at 20% 0%,rgba(251,146,60,.17),transparent 32%),radial-gradient(circle at 90% 70%,rgba(244,63,94,.13),transparent 34%),linear-gradient(160deg,#1f0d07,#12070b 62%,#050302);}
#chat-window[data-chat-theme] #chatbox{
    background-attachment:local;
}
#chat-window[data-chat-theme] .msg .bubble{
    backdrop-filter:blur(2px);
}
@media (max-width: 640px){
    .premium-partner-showcase-bar.is-visible{
        grid-template-columns:1fr;
        gap:7px;
    }
    .premium-showcase-top-head span{display:none;}
    .premium-showcase-top-card{
        flex-basis:64px;
        height:68px;
    }
}

/* v94: Chatdesign-Vorschau + benannte Schriftfarben */
#chat-window[data-chat-preview-theme="default"] #chatbox,
.premium-design-preview[data-chat-preview-theme="default"]{
    background:var(--bg-main);
}
#chat-window[data-chat-preview-theme="velvet"] #chatbox,
.premium-design-preview[data-chat-preview-theme="velvet"]{
    background:radial-gradient(circle at 15% 0%,rgba(255,211,106,.22),transparent 34%),radial-gradient(circle at 100% 24%,rgba(168,85,247,.18),transparent 32%),linear-gradient(160deg,#140a16,#08070b 64%,#050406);
}
#chat-window[data-chat-preview-theme="neon"] #chatbox,
.premium-design-preview[data-chat-preview-theme="neon"]{
    background:radial-gradient(circle at 12% 18%,rgba(0,230,255,.22),transparent 30%),radial-gradient(circle at 92% 12%,rgba(255,82,163,.20),transparent 28%),linear-gradient(160deg,#050710,#090314 68%,#020204);
}
#chat-window[data-chat-preview-theme="ocean"] #chatbox,
.premium-design-preview[data-chat-preview-theme="ocean"]{
    background:radial-gradient(circle at 18% 0%,rgba(74,222,255,.20),transparent 32%),radial-gradient(circle at 85% 75%,rgba(37,99,235,.22),transparent 36%),linear-gradient(160deg,#031b2a,#06101f 62%,#03070d);
}
#chat-window[data-chat-preview-theme="rose"] #chatbox,
.premium-design-preview[data-chat-preview-theme="rose"]{
    background:radial-gradient(circle at 15% 10%,rgba(251,113,133,.22),transparent 32%),radial-gradient(circle at 90% 70%,rgba(236,72,153,.18),transparent 34%),linear-gradient(160deg,#1d0710,#100713 62%,#050306);
}
#chat-window[data-chat-preview-theme="forest"] #chatbox,
.premium-design-preview[data-chat-preview-theme="forest"]{
    background:radial-gradient(circle at 20% 0%,rgba(52,211,153,.19),transparent 32%),radial-gradient(circle at 90% 80%,rgba(132,204,22,.16),transparent 34%),linear-gradient(160deg,#04180f,#07110b 64%,#030503);
}
#chat-window[data-chat-preview-theme="galaxy"] #chatbox,
.premium-design-preview[data-chat-preview-theme="galaxy"]{
    background:radial-gradient(circle at 12% 12%,rgba(129,140,248,.24),transparent 26%),radial-gradient(circle at 88% 20%,rgba(217,70,239,.18),transparent 28%),radial-gradient(circle at 50% 92%,rgba(56,189,248,.14),transparent 34%),linear-gradient(160deg,#080818,#05030d 64%,#010104);
}
#chat-window[data-chat-preview-theme="sunset"] #chatbox,
.premium-design-preview[data-chat-preview-theme="sunset"]{
    background:radial-gradient(circle at 20% 0%,rgba(251,146,60,.22),transparent 32%),radial-gradient(circle at 90% 70%,rgba(244,63,94,.18),transparent 34%),linear-gradient(160deg,#1f0d07,#12070b 62%,#050302);
}
#chat-window[data-chat-text-color="custom"] .msg.partner,
#chat-window[data-chat-text-color="custom"] .msg:not(.me){
    color:var(--partner-chat-text-color) !important;
    border-color:rgba(255,255,255,.22);
}
#chat-window[data-chat-preview-theme] .msg.partner,
#chat-window[data-chat-preview-theme] .msg:not(.me){
    color:var(--preview-chat-text-color, var(--text-main)) !important;
    border-color:rgba(255,255,255,.22);
}
#chat-window[data-chat-theme] #chatbox,
#chat-window[data-chat-preview-theme] #chatbox{
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.025), inset 0 44px 90px rgba(255,255,255,.015);
}

.premium-design-modal-backdrop{
    position:fixed;
    inset:0;
    z-index:99999;
    display:grid;
    place-items:center;
    padding:18px;
    background:rgba(0,0,0,.72);
    backdrop-filter:blur(8px);
}
.premium-design-modal{
    width:min(720px, 100%);
    max-height:min(90dvh, 860px);
    overflow:auto;
    position:relative;
    padding:18px;
    border-radius:24px;
    border:1px solid rgba(255,211,106,.22);
    background:linear-gradient(160deg,rgba(24,19,28,.98),rgba(8,8,12,.98));
    color:#f8f3e8;
    box-shadow:0 30px 90px rgba(0,0,0,.62);
}
.premium-design-modal h2{margin:0 36px 5px 0;font-size:22px;line-height:1.15;}
.premium-design-modal h3{margin:15px 0 9px;font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:#ffd36a;}
.premium-design-sub{margin:0 0 13px;color:rgba(248,243,232,.72);font-size:13px;line-height:1.35;}
.premium-design-close{
    position:absolute;
    top:12px;
    right:12px;
    width:34px;
    height:34px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.16);
    color:#fff;
    background:rgba(255,255,255,.08);
    font-size:22px;
    line-height:1;
    cursor:pointer;
}
.premium-design-preview{
    min-height:176px;
    padding:14px;
    border-radius:20px;
    border:1px solid rgba(255,255,255,.12);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    gap:10px;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.04);
}
.premium-preview-header{font-size:12px;font-weight:900;color:#ffd36a;text-transform:uppercase;letter-spacing:.08em;}
.premium-preview-msg{max-width:78%;padding:10px 12px;border-radius:16px;font-size:13px;line-height:1.35;box-shadow:0 8px 24px rgba(0,0,0,.25);}
.premium-preview-msg.partner{align-self:flex-start;color:var(--preview-chat-text-color,#f2f4ff);background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.16);}
.premium-preview-msg.me{align-self:flex-end;color:#101014;background:linear-gradient(180deg,#fff1aa,#ffd36a);}
.premium-theme-grid,.premium-textcolor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.premium-theme-choice,.premium-textcolor-choice{
    min-height:44px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:15px;
    color:#f8f3e8;
    background:rgba(255,255,255,.06);
    display:flex;
    align-items:center;
    gap:9px;
    padding:9px 10px;
    cursor:pointer;
    text-align:left;
}
.premium-theme-choice span{font-size:20px;line-height:1;}
.premium-theme-choice strong,.premium-textcolor-choice strong{font-size:13px;line-height:1.15;}
.premium-theme-choice.is-selected,.premium-textcolor-choice.is-selected{
    border-color:rgba(255,211,106,.78);
    background:rgba(255,211,106,.14);
    box-shadow:0 0 0 2px rgba(255,211,106,.12);
}
.premium-textcolor-choice span{
    width:20px;
    height:20px;
    border-radius:999px;
    background:var(--swatch);
    border:1px solid rgba(255,255,255,.35);
    box-shadow:0 0 0 3px rgba(0,0,0,.18);
    flex:0 0 auto;
}
.premium-design-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px;}
.premium-design-actions button{min-height:40px;border-radius:999px;padding:0 15px;font-weight:900;cursor:pointer;}
.premium-design-cancel{color:#f8f3e8;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);}
.premium-design-save{color:#16100a;background:linear-gradient(180deg,#fff1aa,#d99a32);border:0;}
@media (max-width:560px){
    .premium-design-modal{padding:14px;border-radius:18px;}
    .premium-theme-grid,.premium-textcolor-grid{grid-template-columns:1fr;}
    .premium-design-actions{flex-direction:column-reverse;}
    .premium-design-actions button{width:100%;}
}

/* v95 profile avatar visibility in chat list/header + preview before purchase */
.chat-header-avatar{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  flex:0 0 34px!important;
  border-radius:50%!important;
  object-fit:cover!important;
  border:2px solid var(--avatar-accent, var(--primary));
  box-shadow:0 0 0 2px rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.28);
  margin-right:2px;
}
#chat-header.private-chat-secure .chat-header-avatar + .chat-header-name{
  min-width:0;
}
.premium-avatar-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:100000;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(0,0,0,.74);
  backdrop-filter:blur(8px);
}
.premium-avatar-modal{
  width:min(680px,100%);
  max-height:min(90dvh,820px);
  overflow:auto;
  position:relative;
  padding:18px;
  border-radius:24px;
  border:1px solid rgba(255,211,106,.24);
  background:linear-gradient(160deg,rgba(24,19,28,.98),rgba(8,8,12,.98));
  color:#f8f3e8;
  box-shadow:0 30px 90px rgba(0,0,0,.62);
}
.premium-avatar-modal h2{margin:0 36px 6px 0;font-size:22px;line-height:1.15;}
.premium-avatar-close{
  position:absolute;
  top:12px;
  right:12px;
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  color:#fff;
  background:rgba(255,255,255,.08);
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.premium-avatar-preview-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:14px 0;
}
.premium-avatar-preview-card{
  display:grid;
  gap:8px;
  padding:12px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.055);
}
.premium-avatar-preview-label{
  color:#ffd36a;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.premium-avatar-sidebar-preview{
  min-height:58px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
}
.premium-avatar-header-preview{
  min-height:58px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.28);
  overflow:hidden;
}
.premium-avatar-header-preview .chat-header-name{
  color:#fff;
  font-weight:900;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media (max-width:640px){
  .premium-avatar-preview-grid{grid-template-columns:1fr;}
  .chat-header-avatar{width:30px!important;height:30px!important;min-width:30px!important;flex-basis:30px!important;}
}


/* v96: Showcase-Angebote bei nicht erreichbaren Chatpartnern sichtbarer */
.premium-partner-showcase-bar.is-visible{
    position:relative;
    z-index:3;
    box-shadow:0 10px 26px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06);
}
.premium-showcase-top-card:focus-visible{
    outline:2px solid #ffd36a;
    outline-offset:2px;
}
.premium-showcase-top-card:hover{
    transform:translateY(-1px);
    border-color:rgba(255,211,106,.45);
}

/* v98: Chatter sidebar filters */
.chatter-filters {
  margin: 8px 10px 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(10, 13, 18, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 8px 22px rgba(0,0,0,.18);
}

.chatter-filter-title {
  margin-bottom: 8px;
  color: var(--text-muted, rgba(255,255,255,.68));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.chatter-filter-search,
.chatter-filter-category {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: var(--text, #fff);
  background: rgba(0,0,0,.28);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.chatter-filter-search {
  padding: 0 12px;
}

.chatter-filter-search:focus,
.chatter-filter-category:focus {
  border-color: rgba(0, 230, 118, .55);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, .12);
}

.chatter-filter-genders {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0;
}

.chatter-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  color: var(--text, #fff);
  background: rgba(255,255,255,.045);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.chatter-filter-check input {
  width: 13px;
  height: 13px;
  accent-color: #00e676;
}

.chatter-filter-category-wrap {
  display: grid;
  gap: 5px;
  color: var(--text-muted, rgba(255,255,255,.68));
  font-size: 11px;
  font-weight: 800;
}

.chatter-filter-category {
  padding: 0 11px;
}

@media (max-width: 760px) {
  .chatter-filters {
    margin-inline: 8px;
    padding: 9px;
  }
  .chatter-filter-genders {
    gap: 5px;
  }
  .chatter-filter-check {
    padding-inline: 8px;
  }
}

/* v99: Suche module reachability/friend filters */
.chatter-filter-select-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 7px;
}

.chatter-filter-select-wrap {
  display: grid;
  gap: 5px;
  color: var(--text-muted, rgba(255,255,255,.68));
  font-size: 11px;
  font-weight: 800;
}

.chatter-filter-select {
  width: 100%;
  min-width: 0;
}

@media (max-width: 420px) {
  .chatter-filter-select-row {
    grid-template-columns: 1fr;
  }
}

/* v100: collapsible chatter search/filter box */
.chatter-filter-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.chatter-filter-head-text{
  min-width:0;
  display:grid;
  gap:2px;
}

.chatter-filter-head .chatter-filter-title{
  margin:0;
}

.chatter-filter-summary{
  color:var(--text-muted, rgba(255,255,255,.58));
  font-size:11px;
  font-weight:700;
  line-height:1.2;
}

.chatter-filter-toggle{
  flex:0 0 auto;
  min-height:30px;
  padding:0 10px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  color:var(--text, #fff);
  background:rgba(255,255,255,.07);
  font:inherit;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.chatter-filter-toggle:hover{
  border-color:rgba(0,230,118,.45);
  background:rgba(0,230,118,.10);
}

.chatter-filter-body{
  display:grid;
  gap:8px;
  margin-top:9px;
}

.chatter-filters.is-collapsed{
  padding-block:9px;
}

.chatter-filters.is-collapsed .chatter-filter-body{
  display:none;
}

/* v114: lokale Datensicherung für Identität, Schlüssel und Chatverläufe */
.profile-backup-row{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:7px;
  padding-top:7px;
  border-top:1px solid rgba(255,255,255,.07);
}
.profile-backup-btn{
  appearance:none;
  border:1px solid rgba(244,201,93,.34);
  border-radius:999px;
  background:rgba(244,201,93,.12);
  color:#ffe69a;
  padding:6px 9px;
  font-size:11px;
  font-weight:850;
  cursor:pointer;
  line-height:1.1;
}
.profile-backup-btn:hover{background:rgba(244,201,93,.2)}
.profile-restore-btn{
  border-color:rgba(86,211,143,.34);
  background:rgba(86,211,143,.10);
  color:#bdfbd5;
}
.profile-restore-btn:hover{background:rgba(86,211,143,.18)}
@media(max-width:760px){
  .profile-backup-row{gap:5px}
  .profile-backup-btn{font-size:10px;padding:6px 7px}
}


/* v116: Public name guard */
.name-guard-field{display:flex;align-items:center;gap:8px;width:100%;}
.name-guard-field #input-nick{flex:1;min-width:0;}
.name-guard-info{flex:0 0 auto;width:30px;height:30px;border-radius:999px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.08);color:var(--text-main,#fff);font-weight:800;cursor:pointer;line-height:1;}
.name-guard-info:hover{background:rgba(255,255,255,.16);}
.name-guard-status{min-height:18px;margin:-4px 0 8px 2px;font-size:12px;line-height:1.35;color:var(--text-muted,#aaa);}
.name-guard-status.ok{color:#55d88a;}
.name-guard-status.bad{color:#ff7d7d;}
.name-guard-status.checking{color:#ffd76a;}


/* v91: goldenes Verkaufsbild-Badge; eigener Platz unten rechts, getrennt von Ring/Sternen/Mikrofon */
.s4c-avatar-showcase-badge {
    position: absolute;
    right: -8px;
    bottom: -6px;
    z-index: 4;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff7c7, #f7c94a 48%, #9a5b00);
    color: #372000;
    border: 1px solid rgba(255,255,255,.72);
    box-shadow: 0 3px 9px rgba(0,0,0,.35), 0 0 10px rgba(247,201,74,.35);
    font-size: 10px;
    line-height: 1;
    pointer-events: none;
}
.msg-avatar .s4c-avatar-showcase-badge { right: -6px; bottom: -5px; width: 15px; height: 15px; font-size: 8px; }
.profile-avatar .s4c-avatar-showcase-badge { right: -9px; bottom: -7px; width: 20px; height: 20px; font-size: 11px; }

/* v95: Simulations-Chatter verwenden keine sichtbare Sonder-Metazeile. */


/* v100 avatar zoom preview */
.chatter-avatar {
    cursor: zoom-in;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.chatter-avatar:hover {
    transform: scale(1.12);
    z-index: 20;
}
.s4c-avatar-zoom-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .16s ease;
}
.s4c-avatar-zoom-backdrop.is-visible { opacity: 1; }
.s4c-avatar-zoom-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(76vw, 430px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.18), rgba(255,255,255,.04));
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 24px 80px rgba(0,0,0,.55), 0 0 0 8px rgba(255,255,255,.04);
    overflow: hidden;
}
.s4c-avatar-zoom-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.s4c-avatar-zoom-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.34);
    background: rgba(0,0,0,.42);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.s4c-avatar-zoom-close:hover { background: rgba(255,255,255,.18); }
@media (max-width: 560px) {
    .chatter-avatar:hover { transform: none; }
    .s4c-avatar-zoom-card { width: min(84vw, 360px); }
}

/* v104: Paid-Content Bots */
.paid-content-audio { display:grid; gap:6px; padding:10px; border:1px solid rgba(255,255,255,.12); border-radius:14px; background:rgba(255,255,255,.05); }
.paid-content-audio audio { width:100%; max-width:360px; }
.paid-content-audio-hint { font-size:12px; color:var(--text-muted); font-weight:800; }

/* v121 PWA install hint */
.set4chat-pwa-install {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: min(420px, calc(100vw - 24px));
    background: linear-gradient(180deg, rgba(6, 24, 74, 0.98), rgba(4, 18, 58, 0.98));
    color: #fff;
    border: 1px solid rgba(255, 215, 100, 0.35);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    padding: 16px;
    z-index: 9999;
    backdrop-filter: blur(10px);
}
.set4chat-pwa-install-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}
.set4chat-pwa-install-text {
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255,255,255,0.9);
}
.set4chat-pwa-install-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
    flex-wrap: wrap;
}
.set4chat-pwa-install-btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.set4chat-pwa-install-btn.primary {
    background: linear-gradient(180deg, #ffd86b, #d7a11f);
    color: #18264f;
    font-weight: 700;
}
@media (max-width: 640px) {
    .set4chat-pwa-install {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        border-radius: 16px;
    }
    .set4chat-pwa-install-actions {
        justify-content: stretch;
    }
    .set4chat-pwa-install-btn {
        flex: 1 1 140px;
    }
}

/* v122 PWA local PIN hint and lock */
.set4chat-pin-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 8, 28, 0.72);
    backdrop-filter: blur(12px);
}
.set4chat-pin-modal {
    width: min(430px, calc(100vw - 28px));
    background: linear-gradient(180deg, rgba(6, 24, 74, 0.98), rgba(4, 18, 58, 0.99));
    color: #fff;
    border: 1px solid rgba(255, 215, 100, 0.38);
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    padding: 20px;
}
.set4chat-pin-modal h2 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.25;
}
.set4chat-pin-modal p {
    margin: 0 0 16px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    line-height: 1.5;
}
.set4chat-pin-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 215, 100, 0.36);
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 22px;
    letter-spacing: 0.4em;
    text-align: center;
    padding: 13px 12px;
    outline: none;
}
.set4chat-pin-input:focus {
    border-color: rgba(255, 215, 100, 0.9);
    box-shadow: 0 0 0 3px rgba(255, 215, 100, 0.14);
}
.set4chat-pin-message {
    min-height: 20px;
    margin-top: 10px;
    font-size: 13px;
    color: #ffd86b;
}
.set4chat-pin-actions {
    margin-top: 14px;
}
.set4chat-pin-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.set4chat-pin-btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.set4chat-pin-btn.primary {
    background: linear-gradient(180deg, #ffd86b, #d7a11f);
    color: #18264f;
    font-weight: 700;
}
@media (max-width: 640px) {
    .set4chat-pin-overlay {
        align-items: flex-end;
        padding: 12px;
    }
    .set4chat-pin-modal {
        width: 100%;
        border-radius: 18px;
    }
    .set4chat-pin-controls {
        justify-content: stretch;
    }
    .set4chat-pin-btn {
        flex: 1 1 130px;
    }
}

/* v143: In Multi-Chat-Iframes bleibt die aufgeklappte eigene Profilkarte intern scrollbar. */
#sidebar{
    min-height:0;
    overflow:hidden;
}
.profile-card.profile-drawer-enhanced{
    max-height:min(46dvh, 430px);
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
}
.profile-card.profile-drawer-enhanced .profile-drawer-body{
    min-height:0;
}
#user-list{
    min-height:0;
}
@media (max-width:900px){
    .profile-card.profile-drawer-enhanced{
        max-height:42dvh;
    }
}
