/* ===== ОСНОВНЫЕ ПЕРЕМЕННЫЕ (будут переопределяться темами) ===== */
:root {
--bg-primary: #0A0A0F;
--bg-secondary: rgba(20, 20, 30, 0.7);
--glass-bg: rgba(30, 30, 40, 0.5);
--glass-border: rgba(255, 255, 255, 0.08);
--glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
--accent-start: #FF7E5F;
--accent-end: #FEB47B;
--accent-glow: rgba(255, 126, 95, 0.3);
--text-primary: #FFFFFF;
--text-secondary: rgba(255, 255, 255, 0.7);
--text-tertiary: rgba(255, 255, 255, 0.4);
--success-bg: rgba(76, 175, 80, 0.15);
--success-text: #A5D6A5;
--success-border: rgba(76, 175, 80, 0.3);
--error-bg: rgba(244, 67, 54, 0.15);
--error-text: #FFB3B3;
--error-border: rgba(244, 67, 54, 0.3);
--warning-bg: rgba(255, 152, 0, 0.15);
--warning-text: #FFD966;
--warning-border: rgba(255, 152, 0, 0.3);
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== УПРАВЛЕНИЕ ЦВЕТОМ СТАТУС-БАРА ===== */
/* Для Chrome, Edge, Safari на Android/iOS */
:root {
    --status-bar-color: #FF7E5F;
    --nav-bar-color: #FF7E5F;
}

/* Для темной темы */
@media (prefers-color-scheme: dark) {
    :root {
        --status-bar-color: #0A0A0F;
        --nav-bar-color: #0A0A0F;
    }
}

/* Для PWA режима (когда сайт установлен как приложение) */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Убираем оранжевые полоски в PWA режиме */
    body::before,
    body::after {
        display: none;
    }
}

/* ===== БАЗОВЫЕ СТИЛИ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ===== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
min-height: 100vh;
position: relative;
overflow-x: hidden;
transition: background-color 0.3s ease;
}

/* ===== КЛАССИЧЕСКАЯ ТЕМА ===== */
body.classic-theme {
background: var(--bg-primary);
color: var(--text-primary);
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
min-height: 100vh;
position: relative;
overflow-x: hidden;
transition: background-color 0.3s ease;
}

/* ===== КЛАССИЧЕСКАЯ ТЕМА ===== */
body.classic-theme {
background: var(--bg-primary);
color: var(--text-primary);
}

body.classic-theme .gradient-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 30% 30%, rgba(255, 126, 95, 0.15) 0%, transparent 50%),
radial-gradient(circle at 70% 70%, rgba(254, 180, 123, 0.1) 0%, transparent 50%);
z-index: 0;
animation: gradientMove 20s ease-in-out infinite;
}

@keyframes gradientMove {
0%, 100% { opacity: 0.5; }
50% { opacity: 1; }
}

/* ===== КОСМИЧЕСКАЯ ТЕМА ===== */
body.cosmic-theme {
--bg-primary: #030518;
--glass-bg: rgba(20, 30, 50, 0.6);
--accent-start: #6C5B7B;
--accent-end: #355C7D;
--accent-glow: rgba(108, 91, 123, 0.5);
--success-text: #A8E6CF;
--error-text: #FF8A80;
background: #030518;
color: #FFFFFF;
}

body.cosmic-theme .gradient-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 30% 30%, rgba(108, 91, 123, 0.2) 0%, transparent 50%),
radial-gradient(circle at 70% 70%, rgba(53, 92, 125, 0.2) 0%, transparent 50%);
z-index: 0;
}

