/* ==========================================================================
   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;
}

#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%;
    object-fit: cover;
    display: inline-block;
    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.is-generic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--avatar-accent, #a352ff), rgba(255,255,255,0.12));
}
.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: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 55px;
}

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

#chat-header { font-weight: bold; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
#chat-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#block-btn,
#clear-history-btn {
    border: 1px solid rgba(255, 82, 82, 0.35);
    background: rgba(255, 82, 82, 0.12);
    color: #ff8a8a;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
#clear-history-btn {
    border-color: rgba(255, 179, 0, 0.35);
    background: rgba(255, 179, 0, 0.12);
    color: #ffc857;
}
#block-btn:hover { background: rgba(255, 82, 82, 0.20); }
#clear-history-btn:hover { background: rgba(255, 179, 0, 0.20); }
#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; }
    #block-btn::before { content: "🚫"; font-size: 14px; }
    #clear-history-btn::before { content: "🗑️"; 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;
}


/* ==========================================================================
   SEO LANDING PAGE / PRE-CHAT PROMO
   ========================================================================== */
body.landing-active,
body.landing-only {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
    height: auto;
}
body.landing-active #login-screen,
body.landing-active #app-container,
body.landing-active #chat-lightbox,
body.landing-only #login-screen,
body.landing-only #app-container,
body.landing-only #chat-lightbox {
    display: none !important;
}
.seo-landing {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 230, 255, 0.18), transparent 38%),
        linear-gradient(180deg, #071533 0%, #092f62 48%, #07101f 100%);
    color: #fff;
    padding: 28px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.seo-landing-shell {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(300px, 1fr);
    gap: 30px;
    align-items: center;
}
.seo-landing-copy {
    padding: 22px 8px 22px 20px;
}
.seo-kicker {
    margin: 0 0 14px 0;
    color: #8ee9ff;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
}
.seo-landing h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 950;
}
.seo-lead {
    max-width: 560px;
    margin: 22px 0 0 0;
    color: rgba(255,255,255,0.82);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.45;
}
.seo-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}
.seo-primary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 0;
    border-radius: 999px;
    padding: 15px 24px;
    font-size: 16px;
    font-weight: 900;
    color: #06121f;
    background: linear-gradient(135deg, #72f7ff, #00e676);
    box-shadow: 0 0 22px rgba(0,230,255,0.28), 0 10px 28px rgba(0,0,0,0.36);
    cursor: pointer;
}
.seo-primary-cta:active { transform: translateY(1px); }
.seo-url {
    font-weight: 950;
    font-size: clamp(24px, 3vw, 38px);
    color: #fff;
    text-shadow: 0 0 16px rgba(0,174,255,0.95);
    letter-spacing: -0.03em;
}
.seo-trust-list {
    list-style: none;
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 30px 0 0 0;
    color: rgba(255,255,255,0.82);
    font-size: 15px;
}
.seo-trust-list li::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 50%;
    color: #06121f;
    background: #00e676;
    font-weight: 900;
}
.seo-landing-visual {
    display: flex;
    justify-content: center;
}
.seo-landing-visual img {
    width: min(100%, 560px);
    height: auto;
    display: block;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.48), 0 0 36px rgba(0,174,255,0.28);
}
@media (max-width: 860px) {
    .seo-landing {
        padding: 20px 12px 30px;
        align-items: flex-start;
    }
    .seo-landing-shell {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .seo-landing-copy {
        text-align: center;
        padding: 10px 4px 0;
    }
    .seo-lead { margin-left: auto; margin-right: auto; }
    .seo-cta-row { justify-content: center; }
    .seo-trust-list {
        text-align: left;
        width: min(430px, 100%);
        margin-left: auto;
        margin-right: auto;
    }
    .seo-landing-visual img {
        width: min(100%, 430px);
        border-radius: 18px;
    }
}

.seo-legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    color: rgba(255,255,255,0.55);
    font-size: 13px;
}
.seo-legal-links a,
.login-legal-links a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-weight: 700;
}
.seo-legal-links a:hover,
.login-legal-links a:hover {
    color: #8ee9ff;
    text-decoration: underline;
}
.login-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}
@media (max-width: 860px) {
    .seo-legal-links {
        justify-content: center;
        margin-top: 22px;
    }
}

