/* =========================================================
   SoulCare AI — Modern Theme, Dynamic Backgrounds & Levels
   ========================================================= */

:root {
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', serif;
    
    /* Default Palette — Warm Sunset Serenity */
    --bg-base: #140a20;
    --bg-card: rgba(36, 20, 52, 0.74);
    --bg-card-hover: rgba(50, 28, 72, 0.88);
    --bg-input: rgba(26, 14, 38, 0.80);
    --border-color: rgba(244, 114, 182, 0.14);
    --border-glow: rgba(251, 146, 60, 0.40);
    
    --primary: #fb923c;
    --primary-gradient: linear-gradient(135deg, #fb923c 0%, #f43f5e 50%, #c084fc 100%);
    --primary-glow: rgba(251, 146, 60, 0.40);
    
    --accent: #e879f9;
    --accent-glow: rgba(232, 121, 249, 0.35);
    
    --text-primary: #fff7ed;
    --text-secondary: #fed7aa;
    --text-muted: #c084fc;
    
    --sidebar-bg: rgba(18, 10, 28, 0.92);
    --bubble-assistant: rgba(40, 22, 58, 0.86);
    --bubble-user: linear-gradient(135deg, #ea580c 0%, #e11d48 100%);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══════════════════════════════════════════════════════════
   4 ОСНОВНЫХ ДИЗАЙН-СТИЛЯ ИНТЕРФЕЙСА (THEMES & STYLES)
   ══════════════════════════════════════════════════════════ */

/* 1. СТИЛЬ: Тёплый закат & Антистресс (Warm Sunset Serenity) */
body.theme-sunset, body.bg-sunset {
    --bg-base: #140a20;
    --bg-card: rgba(36, 20, 52, 0.74);
    --bg-card-hover: rgba(50, 28, 72, 0.88);
    --bg-input: rgba(26, 14, 38, 0.80);
    --border-color: rgba(244, 114, 182, 0.14);
    --border-glow: rgba(251, 146, 60, 0.40);
    --primary: #fb923c;
    --primary-gradient: linear-gradient(135deg, #fb923c 0%, #f43f5e 50%, #c084fc 100%);
    --primary-glow: rgba(251, 146, 60, 0.40);
    --accent: #e879f9;
    --accent-glow: rgba(232, 121, 249, 0.35);
    --text-primary: #fff7ed;
    --text-secondary: #fed7aa;
    --text-muted: #c084fc;
    --sidebar-bg: rgba(18, 10, 28, 0.92);
    --bubble-assistant: rgba(40, 22, 58, 0.86);
    --bubble-user: linear-gradient(135deg, #ea580c 0%, #e11d48 100%);
}

/* 2. СТИЛЬ: Скандинавский Дзен & Эко (Organic Zen & Biophilic) */
body.theme-zen {
    --bg-base: #081511;
    --bg-card: rgba(14, 32, 26, 0.76);
    --bg-card-hover: rgba(20, 44, 36, 0.88);
    --bg-input: rgba(11, 26, 21, 0.82);
    --border-color: rgba(52, 211, 153, 0.18);
    --border-glow: rgba(52, 211, 153, 0.38);
    --primary: #34d399;
    --primary-gradient: linear-gradient(135deg, #34d399 0%, #059669 50%, #10b981 100%);
    --primary-glow: rgba(52, 211, 153, 0.40);
    --accent: #a7f3d0;
    --accent-glow: rgba(167, 243, 208, 0.35);
    --text-primary: #f0fdf4;
    --text-secondary: #bbf7d0;
    --text-muted: #6ee7b7;
    --sidebar-bg: rgba(7, 18, 14, 0.92);
    --bubble-assistant: rgba(16, 38, 30, 0.86);
    --bubble-user: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* 3. СТИЛЬ: Нео-премиум ИИ (Deep Cosmic Oasis) */
body.theme-cosmic {
    --bg-base: #060914;
    --bg-card: rgba(18, 26, 47, 0.72);
    --bg-card-hover: rgba(26, 38, 68, 0.85);
    --bg-input: rgba(13, 20, 38, 0.75);
    --border-color: rgba(99, 179, 237, 0.18);
    --border-glow: rgba(56, 189, 248, 0.35);
    --primary: #38bdf8;
    --primary-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --primary-glow: rgba(56, 189, 248, 0.40);
    --accent: #a78bfa;
    --accent-glow: rgba(167, 139, 250, 0.30);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --sidebar-bg: rgba(7, 11, 22, 0.92);
    --bubble-assistant: rgba(23, 34, 60, 0.78);
    --bubble-user: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
}

/* 4. СТИЛЬ: Швейцарский минимализм (Swiss Dark Titanium) */
body.theme-minimal {
    --bg-base: #111215;
    --bg-card: rgba(24, 25, 30, 0.82);
    --bg-card-hover: rgba(34, 36, 44, 0.92);
    --bg-input: rgba(19, 20, 24, 0.88);
    --border-color: rgba(255, 255, 255, 0.10);
    --border-glow: rgba(255, 255, 255, 0.20);
    --primary: #f1f5f9;
    --primary-gradient: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    --primary-glow: rgba(255, 255, 255, 0.20);
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.25);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --sidebar-bg: rgba(14, 15, 18, 0.95);
    --bubble-assistant: rgba(28, 30, 36, 0.90);
    --bubble-user: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

/* ══════════════════════════════════════════════════════════
   ДИНАМИЧЕСКИЕ ФОНЫ ТРЕКЕРА
   ══════════════════════════════════════════════════════════ */
body.bg-cosmic:not([class*="theme-"]) {
    --bg-base: #060914;
    --primary: #38bdf8;
    --primary-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --primary-glow: rgba(56, 189, 248, 0.4);
}

body.bg-ocean {
    --bg-base: #031525;
    --primary: #00d2ff;
    --primary-gradient: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    --primary-glow: rgba(0, 210, 255, 0.45);
    --bubble-assistant: rgba(5, 32, 54, 0.8);
    --border-glow: rgba(0, 210, 255, 0.4);
}

body.bg-emerald {
    --bg-base: #041a15;
    --primary: #34d399;
    --primary-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --primary-glow: rgba(52, 211, 153, 0.45);
    --bubble-assistant: rgba(6, 38, 30, 0.8);
    --border-glow: rgba(52, 211, 153, 0.4);
}

body.bg-qi-energy {
    --bg-base: #191204;
    --primary: #facc15;
    --primary-gradient: linear-gradient(135deg, #facc15 0%, #f97316 100%);
    --primary-glow: rgba(250, 204, 21, 0.5);
    --bubble-assistant: rgba(43, 31, 7, 0.8);
    --border-glow: rgba(250, 204, 21, 0.4);
}

body.bg-master {
    --bg-base: #0d061f;
    --primary: #38bdf8;
    --primary-gradient: linear-gradient(135deg, #f43f5e 0%, #8b5cf6 50%, #06b6d4 100%);
    --primary-glow: rgba(244, 63, 94, 0.5);
    --bubble-assistant: rgba(28, 14, 56, 0.85);
    --border-glow: rgba(139, 92, 246, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
    transition: background-color 0.6s ease;
}

/* Ambient Canvas & Orbs */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

#ambientBgCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.65;
}

/* Custom Wallpaper Layer */
.custom-wallpaper-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
    opacity: 0.35;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.32;
    animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--primary), transparent);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, var(--accent), transparent);
    bottom: -120px;
    right: -100px;
    animation-duration: 22s;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #f43f5e, transparent);
    top: 40%;
    left: 45%;
    animation-duration: 26s;
    animation-delay: -10s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 60px) scale(1.15); }
    100% { transform: translate(-30px, -40px) scale(0.95); }
}

/* Unlock Toast Popup */
.unlock-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    background: linear-gradient(135deg, rgba(30, 41, 75, 0.95), rgba(18, 26, 47, 0.98));
    border: 1px solid #facc15;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 35px rgba(250, 204, 21, 0.3);
    animation: slideInToast 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInToast {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-icon {
    font-size: 2rem;
    animation: bounce 1s infinite alternate;
}

.toast-content h4 {
    font-size: 0.95rem;
    color: #facc15;
    margin-bottom: 2px;
}

.toast-content p {
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* App Container Layout — Колонки поменяны местами (Контент/Чат слева, Меню справа) */
.app-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row-reverse;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(14px);
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: var(--sidebar-bg);
    border-left: 1px solid var(--border-color);
    border-right: none;
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    flex-shrink: 0;
    backdrop-filter: blur(20px);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
    padding: 0 6px;
}

.logo-icon-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.logo-svg {
    width: 24px;
    height: 24px;
}

.logo-text h2 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 15px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateX(-4px);
}

.nav-item.active {
    background: var(--bg-card-hover);
    color: var(--primary);
    border: 1px solid var(--border-glow);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.nav-icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.sos-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sos-btn:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
}

.sos-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.voice-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.sound-wave-bars {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 14px;
}

.sound-wave-bars span {
    width: 3px;
    height: 6px;
    background: var(--primary);
    border-radius: 2px;
    transition: height 0.2s;
}

.voice-speaking .sound-wave-bars span:nth-child(1) { animation: wave 0.8s infinite ease-in-out 0.1s; }
.voice-speaking .sound-wave-bars span:nth-child(2) { animation: wave 0.8s infinite ease-in-out 0.3s; }
.voice-speaking .sound-wave-bars span:nth-child(3) { animation: wave 0.8s infinite ease-in-out 0.2s; }
.voice-speaking .sound-wave-bars span:nth-child(4) { animation: wave 0.8s infinite ease-in-out 0.4s; }

@keyframes wave {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.tab-pane {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 24px 32px;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ----------------- TAB 1: ЧАТ И ТЕРАПИЯ ----------------- */
#tab-chat {
    padding: 0;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    z-index: 10;
    gap: 12px;
}

.assistant-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-container {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    box-shadow: 0 0 16px var(--primary-glow);
    transition: transform 0.3s ease;
}

.avatar-core {
    font-size: 1.3rem;
}

.speaking-pulse {
    animation: orbPulse 1.4s infinite ease-in-out;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 16px var(--primary-glow); }
    50% { transform: scale(1.12); box-shadow: 0 0 28px var(--primary-glow), 0 0 45px var(--accent-glow); }
}

.assistant-info h3 {
    font-size: 1rem;
    font-weight: 600;
}

.status-online {
    font-size: 0.78rem;
    color: #34d399;
    font-weight: 500;
}

/* Thinking Pill Toggle */
.thinking-mode-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: #c084fc;
    font-weight: 600;
}

.switch-mini {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    flex-shrink: 0;
}

.switch-mini input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-mini.round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .3s;
    border-radius: 20px;
}

.slider-mini.round:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider-mini.round {
    background: var(--accent);
}

input:checked + .slider-mini.round:before {
    transform: translateX(14px);
}

.visualizer-container {
    display: flex;
    align-items: center;
}

#waveformCanvas {
    width: 180px;
    height: 38px;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* Topic Chips */
.topic-chips-wrapper {
    padding: 10px 28px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.topic-chips {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.chip {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.chip:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
    border-color: var(--border-glow);
    transform: translateY(-1px);
}

/* Chat Messages */
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: msgIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    flex-shrink: 0;
}

.message.assistant .msg-content {
    background: var(--bubble-assistant);
    border: 1px solid var(--border-color);
    border-radius: 4px 18px 18px 18px;
    padding: 16px 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    user-select: text;
}

.message.assistant .msg-content p {
    margin-bottom: 8px;
}
.message.assistant .msg-content p:last-child {
    margin-bottom: 0;
}

/* Thinking Process Box */
.thinking-box {
    margin-bottom: 12px;
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.thinking-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #c084fc;
    user-select: none;
}

.thinking-body {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(167, 139, 250, 0.15);
    line-height: 1.5;
    white-space: pre-line;
    font-style: italic;
    color: #cbd5e1;
}

.message.user .msg-content {
    background: var(--bubble-user);
    border-radius: 18px 4px 18px 18px;
    padding: 14px 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    user-select: text;
}

.speak-btn {
    align-self: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
}

.speak-btn:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.speak-btn svg {
    width: 18px;
    height: 18px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.thinking-brain-pulse {
    font-size: 1.2rem;
    animation: brainPulse 1.2s infinite alternate;
}

@keyframes brainPulse {
    from { transform: scale(0.9); opacity: 0.6; }
    to { transform: scale(1.2); opacity: 1; }
}

/* Input Area */
.chat-input-container {
    padding: 16px 28px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
}

.chat-input-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px 14px;
    transition: var(--transition);
}

.chat-input-box:focus-within {
    border-color: var(--border-glow);
    box-shadow: 0 0 16px var(--primary-glow);
}

.chat-input-box textarea {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    resize: none;
    max-height: 120px;
    padding: 6px 0;
}

.mic-btn, .send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.mic-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.mic-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.mic-btn.recording {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.6);
    animation: micPulse 1s infinite alternate;
}

@keyframes micPulse {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

.send-btn {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 2px 12px var(--primary-glow);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 18px var(--primary-glow);
}

.send-btn svg, .mic-btn svg {
    width: 18px;
    height: 18px;
}

/* ----------------- TAB 2: ТРЕКЕР ПРАКТИК & УРОВНИ ----------------- */
.tracker-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tracker-date-badge {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid var(--border-glow);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.tracker-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* User Level & Mastery Card */
.user-level-card {
    background: linear-gradient(135deg, rgba(30, 41, 75, 0.75) 0%, rgba(18, 26, 47, 0.85) 100%);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.level-badge-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}

.level-badge-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 25px var(--primary-glow);
    flex-shrink: 0;
    animation: orbPulse 3s infinite ease-in-out;
}

.level-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.level-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-name-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.rank-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-name-wrap h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.xp-pill {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #facc15;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
}

.level-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.level-progress-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 4px;
}

.level-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #facc15 0%, #38bdf8 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

.level-footer-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pct-highlight {
    color: var(--primary);
    font-weight: 700;
}

.tracker-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    backdrop-filter: blur(16px);
}