/* Звезды для космической темы */
body.cosmic-theme::before {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image:
radial-gradient(1px 1px at 10px 20px, #fff, rgba(0,0,0,0)),
radial-gradient(1px 1px at 30px 50px, #fff, rgba(0,0,0,0)),
radial-gradient(1px 1px at 50px 80px, #fff, rgba(0,0,0,0)),
radial-gradient(1px 1px at 80px 120px, #fff, rgba(0,0,0,0)),
radial-gradient(1px 1px at 120px 30px, #fff, rgba(0,0,0,0)),
radial-gradient(2px 2px at 150px 90px, #fff, rgba(0,0,0,0)),
radial-gradient(1px 1px at 200px 150px, #fff, rgba(0,0,0,0)),
radial-gradient(1px 1px at 250px 40px, #fff, rgba(0,0,0,0));
background-repeat: repeat;
background-size: 300px 300px;
opacity: 0.5;
pointer-events: none;
z-index: 1;
animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
0%, 100% { opacity: 0.5; }
50% { opacity: 1; }
}

/* ===== СВЕТЛАЯ ТЕМА ===== */
body.light-theme {
--bg-primary: #F5F5F7;
--glass-bg: rgba(255, 255, 255, 0.7);
--glass-border: rgba(0, 0, 0, 0.1);
--text-primary: #333333;
--text-secondary: #666666;
--text-tertiary: #999999;
--accent-start: #FF6B6B;
--accent-end: #FF8E53;
--accent-glow: rgba(255, 107, 107, 0.3);
--success-bg: rgba(76, 175, 80, 0.1);
--success-text: #2E7D32;
--success-border: rgba(46, 125, 50, 0.3);
--error-bg: rgba(244, 67, 54, 0.1);
--error-text: #C62828;
--error-border: rgba(198, 40, 40, 0.3);
--warning-bg: rgba(255, 152, 0, 0.1);
--warning-text: #EF6C00;
--warning-border: rgba(239, 108, 0, 0.3);
background: #F5F5F7;
color: #333333;
}

body.light-theme .gradient-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 30% 30%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
radial-gradient(circle at 70% 70%, rgba(255, 142, 83, 0.1) 0%, transparent 50%);
z-index: 0;
}

body.light-theme .glass-card {
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.5);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.light-theme .auth-btn .btn-icon {
background: rgba(0, 0, 0, 0.05);
}

/* ===== ТЕХНО-ТЕМА ===== */
body.techno-theme {
--bg-primary: #0A0A0A;
--glass-bg: rgba(0, 20, 0, 0.8);
--glass-border: #00FF00;
--text-primary: #00FF00;
--text-secondary: #00CC00;
--text-tertiary: #009900;
--accent-start: #00FF00;
--accent-end: #00CC00;
--accent-glow: rgba(0, 255, 0, 0.3);
--success-bg: rgba(0, 255, 0, 0.1);
--success-text: #00FF00;
--success-border: #00FF00;
--error-bg: rgba(255, 0, 0, 0.1);
--error-text: #FF0000;
--error-border: #FF0000;
background: #0A0A0A;
color: #00FF00;
font-family: 'Courier New', monospace;
}

body.techno-theme .gradient-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: repeating-linear-gradient(
0deg,
rgba(0, 255, 0, 0.03) 0px,
rgba(0, 255, 0, 0.01) 2px,
transparent 3px,
transparent 5px
);
z-index: 0;
}

body.techno-theme .glass-card {
border: 1px solid #00FF00;
box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
backdrop-filter: blur(5px);
}

body.techno-theme .auth-btn .btn-icon {
background: rgba(0, 255, 0, 0.1);
color: #00FF00;
}

/* Эффект сканирующей линии */
body.techno-theme::after {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
height: 2px;
background: rgba(0, 255, 0, 0.5);
animation: scan 8s linear infinite;
pointer-events: none;
z-index: 100;
}

@keyframes scan {
0% { top: 0; }
50% { top: 100%; }
51% { top: 100%; opacity: 0; }
100% { top: 0; opacity: 0; }
}

/* ===== ПРИРОДНАЯ ТЕМА ===== */
body.nature-theme {
--bg-primary: #1A3A2F;
--glass-bg: rgba(40, 70, 50, 0.7);
--glass-border: #64B5F6;
--text-primary: #E8F5E9;
--text-secondary: #C8E6C9;
--text-tertiary: #A5D6A7;
--accent-start: #64B5F6;
--accent-end: #4FC3F7;
--accent-glow: rgba(100, 181, 246, 0.3);
--success-bg: rgba(76, 175, 80, 0.2);
--success-text: #C8E6C9;
--success-border: #81C784;
--error-bg: rgba(244, 67, 54, 0.15);
--error-text: #FFB3B3;
--error-border: #FF8A80;
background: linear-gradient(135deg, #1A3A2F 0%, #2A5A3F 100%);
color: #E8F5E9;
}

body.nature-theme .gradient-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 30% 30%, rgba(100, 181, 246, 0.15) 0%, transparent 50%),
radial-gradient(circle at 70% 70%, rgba(76, 175, 80, 0.15) 0%, transparent 50%);
z-index: 0;
}

body.nature-theme .glass-card {
border: 1px solid rgba(100, 181, 246, 0.3);
box-shadow: 0 8px 32px rgba(0, 50, 0, 0.3);
}

/* Облака (декоративные элементы) */
body.nature-theme::before {
content: '☁️ ☁️ ☁️';
position: fixed;
top: 20px;
left: 20px;
font-size: 32px;
opacity: 0.15;
pointer-events: none;
z-index: 1;
animation: floatClouds 60s linear infinite;
}

/* Трава (декоративные элементы) */
body.nature-theme::after {
content: '🌿 🌱 🍃';
position: fixed;
bottom: 10px;
right: 10px;
font-size: 28px;
opacity: 0.2;
pointer-events: none;
z-index: 1;
transform: rotate(-5deg);
}

@keyframes floatClouds {
0% { transform: translateX(-100%); }
100% { transform: translateX(100vw); }
}

/* ===== МОРСКАЯ ТЕМА ===== */
body.ocean-theme {
--bg-primary: #0A1A2A;
--glass-bg: rgba(0, 40, 60, 0.7);
--glass-border: #4ECDC4;
--text-primary: #FFFFFF;
--text-secondary: #A8E6CF;
--text-tertiary: #6B8E9B;
--accent-start: #4ECDC4;
--accent-end: #45B7D1;
--accent-glow: rgba(78, 205, 196, 0.3);
--success-bg: rgba(76, 175, 80, 0.2);
--success-text: #A8E6CF;
--success-border: #4ECDC4;
--error-bg: rgba(244, 67, 54, 0.15);
--error-text: #FF8A80;
--error-border: #FF6B6B;
background: linear-gradient(135deg, #0A1A2A 0%, #1A3A4A 100%);
color: #FFFFFF;
}

body.ocean-theme .gradient-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 30% 30%, rgba(78, 205, 196, 0.15) 0%, transparent 50%),
radial-gradient(circle at 70% 70%, rgba(69, 183, 209, 0.15) 0%, transparent 50%);
z-index: 0;
}

/* Волны */
body.ocean-theme::before {
content: '🌊 🌊 🌊';
position: fixed;
bottom: 0;
left: 0;
right: 0;
font-size: 40px;
opacity: 0.1;
pointer-events: none;
z-index: 1;
animation: waves 8s ease-in-out infinite;
}

@keyframes waves {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}

/* ===== ОГНЕННАЯ ТЕМА ===== */
body.fire-theme {
--bg-primary: #2A0A0A;
--glass-bg: rgba(60, 20, 20, 0.7);
--glass-border: #FF6B6B;
--text-primary: #FFE0B2;
--text-secondary: #FFB74D;
--text-tertiary: #FF8A65;
--accent-start: #FF6B6B;
--accent-end: #FF8E53;
--accent-glow: rgba(255, 107, 107, 0.3);
--success-bg: rgba(255, 140, 0, 0.2);
--success-text: #FFB74D;
--success-border: #FF8A65;
--error-bg: rgba(244, 67, 54, 0.15);
--error-text: #FF6B6B;
--error-border: #FF5252;
background: linear-gradient(135deg, #2A0A0A 0%, #4A1A1A 100%);
color: #FFE0B2;
}

body.fire-theme .gradient-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 30% 30%, rgba(255, 107, 107, 0.15) 0%, transparent 50%),
radial-gradient(circle at 70% 70%, rgba(255, 142, 83, 0.15) 0%, transparent 50%);
z-index: 0;
}

/* Искры */
body.fire-theme::before {
content: '🔥 🔥 🔥';
position: fixed;
top: 20%;
right: 10%;
font-size: 32px;
opacity: 0.15;
pointer-events: none;
z-index: 1;
animation: sparks 3s ease-in-out infinite;
}

@keyframes sparks {
0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.15; }
50% { transform: scale(1.2) rotate(5deg); opacity: 0.3; }
}

/* ===== САПФИРОВАЯ ТЕМА ===== */
body.sapphire-theme {
--bg-primary: #0A0A2A;
--glass-bg: rgba(20, 20, 60, 0.7);
--glass-border: #7B68EE;
--text-primary: #E6E6FA;
--text-secondary: #B0C4DE;
--text-tertiary: #6A5ACD;
--accent-start: #7B68EE;
--accent-end: #4169E1;
--accent-glow: rgba(123, 104, 238, 0.3);
--success-bg: rgba(75, 0, 130, 0.2);
--success-text: #B0C4DE;
--success-border: #7B68EE;
--error-bg: rgba(244, 67, 54, 0.15);
--error-text: #FF6B6B;
--error-border: #FF5252;
background: linear-gradient(135deg, #0A0A2A 0%, #1A1A4A 100%);
color: #E6E6FA;
}

body.sapphire-theme .gradient-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 30% 30%, rgba(123, 104, 238, 0.15) 0%, transparent 50%),
radial-gradient(circle at 70% 70%, rgba(65, 105, 225, 0.15) 0%, transparent 50%);
z-index: 0;
}

/* Блестки */
body.sapphire-theme::before {
content: '💎 ✦ ✦';
position: fixed;
top: 10%;
left: 5%;
font-size: 40px;
opacity: 0.1;
pointer-events: none;
z-index: 1;
animation: sparkle 4s ease-in-out infinite;
}

@keyframes sparkle {
0%, 100% { opacity: 0.1; transform: rotate(0deg); }
50% { opacity: 0.3; transform: rotate(5deg); }
}

/* ===== РАССВЕТНАЯ ТЕМА ===== */
body.sunrise-theme {
--bg-primary: #2A1A2A;
--glass-bg: rgba(70, 40, 50, 0.7);
--glass-border: #FFB6C1;
--text-primary: #FFF0F5;
--text-secondary: #FFDAB9;
--text-tertiary: #FFB6C1;
--accent-start: #FFB6C1;
--accent-end: #FFA07A;
--accent-glow: rgba(255, 182, 193, 0.3);
--success-bg: rgba(255, 160, 122, 0.2);
--success-text: #FFDAB9;
--success-border: #FFB6C1;
--error-bg: rgba(244, 67, 54, 0.15);
--error-text: #FF6B6B;
--error-border: #FF5252;
background: linear-gradient(135deg, #2A1A2A 0%, #4A2A3A 100%);
color: #FFF0F5;
}

body.sunrise-theme .gradient-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at 30% 30%, rgba(255, 182, 193, 0.15) 0%, transparent 50%),
radial-gradient(circle at 70% 70%, rgba(255, 160, 122, 0.15) 0%, transparent 50%);
z-index: 0;
}