/* Legal placeholder pages */
body.legal-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #071533 0%, #07101f 100%);
    color: #fff;
    display: block;
    overflow-y: auto;
    padding: 24px 14px;
}
.legal-shell {
    width: min(860px, 100%);
    margin: 0 auto;
}
.legal-back {
    display: inline-flex;
    margin-bottom: 22px;
    color: #8ee9ff;
    text-decoration: none;
    font-weight: 800;
}
.legal-shell h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -0.05em;
}
.legal-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 18px;
    padding: 20px;
    margin-top: 16px;
    color: rgba(255,255,255,0.84);
    box-shadow: 0 16px 45px rgba(0,0,0,0.25);
}
.legal-card h2 {
    margin: 0 0 12px;
    color: #fff;
}
.legal-card p {
    margin: 9px 0;
    line-height: 1.55;
}


.seo-language-note {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.45;
    max-width: 560px;
}
.seo-language-note strong {
    color: #ffffff;
}


.seo-language-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 10px;
    margin-top: 22px;
    max-width: 620px;
}
.seo-language-switcher a {
    color: rgba(255,255,255,0.84);
    text-decoration: none;
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}
.seo-language-switcher a:hover {
    color: #ffffff;
    background: rgba(0,230,255,0.16);
}


/* ==========================================================================
   LANDING MOBILE/TABLET RESPONSIVE FIX
   ========================================================================== */
body.landing-only {
    min-height: 100svh;
    height: auto;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: initial;
    justify-content: initial;
    -webkit-text-size-adjust: 100%;
}
body.landing-only .seo-landing {
    min-height: 100svh;
    height: auto;
}
.seo-language-note {
    color: rgba(255,255,255,0.72);
    line-height: 1.5;
}
.seo-language-note a {
    color: #8ee9ff;
    font-weight: 900;
}
.seo-language-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}
.seo-language-switcher a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 750;
    background: rgba(255,255,255,0.045);
}
.seo-language-switcher a:hover {
    color: #06121f;
    background: linear-gradient(135deg, #72f7ff, #00e676);
}

@media (min-width: 861px) and (max-width: 1180px) {
    .seo-landing {
        padding: 26px 18px;
    }
    .seo-landing-shell {
        grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.82fr);
        gap: 22px;
    }
    .seo-landing h1 {
        font-size: clamp(40px, 5.4vw, 62px);
    }
    .seo-lead {
        font-size: 18px;
    }
    .seo-landing-visual img {
        width: min(100%, 430px);
        max-height: 72svh;
        object-fit: contain;
    }
}

@media (min-width: 700px) and (max-width: 1024px) and (orientation: portrait) {
    .seo-landing {
        padding: 22px 18px 34px;
        align-items: flex-start;
    }
    .seo-landing-shell {
        grid-template-columns: 1fr;
        gap: 18px;
        max-width: 720px;
    }
    .seo-landing-copy {
        text-align: center;
        padding: 8px 8px 0;
    }
    .seo-landing h1 {
        font-size: clamp(42px, 7vw, 60px);
        line-height: 1.02;
    }
    .seo-lead {
        margin-left: auto;
        margin-right: auto;
    }
    .seo-cta-row {
        justify-content: center;
    }
    .seo-trust-list {
        width: min(520px, 100%);
        margin-left: auto;
        margin-right: auto;
        grid-template-columns: 1fr;
        text-align: left;
    }
    .seo-landing-visual {
        order: 2;
    }
    .seo-landing-visual img {
        width: min(76vw, 440px);
        max-height: 44svh;
        border-radius: 20px;
        object-fit: contain;
    }
    .seo-language-switcher,
    .seo-legal-links {
        justify-content: center;
    }
}