.progress-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
}

.progress-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: block;
}

.progress-count {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.progress-percent {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 14px var(--primary-glow);
}

.tracker-streak-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.habits-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.habit-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(16px);
}

.habit-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.habit-card.completed {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.35);
}

.habit-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.habit-icon {
    font-size: 1.5rem;
}

.habit-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.habit-name {
    font-size: 0.92rem;
    font-weight: 600;
}

.habit-xp-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: #facc15;
    background: rgba(234, 179, 8, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    align-self: flex-start;
}

.habit-card.completed .habit-name {
    text-decoration: line-through;
    color: #94a3b8;
}

.habit-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.habit-card.completed .habit-checkbox {
    background: #34d399;
    border-color: #34d399;
    color: #061814;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

.add-habit-bar {
    display: flex;
    gap: 12px;
}

.add-habit-bar input {
    flex-grow: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    outline: none;
}

/* ----------------- UNLOCKABLE BACKGROUNDS GALLERY ----------------- */
.bg-gallery-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    backdrop-filter: blur(16px);
}

.bg-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bg-header-text h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.bg-header-text p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.unlocked-count-badge {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid var(--border-glow);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

.bg-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.bg-card-item {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.bg-card-item:hover:not(.locked) {
    transform: translateY(-3px);
    border-color: var(--border-glow);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.bg-card-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.bg-card-item.locked {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.6);
}

.bg-preview {
    width: 100%;
    height: 80px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    overflow: hidden;
}

.preview-cosmic { background: linear-gradient(135deg, #0f172a, #1e1b4b, #312e81); }
.preview-ocean { background: linear-gradient(135deg, #082f49, #0284c7, #0369a1); }
.preview-emerald { background: linear-gradient(135deg, #022c22, #059669, #10b981); }
.preview-sunset { background: linear-gradient(135deg, #3b0764, #9333ea, #db2777); }
.preview-qi-energy { background: linear-gradient(135deg, #451a03, #d97706, #fbbf24); }
.preview-master { background: linear-gradient(135deg, #4c0519, #8b5cf6, #06b6d4); }

.bg-lock-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.bg-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.bg-info span {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.bg-card-item.active .bg-info h4 {
    color: var(--primary);
}

/* ----------------- TAB 3: ВИДЕО-ПРАКТИКИ: ЦИГУН & ЭНЕРГИЯ ----------------- */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(16px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.video-card:hover {
    border-color: var(--accent-glow);
    box-shadow: 0 10px 32px rgba(124, 58, 237, 0.22);
    transform: translateY(-2px);
}

.video-player-showcase {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 14px;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.video-cover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
    filter: brightness(0.92);
}

.video-card:hover .video-cover-img {
    transform: scale(1.06);
    filter: brightness(1.02);
}

.video-showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(9, 13, 22, 0.92) 0%, rgba(9, 13, 22, 0.25) 50%, rgba(9, 13, 22, 0.6) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 14px;
    z-index: 2;
    transition: background 0.3s ease;
}

.video-card:hover .video-showcase-overlay {
    background: linear-gradient(to top, rgba(9, 13, 22, 0.85) 0%, rgba(9, 13, 22, 0.1) 50%, rgba(9, 13, 22, 0.45) 100%);
}

.video-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.video-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(167, 139, 250, 0.2);
    color: #e0e7ff;
    font-size: 0.72rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(167, 139, 250, 0.4);
    letter-spacing: 0.3px;
}

.video-top-badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-duration-pill {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-hd-pill {
    background: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    border: 1px solid rgba(56, 189, 248, 0.5);
    letter-spacing: 0.5px;
}

.video-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

.video-play-btn-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.95), rgba(59, 130, 246, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(147, 51, 234, 0.6), 0 4px 15px rgba(0,0,0,0.5);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-play-btn-circle svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    margin-left: 3px;
    transition: transform 0.2s ease;
}

.video-card:hover .video-play-btn-circle {
    transform: scale(1.15);
    background: linear-gradient(135deg, #a855f7, #38bdf8);
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.8), 0 6px 20px rgba(0,0,0,0.6);
}

.video-bottom-platform-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.85);
    font-weight: 600;
}

.video-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #f1f5f9;
}

.video-player-container-mini {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
}

.video-player-container-mini iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-action-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.btn-video-action, .btn-video-action-alt {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-video-action {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.btn-video-action:hover {
    background: rgba(239, 68, 68, 0.28);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-video-action-alt {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid var(--border-glow);
    color: var(--primary);
}

.btn-video-action-alt:hover {
    background: rgba(56, 189, 248, 0.24);
    box-shadow: 0 0 12px var(--primary-glow);
    transform: translateY(-1px);
}

.video-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* ----------------- TAB 4: ЛАБОРАТОРИЯ РАЗМЫШЛЕНИЙ ----------------- */
.reflection-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.reflection-input-card, .reflection-results-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(16px);
}

.quick-dilemmas {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.dilemma-chip {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.dilemma-chip:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
    border-color: var(--accent-glow);
}

.btn-sparkle {
    width: 100%;
    background: linear-gradient(135deg, #a78bfa 0%, #38bdf8 100%);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.35);
}

.reflection-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.insight-placeholder {
    grid-column: span 2;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.insight-placeholder span {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.insight-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeIn 0.4s ease;
}

.insight-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.insight-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.therapeutic-summary-box {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    padding: 16px;
    animation: fadeIn 0.4s ease;
}

.therapeutic-summary-box h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.therapeutic-summary-box p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ----------------- TAB 5: АНТИСТРЕСС И ПРАКТИКИ ----------------- */
.tab-header {
    margin-bottom: 24px;
}

.tab-header h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.tab-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.practices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

.practice-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(16px);
}

.practice-badge {
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid var(--border-glow);
}

.practice-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.practice-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Breathing Circle */
.breathing-circle-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 240px;
    margin-bottom: 24px;
}

.breathing-glow {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    filter: blur(20px);
}

.breathing-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 30px var(--primary-glow);
    transition: transform 1s ease-in-out;
}

.breathing-circle.inhale {
    transform: scale(1.45);
    transition: transform 4s ease-in-out;
}

.breathing-circle.hold {
    transform: scale(1.45);
    box-shadow: 0 0 45px var(--accent-glow);
}

.breathing-circle.exhale {
    transform: scale(0.9);
    transition: transform 8s ease-in-out;
}

.breathing-text {
    font-size: 1.1rem;
    font-weight: 700;
}

.breathing-timer {
    font-size: 1.6rem;
    font-weight: 800;
    opacity: 0.9;
}

.breathing-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Grounding Steps */
.grounding-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.grounding-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.88rem;
    line-height: 1.4;
}

/* ----------------- TAB 6: ДНЕВНИК МЫСЛЕЙ (КПТ) ----------------- */
.diary-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.diary-form-card, .diary-history-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(16px);
}

.diary-form-card h3, .diary-history-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.highlight-val {
    color: var(--primary);
    font-weight: 700;
}

.mood-slider {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
}

.emotion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.etag {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.etag.selected {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.form-group input, .form-group textarea, .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus, .form-select:focus {
    border-color: var(--border-glow);
    box-shadow: 0 0 12px var(--primary-glow);
}

.btn-ai-analyze {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(56, 189, 248, 0.2));
    border: 1px solid var(--accent-glow);
    color: #c084fc;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-ai-analyze:hover {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.35), rgba(56, 189, 248, 0.35));
    box-shadow: 0 0 16px var(--accent-glow);
}

.btn-primary, .btn-secondary {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.8rem;
}

.card-header-with-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ai-chip-badge {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(167, 139, 250, 0.2));
    border: 1px solid var(--border-glow);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.api-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: var(--transition);
}

.btn-text-link:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--primary-glow);
}

.api-key-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.api-status-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.api-status-badge.success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.api-status-badge.error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.api-status-badge.checking {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--primary);
}

.key-help-box {
    margin-top: 12px;
    padding: 12px;
    background: rgba(56, 189, 248, 0.05);
    border: 1px dashed rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.key-help-box ol {
    margin-top: 6px;
    padding-left: 18px;
}

.code-link {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

/* Diary History List */
.diary-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.diary-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.diary-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diary-item-score {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
}

.diary-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.diary-item-emotions {
    font-size: 0.8rem;
    color: var(--accent);
}

.diary-item-thought {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.diary-item-rational {
    font-size: 0.88rem;
    color: #34d399;
    border-left: 2px solid #34d399;
    padding-left: 8px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 40px 0;
}

/* ----------------- TAB 7: НАСТРОЙКИ ----------------- */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-with-action {
    display: flex;
    gap: 8px;
}

.input-with-action input {
    flex-grow: 1;
}

.btn-toggle-eye {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.hint-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Switch Toggle */
.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider.round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 34px;
}

.slider.round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider.round {
    background: var(--primary-gradient);
}

input:checked + .slider.round:before {
    transform: translateX(20px);
}

/* ----------------- МОДАЛЬНОЕ ОКНО SOS ----------------- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    padding: 28px;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.2);
}

/* ----------------- МОДАЛЬНЫЙ КИНОТЕАТР ДЛЯ ВИДЕО ----------------- */
.video-player-modal-card {
    border-color: rgba(147, 51, 234, 0.5) !important;
    box-shadow: 0 0 50px rgba(147, 51, 234, 0.3) !important;
    max-width: 860px !important;
    width: 95% !important;
    padding: 20px !important;
    background: #0b0f19 !important;
}

.video-modal-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.video-modal-title-wrap {
    flex-grow: 1;
}

.video-modal-title-wrap h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 2px;
}

.video-modal-body {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.video-modal-frame-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.video-modal-frame-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-modal-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.video-modal-actions-left {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-modal-action-vk, .btn-modal-action-rutube {
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-modal-action-vk {
    background: rgba(0, 119, 255, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
}

.btn-modal-action-vk:hover {
    background: rgba(0, 119, 255, 0.4);
    color: #ffffff;
}

.btn-modal-action-rutube {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-modal-action-rutube:hover {
    background: rgba(239, 68, 68, 0.4);
    color: #ffffff;
}

.btn-modal-reward-xp {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.35));
    border: 1px solid rgba(234, 179, 8, 0.6);
    color: #fef08a;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-modal-reward-xp:hover {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #000;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.sos-icon-wrap {
    font-size: 1.5rem;
}

.modal-header h3 {
    flex-grow: 1;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f87171;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.emergency-notice {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.helpline-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.helpline-item {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}

.helpline-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.helpline-phone {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ef4444;
    margin-top: 2px;
}

.sos-quick-tip {
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* =========================================================
   MOBILE RESPONSIVE DESIGN (Android / iOS / Tablets)
   ========================================================= */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
        overflow: auto;
    }
    
    .app-container {
        flex-direction: column;
        height: 100dvh;
        width: 100vw;
    }

    /* Hide desktop sidebar */
    .sidebar {
        display: none;
    }

    .main-content {
        height: 100dvh;
        padding-bottom: 64px;
    }

    .tab-pane {
        padding: 16px 14px 80px 14px;
    }

    .chat-header {
        padding: 10px 14px;
    }

    .visualizer-container {
        display: none;
    }

    .topic-chips-wrapper {
        padding: 8px 12px;
    }

    .chat-messages {
        padding: 14px 12px;
        gap: 14px;
    }

    .message {
        max-width: 92%;
    }

    .chat-input-container {
        padding: 10px 12px 14px 12px;
    }

    /* Grids to 1 column on mobile */
    .habits-checklist,
    .bg-cards-grid,
    .videos-grid,
    .reflection-layout,
    .practices-grid,
    .diary-layout,
    .settings-grid,
    .insight-grid {
        grid-template-columns: 1fr;
    }

    .video-card, .practice-card, .diary-form-card, .diary-history-card, .settings-card, .user-level-card, .tracker-progress-card {
        padding: 16px;
    }

    .level-badge-wrap {
        gap: 12px;
    }

    .level-badge-circle {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .level-name-wrap h3 {
        font-size: 1.1rem;
    }

    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: 62px;
        background: rgba(7, 11, 22, 0.95);
        border-top: 1px solid var(--border-glow);
        backdrop-filter: blur(20px);
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        padding: 0 4px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .m-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-size: 0.68rem;
        font-weight: 600;
        cursor: pointer;
        padding: 6px 8px;
        border-radius: var(--radius-sm);
        transition: var(--transition);
        flex: 1;
        gap: 2px;
    }

    .m-nav-icon {
        font-size: 1.2rem;
    }

    .m-nav-item.active {
        color: var(--primary);
        background: rgba(56, 189, 248, 0.1);
    }
}

/* =========================================================
   NEW: VIDEO FILTER BAR & ENHANCED VIDEO CARDS
   ========================================================= */
.video-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.v-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.v-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.v-filter-btn.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.badge-moriarty {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.badge-qigong {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.badge-breath {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.badge-meditation {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.video-card-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-reward-xp {
    width: 100%;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.35);
    color: #fde047;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-reward-xp:hover {
    background: rgba(250, 204, 21, 0.22);
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.3);
}

.btn-reward-xp.completed {
    background: rgba(52, 211, 153, 0.15);
    border-color: rgba(52, 211, 153, 0.4);
    color: #6ee7b7;
    cursor: default;
}

/* =========================================================
   NEW: INTERACTIVE BREATHING STUDIO (5 MODES)
   ========================================================= */
.breathing-mode-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.b-mode-btn {
    background: rgba(18, 26, 47, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.b-mode-btn:hover {
    background: rgba(26, 38, 68, 0.85);
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.b-mode-btn.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18) 0%, rgba(129, 140, 248, 0.22) 100%);
    border-color: var(--primary);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.b-mode-btn .b-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.b-mode-btn .b-meta {
    display: flex;
    flex-direction: column;
}

.b-mode-btn .b-meta b {
    font-size: 0.92rem;
    color: var(--text-primary);
}

.b-mode-btn .b-meta small {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.breathing-studio-stage {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
}

.studio-info-card {
    margin-bottom: 24px;
    text-align: center;
}

.studio-mode-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 8px;
}

.studio-mode-header h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.studio-badges {
    display: flex;
    gap: 8px;
}

.badge-phase {
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary);
    border: 1px solid var(--primary-glow);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-round {
    background: rgba(167, 139, 250, 0.15);
    color: var(--accent);
    border: 1px solid var(--accent-glow);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.studio-mode-desc {
    max-width: 680px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}

.breathing-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.breathing-orb-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.orb-ring-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px dashed rgba(56, 189, 248, 0.25);
    animation: rotateSlow 24s linear infinite;
}

.orb-ring-middle {
    position: absolute;
    width: 82%;
    height: 82%;
    border-radius: 50%;
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.15);
}

.breathing-circle-core {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(18, 26, 47, 0.9) 75%);
    border: 2px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 0 35px var(--primary-glow);
    transition: transform 3.5s cubic-bezier(0.4, 0, 0.2, 1), background 1s ease, border-color 1s ease;
    z-index: 2;
}

.breathing-circle-core.inhale {
    transform: scale(1.32);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, rgba(14, 165, 233, 0.25) 75%);
    border-color: #38bdf8;
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.6);
}

.breathing-circle-core.hold {
    transform: scale(1.32);
    background: radial-gradient(circle, rgba(168, 85, 247, 0.45) 0%, rgba(147, 51, 234, 0.25) 75%);
    border-color: #c084fc;
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.6);
}

.breathing-circle-core.exhale {
    transform: scale(0.85);
    background: radial-gradient(circle, rgba(52, 211, 153, 0.35) 0%, rgba(16, 185, 129, 0.15) 75%);
    border-color: #34d399;
    box-shadow: 0 0 40px rgba(52, 211, 153, 0.5);
}

.core-subtext {
    font-size: 0.76rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.core-main-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 2px 0;
}

.core-timer {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.core-progress-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.breathing-options-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 22px;
}

.chime-toggle-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    color: var(--text-secondary);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chime-toggle-pill input {
    accent-color: var(--primary);
}

.duration-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.form-select-sm {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    outline: none;
}

.breathing-main-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-breathing-action {
    padding: 14px 36px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    min-width: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-breathing-reset {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-breathing-reset:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: rotate(-45deg);
}

/* =========================================================
   NEW: EXTRA PRACTICES & GROUNDING 5-4-3-2-1
   ========================================================= */
.practices-extra-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}

.grounding-interactive-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.g-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.g-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-glow);
}

.g-item.checked {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.35);
}

.g-item.checked .g-check {
    color: #34d399;
}

.g-item.checked .g-content {
    opacity: 0.75;
    text-decoration: line-through;
}

.g-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.g-content {
    flex: 1;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.g-content b {
    color: var(--text-primary);
}

.g-check {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.grounding-complete-banner {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(52, 211, 153, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.4);
    border-radius: var(--radius-md);
    color: #6ee7b7;
    font-size: 0.92rem;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.biohack-points {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

.biohack-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.biohack-item b {
    color: var(--text-primary);
}

.b-emoji {
    font-size: 1.3rem;
    flex-shrink: 0;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =========================================================
   SPECIALISTS & LIVE PSYCHOLOGISTS CONSULTATION STYLES
   ========================================================= */
.nav-text-highlight {
    color: #f472b6 !important;
    font-weight: 600;
}

.chip-special {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.2)) !important;
    border-color: rgba(236, 72, 153, 0.5) !important;
    color: #f472b6 !important;
    font-weight: 600;
}

.specialist-promo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(147, 51, 234, 0.2));
    border: 1px solid rgba(236, 72, 153, 0.4);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.specialist-promo-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.promo-badge-gift {
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f472b6;
    background: rgba(236, 72, 153, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(236, 72, 153, 0.4);
}

.promo-content {
    margin-top: 18px;
    max-width: 680px;
}

.promo-content h3 {
    font-size: 1.35rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.promo-content p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.btn-promo-action {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #ffffff;
    border: none;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
}

.btn-promo-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(236, 72, 153, 0.6);
}

.specialist-filter-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-bottom: 24px;
    padding-bottom: 6px;
}

.s-filter-btn {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.s-filter-btn:hover,
.s-filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.specialists-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-bottom: 36px;
}

.specialist-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.specialist-card:hover {
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.sp-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.sp-avatar-wrap {
    position: relative;
}

.sp-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.sp-avatar-1 { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.1); }
.sp-avatar-2 { border-color: rgba(168, 85, 247, 0.4); background: rgba(168, 85, 247, 0.1); }
.sp-avatar-3 { border-color: rgba(244, 114, 182, 0.4); background: rgba(244, 114, 182, 0.1); }
.sp-avatar-4 { border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.1); }

.sp-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #34d399;
    border: 2px solid #0f172a;
    border-radius: 50%;
}

.sp-meta-info {
    flex: 1;
}

.sp-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sp-name-row h3 {
    font-size: 1.15rem;
    margin: 0;
    color: var(--text-primary);
}

.sp-verified-badge {
    font-size: 0.72rem;
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.sp-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 4px 0 6px 0;
}

.sp-rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
}

.sp-stars {
    color: #fbbf24;
}

.sp-rating-num {
    font-weight: 700;
    color: var(--text-primary);
}

.sp-reviews-count {
    color: var(--text-muted);
}

.sp-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.sp-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
}

.sp-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 14px;
    font-style: italic;
}

.sp-experience-row {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 14px;
}

.sp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.sp-stat b {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.sp-pricing-box {
    background: rgba(236, 72, 153, 0.08);
    border: 1px dashed rgba(236, 72, 153, 0.35);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 16px;
}

.sp-price-gift {
    font-size: 0.92rem;
    color: #f472b6;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-price-gift b {
    color: #34d399;
}

.sp-price-regular {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.sp-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-book-primary {
    flex: 1;
    min-width: 100%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-book-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-contact-tg,
.btn-contact-wa {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-contact-tg {
    background: rgba(36, 161, 222, 0.15);
    border-color: rgba(36, 161, 222, 0.4);
    color: #38bdf8;
}

.btn-contact-tg:hover {
    background: rgba(36, 161, 222, 0.28);
}

.btn-contact-wa {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.4);
    color: #4ade80;
}

.btn-contact-wa:hover {
    background: rgba(37, 211, 102, 0.28);
}

/* User Bookings Section */
.user-bookings-section {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-top: 24px;
}

.bookings-header h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.no-bookings-placeholder {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.no-bookings-placeholder span {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 8px;
}

.booking-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 10px;
}

.booking-item-card .bk-title {
    font-weight: 700;
    color: #34d399;
    font-size: 0.95rem;
}

.booking-item-card .bk-details {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Booking Modal */
.booking-modal-card {
    max-width: 540px;
}

.booking-icon-wrap {
    font-size: 2rem;
    margin-right: 12px;
}

.modal-sub-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.booking-summary-banner {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 16px 0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.price-free {
    font-weight: 800;
    color: #34d399;
}

.summary-line-small {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.booking-modal-actions {
    margin-top: 14px;
}

.badge-psychology {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

/* =========================================================
   LIVE THERAPIST IN-APP CONSULTATION ROOM MODAL
   ========================================================= */
.live-therapist-modal-card {
    max-width: 650px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.2);
}

.live-session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.live-therapist-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-avatar-wrap {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(168, 85, 247, 0.25));
    border: 1.5px solid rgba(56, 189, 248, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.live-pulse-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #0f172a;
    box-shadow: 0 0 8px #10b981;
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.75; }
}

.live-meta-text {
    display: flex;
    flex-direction: column;
}

.live-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-name-line h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
}

.badge-live-online {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.live-role-subtitle {
    margin: 2px 0 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.live-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-timer-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fbbf24;
}

.timer-badge {
    font-size: 0.65rem;
    background: #fbbf24;
    color: #0f172a;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

.live-session-alert {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.12), rgba(168, 85, 247, 0.12));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 18px;
    font-size: 0.78rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.live-chat-messages {
    flex: 1;
    min-height: 280px;
    max-height: 48vh;
    overflow-y: auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: radial-gradient(circle at top right, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.95));
}

.live-msg {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeInMsg 0.25s ease-out;
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.live-msg.client {
    align-self: flex-end;
}

.live-msg.therapist {
    align-self: flex-start;
}

.live-msg-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
}

.live-msg.client .live-msg-bubble {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.live-msg.therapist .live-msg-bubble {
    background: rgba(30, 41, 59, 0.85);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.live-msg-meta {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 4px;
    display: flex;
    gap: 6px;
}

.live-msg.client .live-msg-meta {
    align-self: flex-end;
    color: rgba(255, 255, 255, 0.6);
}

.live-msg.therapist .live-msg-meta {
    align-self: flex-start;
}

.live-typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    width: fit-content;
}

.live-typing-dot {
    width: 6px;
    height: 6px;
    background: #38bdf8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.live-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.live-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.live-quick-chips {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    overflow-x: auto;
    background: rgba(15, 23, 42, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    scrollbar-width: none;
}

.live-quick-chips::-webkit-scrollbar {
    display: none;
}

.live-chip {
    padding: 6px 12px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #bae6fd;
    border-radius: 18px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.live-chip:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.6);
    color: #ffffff;
    transform: translateY(-1px);
}

.live-chat-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.live-chat-input-row textarea {
    flex: 1;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 14px;
    color: #f8fafc;
    font-size: 0.92rem;
    font-family: inherit;
    resize: none;
    max-height: 90px;
    outline: none;
    transition: border-color 0.2s;
}

.live-chat-input-row textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.btn-live-send {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-live-send:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* =========================================================
   TABLET RESPONSIVE DESIGN (iPad / Android Tablets / 7"-12")
   ========================================================= */
@media (min-width: 769px) and (max-width: 1200px) {
    .sidebar {
        width: 220px;
        padding: 16px 12px;
    }

    .nav-item {
        padding: 10px 12px;
        font-size: 0.85rem;
        gap: 10px;
    }

    .tab-pane {
        padding: 20px;
    }

    .specialists-grid,
    .videos-grid,
    .practices-grid,
    .practices-extra-grid,
    .habits-checklist,
    .bg-cards-grid,
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .reflection-layout,
    .diary-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .message {
        max-width: 82%;
    }
}

@media (max-width: 768px) {
    .specialists-grid {
        grid-template-columns: 1fr;
    }
    .specialist-promo-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════
   КОМПОНЕНТЫ: СТИЛИ, ЧАТ-СЕССИИ, КОНФЕРЕНЦИИ
   ══════════════════════════════════════════════════════════ */

/* Theme Palette Cards in Settings */
.theme-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-top: 10px;
}
.theme-pick-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}
.theme-pick-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.theme-pick-card.active {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    box-shadow: 0 0 16px var(--primary-glow);
}
.theme-swatches {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}
.theme-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Chat Header Extras (New Chat button & Session Dropdown) */
.chat-session-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-new-chat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-new-chat:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}
.chat-session-select {
    padding: 8px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.84rem;
    max-width: 220px;
    outline: none;
    cursor: pointer;
}

/* Conference Section */
.conference-hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(30, 20, 48, 0.85), rgba(48, 22, 60, 0.75));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 30px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.conference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.conference-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition);
}
.conference-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}
.conference-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    color: var(--text-primary);
}
.conf-active-room-box {
    background: rgba(0,0,0,0.3);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.conf-room-link-text {
    font-size: 0.88rem;
    color: var(--primary);
    word-break: break-all;
    font-family: monospace;
    user-select: all;
}
.btn-conf-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-conf-start {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-conf-start:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}
.btn-conf-join {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-conf-join:hover {
    background: rgba(255,255,255,0.15);
}
.quick-topics-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.topic-tag-btn {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}
.topic-tag-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255,255,255,0.1);
}

/* ══════════════════════════════════════════════════════════
   ICQ 2000 CLASSIC RETRO MESSENGER & GROUP CHATS ("acq")
   ══════════════════════════════════════════════════════════ */

body.theme-icq {
    --bg-base: #0c2b2a;
    --bg-card: rgba(16, 44, 45, 0.88);
    --bg-card-hover: rgba(22, 60, 62, 0.95);
    --bg-input: rgba(8, 26, 27, 0.92);
    --border-color: rgba(77, 208, 225, 0.22);
    --border-glow: rgba(0, 230, 118, 0.45);
    --primary: #00e676;
    --primary-gradient: linear-gradient(135deg, #00e676 0%, #00b0ff 100%);
    --primary-glow: rgba(0, 230, 118, 0.40);
    --accent: #ffd600;
    --accent-glow: rgba(255, 214, 0, 0.35);
    --text-primary: #e0f2f1;
    --text-secondary: #80cbc4;
    --text-muted: #4db6ac;
    --sidebar-bg: rgba(10, 32, 33, 0.96);
    --bubble-assistant: rgba(18, 52, 53, 0.9);
    --bubble-user: linear-gradient(135deg, #00897b 0%, #00695c 100%);
}

/* CareSoul Messenger Modern Frame (Nordic Titanium Minimal) */
.icq-app-frame {
    display: flex;
    flex-direction: column;
    background: rgba(14, 18, 28, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    min-height: 580px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(56, 189, 248, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Modern CareSoul Header Titlebar */
.icq-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(18, 24, 38, 0.95);
    color: #f8fafc;
    padding: 11px 18px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    user-select: none;
    letter-spacing: 0.2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px 20px 0 0;
}
.icq-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.icq-flower-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 1.05rem;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}
.icq-flower-online { color: #38bdf8; }
.icq-flower-away { color: #fbbf24; }
.icq-flower-dnd { color: #f87171; }
.icq-flower-offline { color: #94a3b8; }

.icq-title-btns {
    display: flex;
    gap: 6px;
}
.icq-win-btn {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.icq-win-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(1.06);
}

/* CareSoul Modern Toolbar */
.icq-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(15, 20, 32, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}
.icq-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.icq-tool-btn:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    transform: translateY(-1px);
}
.icq-tool-btn.active {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}
.icq-persona-select {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #38bdf8;
    font-weight: 700;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
}

/* 2-Column ICQ Layout */
.icq-main-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Left Sidebar: Contact Tree & Groups */
.icq-contacts-panel {
    width: 310px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.18);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.icq-my-profile-card {
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.icq-my-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.icq-my-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 2px solid var(--primary);
}
.icq-my-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}
.icq-my-uin {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-family: monospace;
}
.icq-status-dropdown {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 0.78rem;
    cursor: pointer;
}

.icq-search-box {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}
.icq-search-input {
    width: 100%;
    padding: 7px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    outline: none;
}

/* Contact Tree View */
.icq-tree-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.icq-tree-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.icq-tree-group-header:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}
.icq-tree-node {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.icq-tree-node:hover {
    background: rgba(255,255,255,0.05);
}
.icq-tree-node.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
    color: #fff;
}
.icq-node-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    position: relative;
    flex-shrink: 0;
}
.icq-node-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.dot-online { background: #00e676; box-shadow: 0 0 6px #00e676; }
.dot-offline { background: #757575; }

.icq-node-meta {
    flex: 1;
    min-width: 0;
}
.icq-node-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.icq-node-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.icq-node-badge {
    background: var(--primary);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Right Panel: Active Chat Stream */
.icq-chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: rgba(0,0,0,0.1);
}

.icq-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
}
.icq-peer-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}
.icq-peer-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: 2px solid var(--border-glow);
}
.icq-peer-title h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.icq-peer-title p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 2px 0 0;
}
.icq-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Chat Messages Stream */
.icq-chat-stream {
    flex: 1;
    overflow-y: auto;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Retro Transcript Dividers */
.icq-msg-bubble {
    display: flex;
    flex-direction: column;
    max-width: 82%;
    animation: fadeIn 0.25s ease-out;
}
.icq-msg-bubble.incoming {
    align-self: flex-start;
}
.icq-msg-bubble.outgoing {
    align-self: flex-end;
}
.icq-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    padding: 0 4px;
}
.icq-msg-header b {
    color: var(--text-secondary);
}
.icq-msg-body {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
}
.icq-msg-bubble.incoming .icq-msg-body {
    background: rgba(22, 29, 44, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}
.icq-msg-bubble.outgoing .icq-msg-body {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
}

/* Photo Card in Messages */
.icq-photo-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 6px;
    border: 1px solid var(--border-color);
    max-width: 320px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: rgba(0,0,0,0.3);
}
.icq-photo-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.icq-photo-card img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    display: block;
}
.icq-photo-caption {
    padding: 6px 10px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Event Poster Card in Messages & Events Tab */
.icq-event-poster-card {
    background: linear-gradient(135deg, rgba(30, 20, 56, 0.95), rgba(15, 35, 55, 0.95));
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-top: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.event-poster-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(251, 146, 60, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    width: fit-content;
}
.event-poster-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.event-poster-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}
.event-poster-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
}
.event-poster-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.btn-event-phone-remind {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-event-phone-remind:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}
.btn-event-ics {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 0.82rem;
    cursor: pointer;
}
.btn-event-ics:hover {
    background: rgba(255,255,255,0.16);
}
.btn-event-join {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* CareSoul Modern Input Area */
.icq-input-area {
    padding: 14px 20px;
    background: rgba(14, 18, 28, 0.90);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0 0 20px 20px;
    position: relative;
}
.icq-input-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.icq-input-tool-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}
.icq-input-tool-btn:hover {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}
.icq-input-box-wrap {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.icq-textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    padding: 11px 16px;
    font-size: 0.92rem;
    font-family: inherit;
    resize: none;
    outline: none;
    min-height: 44px;
    max-height: 120px;
    line-height: 1.4;
    transition: all 0.2s ease;
}
.icq-textarea:focus {
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}
.btn-icq-send {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 12px 22px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s, box-shadow 0.15s;
    height: 44px;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}
.btn-icq-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

/* ── Emoji Picker Popover ── */
.emoji-picker-popover {
    position: absolute;
    bottom: 105%;
    left: 20px;
    z-index: 100;
    width: min(92vw, 380px);
    background: rgba(18, 24, 38, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(56, 189, 248, 0.1);
    backdrop-filter: blur(20px);
    animation: fadeIn 0.2s ease-out;
}
.emoji-picker-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 8px;
}
.emoji-cat-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.emoji-cat-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}
.emoji-cat-btn.active {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}
.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    padding: 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    user-select: none;
}
.emoji-item:hover {
    transform: scale(1.25);
    background: rgba(255, 255, 255, 0.1);
}

/* ── Wallpaper Presets & Controls ── */
.wallpaper-presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.wallpaper-preset-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.04);
}
.wallpaper-preset-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
}
.wallpaper-preset-card.active {
    border-color: #38bdf8;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}
.wallpaper-preset-thumb {
    width: 100%;
    height: 72px;
    background-size: cover;
    background-position: center;
}
.wallpaper-preset-name {
    padding: 6px 8px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #f1f5f9;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
}
.wallpaper-preset-card.active .wallpaper-preset-name {
    color: #38bdf8;
}

/* ── Range Sliders ── */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    transition: background 0.2s;
    cursor: pointer;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
    transition: transform 0.15s, box-shadow 0.15s;
}
.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
}
.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