/* Облака на рассвете */
body.sunrise-theme::before {
content: '☁️ ☁️ ☁️';
position: fixed;
top: 10%;
right: 0;
font-size: 48px;
opacity: 0.1;
pointer-events: none;
z-index: 1;
animation: sunriseClouds 40s linear infinite;
}

@keyframes sunriseClouds {
0% { transform: translateX(100%); }
100% { transform: translateX(-100%); }
}

/* ===== ГОРНАЯ ТЕМА ===== */
body.mountain-theme {
--bg-primary: #1A2A2A;
--glass-bg: rgba(40, 50, 50, 0.7);
--glass-border: #9E9E9E;
--text-primary: #E0E0E0;
--text-secondary: #B0BEC5;
--text-tertiary: #78909C;
--accent-start: #9E9E9E;
--accent-end: #78909C;
--accent-glow: rgba(158, 158, 158, 0.3);
--success-bg: rgba(120, 144, 156, 0.2);
--success-text: #B0BEC5;
--success-border: #9E9E9E;
--error-bg: rgba(244, 67, 54, 0.15);
--error-text: #FF8A80;
--error-border: #FF6B6B;
background: linear-gradient(135deg, #1A2A2A 0%, #2A3A3A 100%);
color: #E0E0E0;
}

body.mountain-theme .gradient-bg {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: repeating-linear-gradient(
45deg,
rgba(158, 158, 158, 0.05) 0px,
rgba(158, 158, 158, 0.05) 20px,
transparent 20px,
transparent 40px
);
z-index: 0;
}

/* Горы */
body.mountain-theme::before {
content: '🏔️ 🏔️ 🏔️';
position: fixed;
bottom: 0;
left: 0;
right: 0;
font-size: 60px;
opacity: 0.1;
pointer-events: none;
z-index: 1;
text-align: center;
}

/* ===== ПРЕВЬЮ ДЛЯ ТЕМ ===== */
.theme-preview {
width: 80px;
height: 80px;
border-radius: 16px;
border: 2px solid transparent;
transition: var(--transition);
box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.theme-preview.classic-theme {
background: linear-gradient(135deg, #0A0A0F, #1A1A2A);
border: 2px solid #FF7E5F;
}

.theme-preview.cosmic-theme {
background: linear-gradient(135deg, #030518, #1A2A3A);
border: 2px solid #6C5B7B;
}

.theme-preview.light-theme {
background: linear-gradient(135deg, #F5F5F7, #E5E5E5);
border: 2px solid #FF6B6B;
}

.theme-preview.techno-theme {
background: linear-gradient(135deg, #1A1A1A, #0A2A0A);
border: 2px solid #00FF00;
}

.theme-preview.nature-theme {
background: linear-gradient(135deg, #1A3A2F, #2A5A3F);
border: 2px solid #64B5F6;
}

.theme-preview.ocean-theme {
background: linear-gradient(135deg, #0A1A2A, #1A3A4A);
border: 2px solid #4ECDC4;
}

.theme-preview.fire-theme {
background: linear-gradient(135deg, #2A0A0A, #4A1A1A);
border: 2px solid #FF6B6B;
}

.theme-preview.sapphire-theme {
background: linear-gradient(135deg, #0A0A2A, #1A1A4A);
border: 2px solid #7B68EE;
}

.theme-preview.sunrise-theme {
background: linear-gradient(135deg, #2A1A2A, #4A2A3A);
border: 2px solid #FFB6C1;
}

.theme-preview.mountain-theme {
background: linear-gradient(135deg, #1A2A2A, #2A3A3A);
border: 2px solid #9E9E9E;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
max-width: 500px;
margin: 0 auto;
padding: 20px;
position: relative;
z-index: 10;
}

/* ===== ПЕРЕКЛЮЧАТЕЛЬ ТЕМ ===== */
.theme-switcher {
position: fixed;
top: 15px;
right: 15px;
width: 44px;
height: 44px;
background: var(--glass-bg);
backdrop-filter: blur(10px);
border: 1px solid var(--glass-border);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: var(--transition);
z-index: 1000;
box-shadow: var(--glass-shadow);
}

.theme-switcher:hover {
transform: scale(1.1) rotate(15deg);
border-color: var(--accent-start);
box-shadow: 0 0 15px var(--accent-glow);
}

.theme-icon {
font-size: 24px;
line-height: 1;
}

.theme-tooltip {
position: absolute;
top: 100%;
right: 0;
background: var(--accent-start);
color: white;
padding: 5px 10px;
border-radius: 20px;
font-size: 12px;
white-space: nowrap;
opacity: 0;
transform: translateY(-10px);
pointer-events: none;
transition: var(--transition);
box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.theme-switcher:hover .theme-tooltip {
opacity: 1;
transform: translateY(5px);
}

/* ===== СТЕКЛЯННЫЕ КАРТОЧКИ (Glassmorphism) ===== */
.glass-card {
background: var(--glass-bg);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid var(--glass-border);
border-radius: 24px;
padding: 24px;
margin-bottom: 20px;
box-shadow: var(--glass-shadow);
transition: var(--transition);
}

.glass-card:hover {
transform: translateY(-2px);
border-color: rgba(255, 126, 95, 0.3);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ===== ЗАГОЛОВКИ ===== */
.header {
text-align: center;
margin-bottom: 30px;
}

h1 {
font-size: 32px;
margin-bottom: 10px;
}

.gradient-text {
background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
position: relative;
display: inline-block;
}

.gradient-text::after {
content: '';
position: absolute;
bottom: -5px;
left: 25%;
width: 50%;
height: 2px;
background: linear-gradient(90deg, transparent, var(--accent-start), var(--accent-end), transparent);
border-radius: 2px;
}

h2 {
font-size: 24px;
color: var(--text-primary);
margin: 15px 0;
}

.subtitle {
color: var(--text-secondary);
font-size: 16px;
}

.section-title {
color: var(--text-secondary);
margin: 20px 0 15px 0;
font-size: 18px;
font-weight: 600;
}

/* ===== КНОПКИ АВТОРИЗАЦИИ (ОБНОВЛЕНО) ===== */
.auth-btn {
background: var(--glass-bg);
backdrop-filter: blur(10px);
border: 1px solid var(--glass-border);
border-radius: 60px;
padding: 12px 16px;
width: 100%;
margin: 8px 0;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
gap: 12px;
}

.auth-btn .btn-icon {
font-size: 24px;
min-width: 32px;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 126, 95, 0.1);
border-radius: 50%;
}

.auth-btn .btn-text {
color: var(--text-primary);
font-size: 16px;
font-weight: 500;
}

.auth-btn:hover {
background: rgba(255, 126, 95, 0.15);
border-color: var(--accent-start);
transform: scale(1.02);
}

/* Стили для кнопки видеоинструкции */
.video-btn {
margin-top: 10px;
border-color: var(--accent-start);
background: linear-gradient(135deg, rgba(255, 126, 95, 0.1), rgba(254, 180, 123, 0.1));
}

.video-btn:hover {
background: linear-gradient(135deg, rgba(255, 126, 95, 0.2), rgba(254, 180, 123, 0.2));
border-color: var(--accent-start);
}

.btn-content {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 2px;
}

.btn-subtext {
font-size: 11px;
color: var(--text-secondary);
opacity: 0.8;
}

/* Основная кнопка действия */
.action-btn {
background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
border: none;
border-radius: 60px;
padding: 16px 24px;
width: 100%;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: space-between;
color: white;
font-weight: 600;
font-size: 16px;
position: relative;
overflow: hidden;
}

.action-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.6s ease;
}

.action-btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px var(--accent-glow);
}

.action-btn:hover::before {
left: 100%;
}

.btn-arrow {
transition: transform 0.3s ease;
}

.action-btn:hover .btn-arrow {
transform: translateX(5px);
}

/* Кнопка назад */
.back-btn {
background: transparent;
border: none;
color: var(--text-secondary);
font-size: 16px;
cursor: pointer;
padding: 12px 20px;
margin-bottom: 10px;
border-radius: 40px;
transition: var(--transition);
display: inline-flex;
align-items: center;
gap: 8px;
}

.back-btn:hover {
color: var(--accent-start);
transform: translateX(-5px);
}

/* ===== ПОЛЯ ВВОДА ===== */
.glass-input {
background: rgba(0, 0, 0, 0.5);
border: 1px solid var(--glass-border);
border-radius: 16px;
padding: 16px 20px;
width: 100%;
color: var(--text-primary);
font-size: 16px;
transition: border-color 0.2s ease;
backdrop-filter: none;
-webkit-backdrop-filter: none;
}

.glass-input:focus {
outline: none;
border-color: var(--accent-start);
box-shadow: 0 0 0 2px var(--accent-glow);
}

.glass-input::placeholder {
color: var(--text-tertiary);
}

.form-group {
margin-bottom: 20px;
}

.form-group label {
display: block;
margin-bottom: 8px;
color: var(--text-secondary);
font-weight: 500;
font-size: 14px;
letter-spacing: 0.5px;
}

.form-group small {
display: block;
margin-top: 8px;
color: var(--text-tertiary);
font-size: 12px;
}

/* ===== ДЕТАЛЬНАЯ ИНФОРМАЦИЯ ===== */
.info-grid {
display: flex;
flex-direction: column;
gap: 12px;
}

.info-row {
display: flex;
align-items: baseline;
padding: 4px 0;
border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.info-label {
min-width: 100px;
color: var(--text-secondary);
font-weight: 500;
font-size: 14px;
}

.info-value {
color: var(--text-primary);
font-weight: 600;
font-size: 15px;
margin-left: auto;
text-align: right;
}

/* ===== BENTO GRID ДЛЯ ЛОГИНОВ ===== */
.bento-grid {
display: grid;
grid-template-columns: 1fr;
gap: 16px;
margin: 20px 0;
}

/* ===== СТИЛИ ДЛЯ КНОПОК ===== */
/* Кнопка обновления */
.refresh-btn {
background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
border: none;
border-radius: 60px;
padding: 16px 24px;
width: 100%;
cursor: pointer;
transition: var(--transition);
color: white;
font-weight: 600;
font-size: 16px;
margin: 10px 0;
position: relative;
overflow: hidden;
}

.refresh-btn.cooldown {
background: var(--glass-bg);
border: 1px solid var(--glass-border);
color: var(--text-secondary);
cursor: not-allowed;
opacity: 0.8;
}

.refresh-btn.cooldown::before {
display: none;
}

.refresh-btn:hover:not(.cooldown) {
transform: translateY(-2px);
box-shadow: 0 10px 25px var(--accent-glow);
}

.refresh-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.6s ease;
}

.refresh-btn:hover:not(.cooldown)::before {
left: 100%;
}

/* Кнопка выхода */
.logout-btn {
background: var(--error-bg);
border: 1px solid var(--error-border);
border-radius: 60px;
padding: 14px 24px;
width: 100%;
cursor: pointer;
transition: var(--transition);
color: var(--error-text);
font-weight: 500;
margin-top: 20px;
}

.logout-btn:hover {
background: rgba(244, 67, 54, 0.25);
transform: translateY(-2px);
}

/* Контейнер для кнопок действий */
.action-buttons {
display: flex;
flex-direction: column;
gap: 10px;
margin-top: 20px;
}

/* Кнопка для получения совета */
.tip-toggle {
width: 100%;
background: linear-gradient(135deg, rgba(255, 126, 95, 0.1), rgba(254, 180, 123, 0.1));
border: 1px dashed var(--accent-start);
border-radius: 12px;
padding: 12px 16px;
margin: 8px 0 0 0;
color: var(--accent-start);
font-size: 14px;
font-weight: 500;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
transition: var(--transition);
position: relative;
overflow: hidden;
}

.tip-toggle:hover {
background: rgba(255, 126, 95, 0.2);
border-style: solid;
transform: translateY(-2px);
box-shadow: 0 5px 15px var(--accent-glow);
}

.tip-icon-roll {
font-size: 18px;
}

/* Контент совета */
.tip-content {
background: linear-gradient(135deg, rgba(30, 30, 40, 0.95), rgba(20, 20, 30, 0.95));
backdrop-filter: blur(10px);
border: 1px solid var(--glass-border);
border-radius: 0 0 16px 16px;
padding: 0;
margin-top: 0;
max-height: 0;
opacity: 0;
overflow: hidden;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
transform-origin: top;
position: relative;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tip-content.open {
max-height: 500px;
opacity: 1;
padding: 20px;
margin-top: 8px;
border-color: var(--accent-start);
}

/* Правильное отображение переносов строк в советах */
.tip-message {
white-space: pre-line;
line-height: 1.6;
font-size: 14px;
color: var(--text-secondary);
padding: 12px 5px;
}

.tip-message br {
display: block;
content: "";
margin-top: 8px;
}

/* Кнопка закрытия совета */
.tip-close {
position: absolute;
top: 10px;
right: 15px;
font-size: 20px;
color: var(--text-tertiary);
cursor: pointer;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: var(--transition);
background: rgba(255, 255, 255, 0.05);
}

.tip-close:hover {
background: rgba(255, 126, 95, 0.2);
color: var(--accent-start);
transform: rotate(90deg);
}

/* Анимации для рулона */
@keyframes rollDown {
0% {
max-height: 0;
opacity: 0;
transform: scaleY(0);
padding: 0 20px;
}
50% {
opacity: 0.5;
}
100% {
max-height: 500px;
opacity: 1;
transform: scaleY(1);
padding: 20px;
}
}

@keyframes rollUp {
0% {
max-height: 500px;
opacity: 1;
transform: scaleY(1);
padding: 20px;
}
50% {
opacity: 0.5;
}
100% {
max-height: 0;
opacity: 0;
transform: scaleY(0);
padding: 0 20px;
}
}

/* Строки деталей */
.detail-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
font-size: 14px;
border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
border-bottom: none;
}

.detail-label {
color: var(--text-tertiary);
font-weight: 500;
}

.detail-value {
color: var(--text-primary);
font-weight: 600;
text-align: right;
}

.detail-value.online {
color: var(--success-text);
}

.detail-value.offline {
color: var(--error-text);
}

/* Карточка логина */
.login-card {
background: var(--glass-bg);
backdrop-filter: blur(10px);
border: 1px solid var(--glass-border);
border-radius: 20px;
padding: 18px;
transition: var(--transition);
}

.login-card:hover {
transform: translateX(5px);
border-color: var(--accent-start);
background: rgba(40, 40, 50, 0.7);
}

/* Заголовок логина */
.login-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
padding-bottom: 8px;
border-bottom: 1px solid var(--glass-border);
}

.login-name {
font-weight: 700;
color: var(--text-primary);
font-size: 16px;
background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}

/* ===== МОДАЛЬНОЕ ОКНО ВЫБОРА ТЕМЫ ===== */
.theme-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(10px);
display: none;
align-items: center;
justify-content: center;
z-index: 2000;
animation: fadeIn 0.3s ease;
}

.theme-modal-content {
background: var(--glass-bg);
backdrop-filter: blur(20px);
border: 2px solid var(--accent-start);
border-radius: 24px;
padding: 30px;
max-width: 500px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
animation: slideUp 0.3s ease;
}

.theme-modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 1px solid var(--glass-border);
}

.theme-modal-header h3 {
color: var(--text-primary);
font-size: 20px;
margin: 0;
}

.theme-modal-close {
font-size: 24px;
cursor: pointer;
color: var(--text-tertiary);
transition: var(--transition);
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}

.theme-modal-close:hover {
color: var(--text-primary);
background: rgba(255, 255, 255, 0.1);
transform: rotate(90deg);
}

.theme-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 15px;
margin-top: 20px;
}

.theme-option {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
cursor: pointer;
padding: 10px;
border-radius: 12px;
transition: var(--transition);
}

.theme-option:hover {
background: rgba(255, 255, 255, 0.1);
transform: scale(1.05);
}

.theme-option span {
color: var(--text-primary);
font-size: 14px;
text-align: center;
}

/* ===== РЕЗУЛЬТАТЫ ПОИСКА ПО ФИО ===== */
.fio-results-list {
display: flex;
flex-direction: column;
gap: 10px;
}

.fio-result-item {
background: var(--glass-bg);
border: 1px solid var(--glass-border);
border-radius: 12px;
padding: 15px;
cursor: pointer;
transition: var(--transition);
}

.fio-result-item:hover {
border-color: var(--accent-start);
transform: translateX(5px);
}

.fio-name {
color: var(--text-primary);
font-weight: 600;
margin-bottom: 5px;
}

.fio-number {
color: var(--text-secondary);
font-size: 13px;
}

/* ===== ЗАГРУЗЧИК ===== */
.loader {
width: 48px;
height: 48px;
border: 3px solid rgba(255, 126, 95, 0.1);
border-top: 3px solid var(--accent-start);
border-right: 3px solid var(--accent-end);
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin: 30px auto;
}

.loader-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 200px;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.notification {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
padding: 14px 24px;
border-radius: 60px;
z-index: 1000;
animation: slideDown 0.3s ease;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
color: white;
font-weight: 500;
backdrop-filter: blur(10px);
text-align: center;
min-width: 280px;
}

.notification.error {
background: var(--error-bg);
border: 1px solid var(--error-border);
color: var(--error-text);
}

.notification.success {
background: var(--success-bg);
border: 1px solid var(--success-border);
color: var(--success-text);
}

.notification.info {
background: rgba(33, 150, 243, 0.15);
border: 1px solid rgba(33, 150, 243, 0.3);
color: #90CAF9;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

@keyframes slideDown {
from {
transform: translate(-50%, -100%);
opacity: 0;
}
to {
transform: translate(-50%, 0);
opacity: 1;
}
}

@keyframes slideUp {
from {
transform: translateY(100%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}

@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 480px) {
.container {
padding: 16px;
}
h1 {
font-size: 28px;
}
.glass-card {
padding: 20px;
}
.info-row {
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.info-label {
min-width: auto;
}
.info-value {
margin-left: 0;
text-align: left;
}
.detail-row {
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.detail-label {
width: 100%;
}
.detail-value {
width: 100%;
text-align: left;
}
}

/* ===== КНОПКА ЧАТА ===== */
.chat-btn {
background: linear-gradient(135deg, #4ECDC4, #45B7D1);
border: none;
border-radius: 60px;
padding: 14px 24px;
width: 100%;
cursor: pointer;
transition: var(--transition);
color: white;
font-weight: 500;
margin: 10px 0;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
position: relative;
overflow: hidden;
}

.chat-btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(78, 205, 196, 0.4);
}

.chat-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.6s ease;
}

.chat-btn:hover::before {
left: 100%;
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
.chat-btn {
padding: 12px 20px;
font-size: 14px;
}
}

/* ===== МОДАЛЬНОЕ ОКНО ЧАТА ===== */
.chat-modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90%;
max-width: 400px;
height: 600px;
max-height: 80vh;
z-index: 2000;
display: none; /* Скрыто по умолчанию */
flex-direction: column;
animation: modalFadeIn 0.3s ease;
/* 👇 ЭТИХ СВОЙСТВ НЕ ХВАТАЛО */
background: var(--glass-bg);
backdrop-filter: blur(20px);
border: 2px solid var(--accent-start);
border-radius: 24px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
overflow: hidden;
}

.chat-modal-content {
display: flex;
flex-direction: column;
height: 100%;
background: transparent; /* Фон будет у родителя */
}

.chat-modal-header {
padding: 20px;
border-bottom: 1px solid var(--glass-border);
display: flex;
justify-content: space-between;
align-items: center;
background: rgba(0, 0, 0, 0.2);
}

.chat-modal-header h3 {
color: var(--text-primary);
font-size: 18px;
margin: 0;
}

.chat-modal-close {
font-size: 24px;
cursor: pointer;
color: var(--text-tertiary);
transition: var(--transition);
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}

.chat-modal-close:hover {
color: var(--accent-start);
background: rgba(255, 255, 255, 0.1);
transform: rotate(90deg);
}

.chat-messages {
flex: 1;
overflow-y: auto;
padding: 20px;
display: flex;
flex-direction: column;
gap: 12px;
}

.message {
max-width: 80%;
padding: 10px 14px;
border-radius: 18px;
animation: messageSlide 0.3s ease;
word-wrap: break-word;
}

.message.user {
background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
color: white;
align-self: flex-end;
border-bottom-right-radius: 4px;
}

.message.operator {
background: var(--glass-bg);
border: 1px solid var(--glass-border);
color: var(--text-primary);
align-self: flex-start;
border-bottom-left-radius: 4px;
}

.message.system {
background: rgba(255, 255, 255, 0.1);
color: var(--text-secondary);
align-self: center;
font-size: 12px;
padding: 6px 12px;
border-radius: 20px;
}

.message-time {
font-size: 10px;
opacity: 0.7;
margin-top: 4px;
text-align: right;
}

/* ===== КОНТЕЙНЕР ВВОДА СООБЩЕНИЙ ===== */
.chat-input-area {
padding: 15px;
border-top: 1px solid var(--glass-border);
display: flex;
gap: 10px;
background: rgba(0, 0, 0, 0.2);
align-items: center;
}

.chat-input {
flex: 1;
background: rgba(255, 255, 255, 0.1);
border: 1px solid var(--glass-border);
border-radius: 30px;
padding: 12px 18px;
color: var(--text-primary);
font-size: 14px;
transition: var(--transition);
}

.chat-input:focus {
outline: none;
border-color: var(--accent-start);
box-shadow: 0 0 0 2px var(--accent-glow);
}

.chat-input::placeholder {
color: var(--text-tertiary);
}

.chat-send-btn {
width: 48px;
height: 48px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
border: none;
color: white;
font-size: 20px;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}

.chat-send-btn:hover {
transform: scale(1.1);
box-shadow: 0 0 20px var(--accent-glow);
}

/* ===== КНОПКА ЗАГРУЗКИ ФАЙЛОВ ===== */
.chat-file-btn {
width: 64px;
height: 48px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
border: 1px solid var(--glass-border);
color: var(--text-secondary);
font-size: 22px;
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}

.chat-file-btn:hover {
background: rgba(255, 255, 255, 0.2);
color: var(--accent-start);
transform: scale(1.1);
}

/* ===== КОНТЕЙНЕР ПРЕВЬЮ ФАЙЛОВ ===== */
.file-preview-container {
padding: 10px 15px;
background: rgba(0, 0, 0, 0.2);
border-top: 1px solid var(--glass-border);
display: none;
}

.file-preview-list {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 10px;
}

.file-preview-item {
position: relative;
width: 80px;
height: 80px;
border-radius: 12px;
overflow: hidden;
background: rgba(255, 255, 255, 0.1);
border: 1px solid var(--glass-border);
}

.file-preview-item img,
.file-preview-item video {
width: 100%;
height: 100%;
object-fit: cover;
}

.file-preview-item .file-name {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.7);
color: white;
font-size: 10px;
padding: 2px 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.file-preview-item .remove-file {
position: absolute;
top: 4px;
right: 4px;
width: 20px;
height: 20px;
border-radius: 50%;
background: rgba(244, 67, 54, 0.9);
color: white;
border: none;
cursor: pointer;
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
}

.clear-files-btn {
background: var(--error-bg);
border: 1px solid var(--error-border);
color: var(--error-text);
padding: 6px 12px;
border-radius: 20px;
font-size: 12px;
cursor: pointer;
transition: var(--transition);
}

.clear-files-btn:hover {
background: rgba(244, 67, 54, 0.3);
}

/* ===== СООБЩЕНИЕ С ФАЙЛОМ ===== */
.message .file-attachment {
margin-top: 8px;
border-radius: 12px;
overflow: hidden;
max-width: 200px;
}

.message .file-attachment img,
.message .file-attachment video {
width: 100%;
max-height: 200px;
object-fit: cover;
display: block;
}

.message .file-attachment .file-info {
background: rgba(0, 0, 0, 0.3);
padding: 6px 10px;
font-size: 11px;
color: var(--text-secondary);
}

/* ===== МОДАЛЬНОЕ ОКНО ОШИБКИ ФОРМАТА ===== */
.format-error-modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: var(--glass-bg);
backdrop-filter: blur(20px);
border: 2px solid var(--error-border);
border-radius: 24px;
padding: 30px;
max-width: 400px;
width: 90%;
z-index: 3000;
animation: modalFadeIn 0.3s ease;
}

.format-error-modal h4 {
color: var(--error-text);
margin-bottom: 15px;
font-size: 18px;
}

.format-error-modal p {
color: var(--text-secondary);
margin-bottom: 20px;
font-size: 14px;
line-height: 1.5;
}

.format-error-modal .supported-formats {
background: var(--success-bg);
border: 1px solid var(--success-border);
border-radius: 12px;
padding: 12px;
margin-bottom: 20px;
}

.format-error-modal .supported-formats h5 {
color: var(--success-text);
font-size: 13px;
margin-bottom: 8px;
}

.format-error-modal .supported-formats ul {
color: var(--text-secondary);
font-size: 12px;
padding-left: 20px;
margin: 0;
}

.format-error-modal .close-error-btn {
background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
border: none;
border-radius: 30px;
padding: 10px 24px;
color: white;
font-weight: 600;
cursor: pointer;
width: 100%;
transition: var(--transition);
}

.format-error-modal .close-error-btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px var(--accent-glow);
}

.chat-status {
padding: 10px 20px;
border-top: 1px solid var(--glass-border);
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--text-secondary);
}

.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #4CAF50;
animation: pulse 2s infinite;
}

@keyframes pulse {
0% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(1.2); }
100% { opacity: 1; transform: scale(1); }
}

.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(5px);
z-index: 1999;
animation: fadeIn 0.3s ease;
}

@keyframes modalFadeIn {
from {
opacity: 0;
transform: translate(-50%, -40%);
}
to {
opacity: 1;
transform: translate(-50%, -50%);
}
}

@keyframes messageSlide {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

/* Мобильная адаптация для чата (ИСПРАВЛЕННАЯ ВЕРСИЯ) */
@media (max-width: 768px) {
    .chat-modal {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
        border: none;
        animation: slideUp 0.3s ease;
        position: fixed;
        z-index: 2000;
    }

    .chat-modal .chat-modal-content {
        border-radius: 0;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
    }

    .chat-modal .chat-modal-header {
        padding: 15px;
        flex-shrink: 0;
        background: rgba(0, 0, 0, 0.2);
        border-bottom: 1px solid var(--glass-border);
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 15px;
        min-height: 0;
    }

    /* 🔥 ИСПРАВЛЕНИЕ: Область ввода сообщения с учётом навигации */
    .chat-input-area {
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        gap: 10px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        background: rgba(0, 0, 0, 0.3);
        border-top: 1px solid var(--glass-border);
        position: sticky;
        bottom: 0;
    }

    /* Кнопка прикрепления файла */
    .chat-file-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--glass-border);
        border-radius: 50%;
        cursor: pointer;
    }

    /* Поле ввода - занимает всё свободное место */
    .chat-input {
        flex: 1;
        min-width: 0;
        font-size: 16px;
        padding: 12px 16px;
        margin: 0;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--glass-border);
        border-radius: 30px;
        color: var(--text-primary);
    }

    /* Кнопка отправки */
    .chat-send-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
        border: none;
        border-radius: 50%;
        color: white;
        cursor: pointer;
    }

    .message {
        max-width: 85%;
    }

    .file-preview-item {
        width: 70px;
        height: 70px;
    }

    /* Контейнер превью файлов */
    .file-preview-container {
        padding: 10px;
        background: rgba(0, 0, 0, 0.2);
        border-top: 1px solid var(--glass-border);
        flex-shrink: 0;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .chat-input-area {
        padding: 10px;
        gap: 8px;
    }

    .chat-file-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .chat-send-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .chat-input {
        padding: 10px 14px;
        font-size: 15px;
    }

    .file-preview-item {
        width: 60px;
        height: 60px;
    }
}

/* ===== СТИЛИ ДЛЯ ЭКРАНА ПОМОЩИ ===== */
.help-screen .glass-card {
    margin-bottom: 20px;
}

.help-description {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.form-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-align: center;
}

.help-screen textarea.glass-input {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Стили для новой кнопки помощи */
.help-btn {
    margin-top: 20px;
    border-color: var(--accent-start);
    background: linear-gradient(135deg, rgba(255, 126, 95, 0.15), rgba(254, 180, 123, 0.15));
    border-width: 2px;
}

.help-btn:hover {
    background: linear-gradient(135deg, rgba(255, 126, 95, 0.25), rgba(254, 180, 123, 0.25));
    transform: scale(1.02);
}

.help-btn .btn-icon {
    font-size: 24px;
    background: rgba(255, 126, 95, 0.2);
}

/* Анимация для формы */
#requestForm {
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== СТИЛИ ДЛЯ ФОРМЫ ВНУТРИ ЧАТА ===== */
.chat-form-container {
    padding: 20px;
    background: var(--glass-bg);
    border-radius: 16px;
    margin: 10px 0;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.chat-form .form-group {
    margin-bottom: 0;
}

.chat-form .glass-input {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--glass-border);
}

.chat-form .action-btn {
    margin-top: 10px;
}

.form-note {
    color: var(--text-tertiary);
    font-size: 12px;
    text-align: center;
    margin-top: 10px;
}

/* ===== ПУЛЬСАЦИЯ КНОПКИ ЧАТА ===== */
@keyframes chatPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(78, 205, 196, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(78, 205, 196, 0);
    }
}

.chat-btn.pulse {
    animation: chatPulse 1.5s ease-in-out infinite;
    position: relative;
}

/* ===== ВСПЛЫВАЮЩАЯ ПОДСКАЗКА ===== */
.chat-notification {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: linear-gradient(135deg, #4ECDC4, #45B7D1);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideInRight 0.3s ease;
}

.chat-notification:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.chat-notification .notification-icon {
    font-size: 18px;
    animation: bellShake 0.5s ease;
}

.chat-notification .notification-text {
    font-size: 14px;
}

/* Анимация появления подсказки */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Анимация исчезновения подсказки */
.chat-notification.hide {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Анимация колокольчика */
@keyframes bellShake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .chat-notification {
        bottom: 80px;
        right: 15px;
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .chat-notification .notification-icon {
        font-size: 16px;
    }
}

/* ===== ФИКСИРОВАННЫЕ КНОПКИ НАВИГАЦИИ ===== */
.fixed-buttons {
    position: fixed;
    top: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 1000;
    padding: 0 15px;
    flex-wrap: wrap;
}

.fixed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: var(--glass-shadow);
}

.fixed-btn .btn-icon {
    font-size: 18px;
}

.fixed-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-start);
    box-shadow: 0 8px 20px var(--accent-glow);
}

/* Цвета для разных кнопок */
.pay-btn:hover {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(69, 183, 209, 0.2));
    border-color: #4ECDC4;
}

.lk-btn:hover {
    background: linear-gradient(135deg, rgba(255, 126, 95, 0.2), rgba(254, 180, 123, 0.2));
    border-color: #FF7E5F;
}

.sales-btn:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 142, 83, 0.2));
    border-color: #FF6B6B;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .fixed-buttons {
        top: 10px;
        gap: 8px;
    }
    
    .fixed-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .fixed-btn .btn-icon {
        font-size: 14px;
    }
}

/* Для маленьких экранов — кнопки в 2 ряда */
@media (max-width: 480px) {
    .fixed-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .fixed-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* Отступ сверху для контента, чтобы не перекрывался фиксированными кнопками */
.container {
    padding-top: 80px !important;
}

/* Для мобильных устройств отступ меньше */
@media (max-width: 768px) {
    .container {
        padding-top: 70px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding-top: 90px !important;
    }
}
/* Для телефонов — опускаем кнопку смены темы */
@media (max-width: 768px) {
    .theme-switcher {
        top: 45px !important;
    }
}