@media (max-width: 699px) {
    .seo-landing {
        padding: 14px 12px 24px;
        align-items: flex-start;
        justify-content: flex-start;
    }
    .seo-landing-shell {
        grid-template-columns: 1fr;
        gap: 14px;
        width: 100%;
    }
    .seo-landing-copy {
        padding: 4px 0 0;
        text-align: center;
    }
    .seo-kicker {
        font-size: 10px;
        margin-bottom: 8px;
        letter-spacing: 0.1em;
    }
    .seo-landing h1 {
        font-size: clamp(30px, 10vw, 42px);
        line-height: 1.03;
        letter-spacing: -0.045em;
    }
    .seo-lead {
        margin: 12px auto 0;
        font-size: 15px;
        line-height: 1.42;
    }
    .seo-cta-row {
        margin-top: 16px;
        justify-content: center;
        gap: 10px;
    }
    .seo-primary-cta {
        width: min(100%, 360px);
        min-height: 48px;
        padding: 13px 18px;
        font-size: 15px;
    }
    .seo-url {
        width: 100%;
        font-size: clamp(24px, 8vw, 34px);
    }
    .seo-trust-list {
        width: min(100%, 380px);
        margin: 18px auto 0;
        gap: 8px;
        font-size: 13px;
        text-align: left;
    }
    .seo-language-note {
        margin-left: auto;
        margin-right: auto;
        width: min(100%, 390px);
        font-size: 12px;
    }
    .seo-language-switcher {
        justify-content: center;
        max-height: 92px;
        overflow-y: auto;
        padding: 2px 4px 6px;
        -webkit-overflow-scrolling: touch;
        mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent);
    }
    .seo-language-switcher a {
        font-size: 11px;
        padding: 6px 9px;
    }
    .seo-landing-visual {
        order: 2;
        margin-top: 2px;
    }
    .seo-landing-visual img {
        width: min(88vw, 330px);
        max-height: 42svh;
        object-fit: contain;
        border-radius: 16px;
        box-shadow: 0 18px 48px rgba(0,0,0,0.42), 0 0 24px rgba(0,174,255,0.22);
    }
    .seo-legal-links {
        justify-content: center;
        margin-top: 18px;
        font-size: 12px;
    }
}

@media (max-width: 420px) and (max-height: 760px) {
    .seo-landing h1 {
        font-size: clamp(27px, 9vw, 36px);
    }
    .seo-lead {
        font-size: 14px;
    }
    .seo-trust-list {
        margin-top: 14px;
    }
    .seo-landing-visual img {
        max-height: 35svh;
        width: min(84vw, 285px);
    }
}

@media (max-height: 560px) and (orientation: landscape) {
    body.landing-only .seo-landing {
        padding: 10px 12px;
    }
    .seo-landing-shell {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr);
        gap: 14px;
    }
    .seo-landing-copy {
        text-align: left;
    }
    .seo-landing h1 {
        font-size: clamp(28px, 5vw, 42px);
    }
    .seo-lead,
    .seo-language-note {
        font-size: 13px;
        margin-top: 8px;
    }
    .seo-cta-row {
        margin-top: 12px;
    }
    .seo-trust-list,
    .seo-language-switcher {
        display: none;
    }
    .seo-landing-visual img {
        max-height: 82svh;
        width: auto;
    }
}