/* Specialists Categories Tabs Filter */
.specialists-category-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 20px;
}
.btn-spec-cat {
    padding: 9px 16px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-spec-cat:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}
.btn-spec-cat.active {
    background: var(--primary-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px var(--primary-glow);
}

/* Modals: Phone QR Reminder, Photo Lightbox, Group Creator */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}
.modal-window-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: min(94vw, 520px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.6);
    position: relative;
}
.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close-btn:hover {
    background: rgba(239,68,68,0.3);
    color: #fca5a5;
}

.qr-reminder-box {
    text-align: center;
    padding: 16px 0;
}
.qr-canvas-wrap {
    background: #ffffff;
    padding: 16px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    margin: 14px auto;
}
.qr-instructions-list {
    text-align: left;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    margin: 16px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Lightbox Fullscreen */
.lightbox-card {
    background: transparent;
    border: none;
    box-shadow: none;
    text-align: center;
    max-width: 90vw;
}
.lightbox-img-full {
    max-width: 88vw;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    border: 2px solid rgba(255,255,255,0.15);
}

/* ══════════════════════════════════════════════════════════════════
   DEVELOPER MODE & CHAT RECIPIENT TOGGLE (TELEGRAM/COMMUNITY STYLE)
   ══════════════════════════════════════════════════════════════════ */

/* Hidden by default unless Developer Mode is activated */
body:not(.dev-mode-active) .dev-mode-only {
    display: none !important;
}

body.dev-mode-active .dev-mode-only {
    /* visible */
}

/* Dev Mode Active Badge */
.dev-badge-active {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5) !important;
    animation: devPulse 2s infinite;
}