/* SET4CHAT PROMO 31 I18N START */
body.landing-only .set4-promo-page {
    flex-direction: column;
    justify-content: flex-start;
    gap: 28px;
    padding-bottom: 54px;
}
.set4-promo-page .seo-landing-shell {
    padding-top: 8px;
}
.seo-promo-content {
    width: min(1180px, calc(100% - 28px));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0 auto;
}
.promo-section {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 24px;
    padding: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
    box-shadow: 0 18px 48px rgba(0,0,0,0.24);
    color: rgba(255,255,255,0.84);
}
.promo-section::before {
    content: "";
    position: absolute;
    inset: -80px auto auto -70px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: rgba(114,247,255,0.08);
    pointer-events: none;
}
.promo-section-number {
    margin: 0 0 10px;
    color: #8ee9ff;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0.14em;
}
.promo-section h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}
.promo-section h3 {
    margin: 18px 0 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1.25;
}
.promo-section p {
    margin: 10px 0;
    line-height: 1.65;
}
.promo-bullets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 16px 0 4px;
}
.promo-bullets li {
    padding: 10px 11px 10px 34px;
    border-radius: 14px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
    line-height: 1.35;
}
.promo-bullets li::before {
    content: "✓";
    position: absolute;
    left: 11px;
    top: 10px;
    color: #00e676;
    font-weight: 950;
}
[dir="rtl"] .promo-bullets li {
    padding: 10px 34px 10px 11px;
}
[dir="rtl"] .promo-bullets li::before {
    left: auto;
    right: 11px;
}
.promo-section:nth-child(1),
.promo-section:nth-child(4),
.promo-section:nth-child(6),
.promo-final {
    grid-column: 1 / -1;
}
.promo-final {
    text-align: center;
    background: radial-gradient(circle at 50% 0%, rgba(0,230,118,0.18), rgba(255,255,255,0.06));
}
.promo-final .seo-primary-cta {
    margin-top: 12px;
}
@media (max-width: 860px) {
    body.landing-only .set4-promo-page { gap: 18px; }
    .seo-promo-content {
        width: min(100% - 24px, 720px);
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .promo-section {
        padding: 18px;
        border-radius: 18px;
        text-align: left;
    }
    [dir="rtl"] .promo-section { text-align: right; }
    .promo-section h2 { font-size: clamp(23px, 7vw, 32px); }
    .promo-bullets { grid-template-columns: 1fr; }
}
@media (max-width: 699px) {
    .seo-promo-content { width: calc(100% - 20px); }
    .promo-section { padding: 16px; }
    .promo-section p { line-height: 1.55; }
}
@media (max-height: 560px) and (orientation: landscape) {
    .seo-promo-content { display: none; }
}
/* SET4CHAT PROMO 31 I18N END */

/* SET4CHAT PROFESSIONAL LANDING V2 START */
:root {
    --pro-bg: #070a14;
    --pro-bg-soft: #0c1224;
    --pro-card: rgba(255,255,255,0.075);
    --pro-card-strong: rgba(255,255,255,0.12);
    --pro-border: rgba(255,255,255,0.14);
    --pro-text: #f7fbff;
    --pro-muted: rgba(247,251,255,0.74);
    --pro-faint: rgba(247,251,255,0.52);
    --pro-cyan: #71f7ff;
    --pro-green: #00e676;
    --pro-gold: #ffd166;
    --pro-shadow: 0 24px 70px rgba(0,0,0,0.38);
}
body.professional-landing,
body.landing-only.professional-landing {
    display: block;
    min-height: 100svh;
    height: auto;
    width: 100%;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--pro-text);
    background:
        radial-gradient(circle at 18% 8%, rgba(113,247,255,0.24), transparent 30rem),
        radial-gradient(circle at 86% 20%, rgba(0,230,118,0.16), transparent 28rem),
        radial-gradient(circle at 50% 100%, rgba(88,108,255,0.15), transparent 34rem),
        linear-gradient(180deg, #070a14 0%, #0a1020 48%, #060811 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body.professional-landing::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.72), transparent 72%);
}
body.professional-landing * { box-sizing: border-box; }
body.professional-landing a { color: inherit; }
body.professional-landing img { max-width: 100%; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.pro-page {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 42px;
}
.pro-header {
    position: sticky;
    top: 14px;
    z-index: 10;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    background: rgba(7,10,20,0.74);
    box-shadow: 0 12px 42px rgba(0,0,0,0.28);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.pro-logo,
.pro-nav a,
.pro-small-cta,
.pro-primary-cta,
.language-pills a {
    text-decoration: none;
}
.pro-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    font-size: 17px;
    font-weight: 950;
    letter-spacing: -0.02em;
}
.pro-logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #06121f;
    background: linear-gradient(135deg, var(--pro-cyan), var(--pro-green));
    box-shadow: 0 0 24px rgba(113,247,255,0.3);
}
.pro-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.pro-nav a {
    padding: 10px 13px;
    border-radius: 999px;
    color: var(--pro-muted);
    font-size: 14px;
    font-weight: 780;
}
.pro-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,0.09);
}
.pro-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pro-language-select {
    min-width: 148px;
    height: 42px;
    padding: 0 38px 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.16);
    color: #fff;
    background: rgba(255,255,255,0.08);
    outline: none;
    font-weight: 760;
    cursor: pointer;
}
.pro-language-select:focus {
    border-color: rgba(113,247,255,0.72);
    box-shadow: 0 0 0 4px rgba(113,247,255,0.12);
}
.pro-language-select option { color: #111; }
.pro-small-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    color: #06121f;
    font-size: 14px;
    font-weight: 950;
    background: linear-gradient(135deg, var(--pro-cyan), var(--pro-green));
    box-shadow: 0 10px 26px rgba(0,230,118,0.18);
}
.pro-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.78fr);
    align-items: center;
    gap: 46px;
    padding: 76px 0 42px;
}
.hero-copy { min-width: 0; }
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--pro-cyan);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.hero-kicker::before {
    content: "";
    width: 34px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pro-cyan), var(--pro-green));
}
.pro-hero h1 {
    max-width: 820px;
    margin: 0;
    color: #fff;
    font-size: clamp(44px, 7.5vw, 88px);
    line-height: 0.95;
    letter-spacing: -0.075em;
    text-wrap: balance;
}
.hero-lead {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--pro-muted);
    font-size: clamp(17px, 2.05vw, 23px);
    line-height: 1.55;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}
.pro-primary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0 26px;
    border-radius: 999px;
    color: #04131f;
    font-size: 17px;
    font-weight: 950;
    background: linear-gradient(135deg, var(--pro-cyan) 0%, var(--pro-green) 100%);
    box-shadow: 0 18px 42px rgba(0,230,118,0.2), 0 0 0 1px rgba(255,255,255,0.24) inset;
    transition: transform .18s ease, box-shadow .18s ease;
}
.pro-primary-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 52px rgba(0,230,118,0.26), 0 0 0 1px rgba(255,255,255,0.34) inset;
}
.pro-primary-cta:active { transform: translateY(0); }
.hero-domain {
    color: #fff;
    font-size: clamp(23px, 3.2vw, 40px);
    font-weight: 950;
    letter-spacing: -0.045em;
    text-shadow: 0 0 26px rgba(113,247,255,0.64);
}
.hero-trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 34px 0 0;
    list-style: none;
}
.hero-trust li {
    min-height: 82px;
    padding: 16px 16px 16px 46px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    color: rgba(255,255,255,0.86);
    background: rgba(255,255,255,0.07);
    line-height: 1.4;
    box-shadow: 0 14px 36px rgba(0,0,0,0.18);
    position: relative;
}
.hero-trust li::before {
    content: "✓";
    position: absolute;
    left: 16px;
    top: 16px;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #04131f;
    background: var(--pro-green);
    font-weight: 950;
}
[dir="rtl"] .hero-trust li { padding: 16px 46px 16px 16px; }
[dir="rtl"] .hero-trust li::before { left: auto; right: 16px; }
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.hero-badges span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.052);
    font-size: 13px;
    font-weight: 800;
}
.hero-badges b { color: var(--pro-cyan); }
.browser-language-suggestion {
    margin: 16px 0 0;
    color: rgba(255,255,255,0.82);
    font-weight: 740;
}
.browser-language-suggestion a { color: var(--pro-cyan); font-weight: 950; }
.hero-visual {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.visual-glow {
    position: absolute;
    width: 96%;
    aspect-ratio: 1;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(113,247,255,0.16), rgba(0,230,118,0.09) 38%, transparent 70%);
    filter: blur(4px);
}
.visual-card {
    position: relative;
    width: min(100%, 420px);
    margin: 0;
    padding: 12px;
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.16);
    background: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05));
    box-shadow: var(--pro-shadow);
    transform: rotate(1.2deg);
}
.visual-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
    border-radius: 26px;
    box-shadow: 0 16px 50px rgba(0,0,0,0.34);
}
.visual-card figcaption {
    padding: 13px 10px 5px;
    color: rgba(255,255,255,0.78);
    font-size: 13px;
    line-height: 1.42;
    text-align: center;
}
.floating-card {
    position: absolute;
    display: grid;
    gap: 2px;
    min-width: 132px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(7,10,20,0.76);
    box-shadow: 0 18px 40px rgba(0,0,0,0.28);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.floating-card strong { font-size: 18px; color: #fff; }
.floating-card span { color: var(--pro-muted); font-size: 13px; font-weight: 800; }
.floating-card-a { left: 0; top: 84px; }
.floating-card-b { right: 4px; bottom: 112px; }
.language-panel {
    display: grid;
    gap: 16px;
    margin: 18px 0 26px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,0.082), rgba(255,255,255,0.035));
    box-shadow: 0 18px 42px rgba(0,0,0,0.18);
}
.language-panel p {
    margin: 0;
    color: var(--pro-muted);
    line-height: 1.55;
}
.language-panel strong { color: #fff; }
.language-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.language-pills a {
    padding: 8px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.76);
    background: rgba(255,255,255,0.055);
    font-size: 12px;
    font-weight: 820;
}
.language-pills a:hover,
.language-pills a.is-active {
    color: #04131f;
    background: linear-gradient(135deg, var(--pro-cyan), var(--pro-green));
    border-color: transparent;
}
.pro-features {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}
.feature-card {
    grid-column: span 6;
    position: relative;
    overflow: hidden;
    min-height: 100%;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 28px;
    background:
        radial-gradient(circle at 0 0, rgba(113,247,255,0.12), transparent 18rem),
        linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035));
    box-shadow: 0 18px 52px rgba(0,0,0,0.22);
}
.feature-card-wide { grid-column: span 12; }
.feature-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 24px;
}
.feature-number {
    color: var(--pro-cyan);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .16em;
}
.feature-card h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(25px, 3.2vw, 42px);
    line-height: 1.06;
    letter-spacing: -0.045em;
    text-wrap: balance;
}
.feature-card h3 {
    margin: 16px 0 0;
    color: rgba(255,255,255,0.94);
    font-size: 18px;
    line-height: 1.28;
}
.feature-card p {
    margin: 14px 0 0;
    color: var(--pro-muted);
    font-size: 16px;
    line-height: 1.66;
}
.feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
}
.feature-list li {
    position: relative;
    min-height: 44px;
    padding: 11px 12px 11px 34px;
    border-radius: 16px;
    color: rgba(255,255,255,0.82);
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    line-height: 1.35;
}
.feature-list li::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 18px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pro-green);
    box-shadow: 0 0 14px rgba(0,230,118,0.7);
}
[dir="rtl"] .feature-list li { padding: 11px 34px 11px 12px; }
[dir="rtl"] .feature-list li::before { left: auto; right: 13px; }
.pro-final-cta {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    margin-top: 18px;
    padding: 30px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.14);
    background:
        radial-gradient(circle at 90% 0%, rgba(0,230,118,0.18), transparent 26rem),
        linear-gradient(145deg, rgba(113,247,255,0.12), rgba(255,255,255,0.045));
    box-shadow: 0 24px 66px rgba(0,0,0,0.26);
}
.pro-final-cta h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}
.pro-final-cta p {
    margin: 10px 0 0;
    color: var(--pro-muted);
    font-size: 18px;
    line-height: 1.5;
}
.pro-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 4px 0;
    color: var(--pro-faint);
    font-size: 13px;
}
.pro-footer p { margin: 0; }
.pro-footer .seo-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    color: var(--pro-faint);
}
.pro-footer .seo-legal-links a {
    color: rgba(255,255,255,0.72);
    font-weight: 800;
}
.pro-footer .seo-legal-links a:hover { color: var(--pro-cyan); }
@media (max-width: 1040px) {
    .pro-header { grid-template-columns: 1fr auto; }
    .pro-nav { display: none; }
    .pro-hero { grid-template-columns: 1fr; padding-top: 54px; gap: 26px; }
    .hero-copy { text-align: center; }
    .hero-kicker { justify-content: center; }
    .hero-actions, .hero-badges { justify-content: center; }
    .hero-lead { margin-left: auto; margin-right: auto; }
    .hero-trust { max-width: 760px; margin-left: auto; margin-right: auto; }
    .hero-visual { min-height: auto; padding: 8px 0 14px; }
    .visual-card { width: min(420px, 72vw); }
    .floating-card-a { left: calc(50% - 330px); }
    .floating-card-b { right: calc(50% - 330px); }
}
@media (max-width: 760px) {
    .pro-page { width: min(100% - 22px, 680px); padding-top: 10px; }
    .pro-header {
        top: 8px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        border-radius: 20px;
    }
    .pro-logo { padding-right: 4px; }
    .pro-header-actions { width: 100%; display: grid; grid-template-columns: 1fr auto; }
    .pro-language-select { width: 100%; min-width: 0; }
    .pro-small-cta { padding-inline: 14px; }
    .pro-hero { padding: 38px 0 22px; }
    .pro-hero h1 { font-size: clamp(38px, 12vw, 58px); letter-spacing: -0.062em; }
    .hero-lead { font-size: 16px; line-height: 1.54; }
    .hero-actions { margin-top: 24px; }
    .pro-primary-cta { width: 100%; min-height: 54px; }
    .hero-domain { width: 100%; font-size: clamp(26px, 9vw, 38px); }
    .hero-trust { grid-template-columns: 1fr; gap: 10px; margin-top: 24px; text-align: left; }
    [dir="rtl"] .hero-trust { text-align: right; }
    .hero-badges { margin-top: 14px; }
    .hero-visual { display: none; }
    .language-panel { margin-top: 8px; padding: 16px; border-radius: 20px; }
    .language-pills { max-height: 138px; overflow-y: auto; padding-bottom: 6px; }
    .pro-features { grid-template-columns: 1fr; gap: 12px; }
    .feature-card, .feature-card-wide { grid-column: auto; border-radius: 22px; padding: 18px; }
    .feature-list { grid-template-columns: 1fr; }
    .feature-card h2 { font-size: clamp(25px, 8vw, 34px); }
    .pro-final-cta { grid-template-columns: 1fr; padding: 22px; border-radius: 24px; text-align: center; }
    .pro-footer { display: grid; justify-items: center; text-align: center; }
}
@media (max-width: 420px) {
    .pro-page { width: min(100% - 18px, 420px); }
    .pro-logo span:last-child { font-size: 16px; }
    .pro-logo-mark { width: 34px; height: 34px; border-radius: 12px; }
    .pro-header-actions { grid-template-columns: 1fr; }
    .hero-kicker { font-size: 11px; letter-spacing: .12em; }
    .hero-kicker::before { display: none; }
    .feature-card p { font-size: 15px; }
}
@media (max-height: 560px) and (orientation: landscape) {
    .pro-header { position: relative; top: auto; }
    .pro-hero { grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr); padding: 22px 0 16px; }
    .hero-copy { text-align: left; }
    [dir="rtl"] .hero-copy { text-align: right; }
    .hero-kicker, .hero-actions, .hero-badges { justify-content: flex-start; }
    [dir="rtl"] .hero-kicker, [dir="rtl"] .hero-actions, [dir="rtl"] .hero-badges { justify-content: flex-end; }
    .pro-hero h1 { font-size: clamp(34px, 5vw, 54px); }
    .hero-lead { font-size: 14px; margin-top: 12px; }
    .hero-trust, .language-panel, .pro-features { display: none; }
    .hero-visual { display: flex; min-height: 0; }
    .visual-card { width: min(230px, 36vw); }
    .floating-card { display: none; }
}
/* SET4CHAT PROFESSIONAL LANDING V2 END */