@keyframes devPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

/* Chat Target Mode Toggle Bar */
.chat-target-mode-toggle {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 3px;
    gap: 4px;
    margin-right: 8px;
    backdrop-filter: blur(8px);
}

.chat-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    user-select: none;
}

.chat-mode-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.chat-mode-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.45);
}

.chat-mode-btn.active#btnModeCommunity {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.45);
}

/* AI Thinking Accordion in ICQ Chat Stream */
.icq-thinking-details {
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(165, 180, 252, 0.2);
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.82rem;
}

.icq-thinking-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.icq-thinking-summary:hover {
    background: rgba(99, 102, 241, 0.22);
}

.icq-thinking-content {
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    white-space: pre-wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

/* Code & Artifact formatting in ICQ chat stream */
.icq-msg-body pre {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    font-family: 'Consolas', 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #38bdf8;
    margin: 8px 0;
}

.icq-msg-body code {
    font-family: 'Consolas', 'Fira Code', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}

.icq-msg-body pre code {
    background: transparent;
    padding: 0;
}

/* ══════════════════════════════════════════════════════════
   🖼️ CUSTOM WALLPAPER DROPZONE & PROMINENT CONTROLS
   ══════════════════════════════════════════════════════════ */
.custom-bg-btn {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(129, 140, 248, 0.25)) !important;
    border: 1px solid rgba(56, 189, 248, 0.5) !important;
    color: #e0f2fe !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
    font-weight: 600;
}
.custom-bg-btn:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(129, 140, 248, 0.4)) !important;
    border-color: #38bdf8 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
}

.custom-wallpaper-dropzone {
    border: 2px dashed rgba(56, 189, 248, 0.45);
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 16px;
    user-select: none;
}
.custom-wallpaper-dropzone:hover, .custom-wallpaper-dropzone.dragover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.25);
    transform: translateY(-2px);
}
.dropzone-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}
.dropzone-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.dropzone-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.wallpaper-slider-group {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.wallpaper-slider-group .slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: #e2e8f0;
    margin-bottom: 8px;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
   ⭐ LOGO SELECTOR GRID (NORDIC MINIMAL)
   ══════════════════════════════════════════════════════════ */
.logo-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.logo-picker-card {
    background: rgba(18, 22, 34, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.logo-picker-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.logo-picker-card.active {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}
.logo-picker-card svg {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35));
}
.logo-picker-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
}
.logo-picker-tag {
    font-size: 0.68rem;
    color: var(--text-muted);
}





/* ENHANCED TYPOGRAPHY FOR RIGHT PANEL */
.tab-pane h2 {
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 12px !important;
}
.tab-pane p {
    font-size: 1.1rem !important;
    color: #cbd5e1 !important;
    line-height: 1.6 !important;
}
.specialist-card .sp-desc {
    font-size: 1rem !important;
    color: #cbd5e1 !important;
    line-height: 1.5 !important;
}
.specialist-card .sp-role {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}
.icq-msg-body {
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
}