/* SET4CHAT PROFESSIONAL LANDING V3 FIXES: reliable preview links + balanced hero visual */
body.professional-landing .visual-card img {
    width: 100%;
    height: clamp(360px, 54vh, 520px);
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
}
body.professional-landing .hero-visual {
    min-height: clamp(430px, 62vh, 620px);
}
@media (max-width: 980px) {
    body.professional-landing .visual-card img {
        height: clamp(320px, 48vh, 460px);
    }
    body.professional-landing .hero-visual {
        min-height: auto;
    }
}
@media (max-width: 760px) {
    body.professional-landing .pro-header {
        align-items: center;
    }
    body.professional-landing .pro-header-actions {
        gap: 10px;
    }
}

/* SET4CHAT PROFESSIONAL LANDING V3 VIEWPORT FIT */
body.professional-landing .pro-hero {
    padding-top: clamp(42px, 5vw, 66px);
}
body.professional-landing .pro-hero h1 {
    font-size: clamp(42px, 5.25vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.065em;
}
body.professional-landing .hero-lead {
    font-size: clamp(16px, 1.55vw, 21px);
    line-height: 1.5;
    margin-top: 20px;
}
body.professional-landing .hero-actions {
    margin-top: 26px;
}
@media (max-width: 980px) {
    body.professional-landing .pro-hero h1 {
        font-size: clamp(40px, 8.2vw, 66px);
    }
}
@media (max-width: 760px) {
    body.professional-landing .pro-hero h1 {
        font-size: clamp(36px, 11vw, 54px);
        letter-spacing: -0.055em;
    }
    body.professional-landing .pro-hero {
        padding-top: 34px;
    }
}


/* SET4CHAT LOGO/PWA V4 START */
.pro-logo-mark {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 15px;
    padding: 0;
    color: transparent;
    background: rgba(255, 204, 80, 0.07);
    box-shadow: 0 0 0 1px rgba(255, 216, 118, 0.18), 0 10px 28px rgba(255, 191, 0, 0.16);
    overflow: visible;
}
.pro-logo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(255, 187, 0, 0.24));
    transition: transform .18s ease, filter .18s ease;
}
.pro-logo:hover .pro-logo-img {
    transform: scale(1.045);
    filter: drop-shadow(0 7px 14px rgba(255, 187, 0, 0.34));
}
.hero-logo-lock {
    position: absolute;
    z-index: 3;
    top: 26px;
    right: 20px;
    width: clamp(70px, 7.5vw, 104px);
    height: clamp(70px, 7.5vw, 104px);
    object-fit: contain;
    filter: drop-shadow(0 18px 34px rgba(0,0,0,.42)) drop-shadow(0 0 16px rgba(255, 203, 78, .22));
    transform: rotate(3deg);
}
[dir="rtl"] .hero-logo-lock {
    right: auto;
    left: 20px;
    transform: rotate(-3deg);
}
.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 8px 12px 8px 8px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 18px;
    background: rgba(255,255,255,.07);
    color: #fff;
    text-decoration: none;
    font-weight: 950;
    letter-spacing: -.02em;
    box-shadow: 0 12px 34px rgba(0,0,0,.22);
}
.legal-brand img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 5px 11px rgba(255,187,0,.26));
}
@media (max-width: 760px) {
    .pro-logo-mark {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 14px;
    }
}
@media (max-width: 420px) {
    .pro-logo-mark {
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: 12px;
    }
}
@media (max-height: 560px) and (orientation: landscape) {
    .hero-logo-lock { display: none; }
}
/* SET4CHAT LOGO/PWA V4 END */
