/* === 1. ГЛОБАЛЬНЫЕ НАСТРОЙКИ === */
:root {
	--slate-50: #f8fafc;
	--slate-100: #f1f5f9;
	--slate-200: #e2e8f0;
	--slate-300: #cbd5e1;
	--slate-400: #94a3b8;
	--slate-500: #64748b;
	--slate-600: #475569;
	--slate-800: #1e293b;
	--slate-900: #0f172a;
	--color-primary: #0ea5e9;
	--bg-light: #fbfaf8;
	--bg-dark: #211911;
	--header-height: 70px;
	--font-stack: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html.light {
	--text-main: var(--slate-900);
	--text-muted: var(--slate-600);
	--bg-body: var(--bg-light);
	--border-color: rgba(0,0,0,0.1);
	--card-bg: #ffffff;
	--nav-bg: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
	font-family: var(--font-stack);
	background-color: var(--bg-body);
	color: var(--text-main);
	display: flex; flex-direction: column; min-height: 100vh;overflow-x:hidden
}

a{text-decoration:none}

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Утилиты сетки и контейнера */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; width: 100%; }
@media (min-width: 640px) { .container { padding: 0 2.5rem; } }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* Кнопки */
.btn-primary {
	background-color: var(--color-primary); color: white; font-weight: 700;
	padding: 0.6rem 1.2rem; border-radius: 0.5rem;
	box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
	transition: opacity 0.2s, transform 0.1s;
	white-space: nowrap;
}
.btn-primary:active { transform: scale(0.96); }

/* === 2. ХЕДЕР (Адаптивный) === */
.site-header-wrapper {
	border-bottom: 1px solid var(--border-color);
	background-color: var(--nav-bg);
	position: sticky; top: 0; z-index: 100;
	backdrop-filter: blur(8px);
	background-color: rgba(255, 255, 255, 0.9);
}
html.dark .site-header-wrapper { background-color: rgba(15, 23, 42, 0.9); }

.site-header {
	height: var(--header-height);
	display: flex; justify-content: space-between; align-items: center;
}

.logo-container { display: flex; align-items: center; gap: 0.75rem; z-index: 60; }
.logo-icon { width: 2rem; height: 2rem; color: var(--color-primary); }
.logo-text { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }

/* === ЕДИНОЕ МЕНЮ (ГЛАВНАЯ ЛОГИКА) === */

/* Общие стили для ссылок */
.nav-link { 
    color: var(--slate-500); 
    font-weight: 600; 
    text-decoration: none; 
    font-size: 1.1rem; /* Размер для мобилки по умолчанию */
    transition: color 0.2s; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}
.nav-link:hover { color: var(--color-primary); }
html.dark .nav-link { color: var(--slate-400); }
html.dark .nav-link:hover { color: var(--color-primary); }

.balance-card {
	padding: 1rem; background: var(--slate-100); border-radius: 1rem; 
	display: flex; align-items: center; justify-content: space-between;
}
html.dark .balance-card { background: var(--slate-800); }


/* --- МОБИЛЬНАЯ ВЕРСИЯ (по умолчанию для экранов < 1024px) --- */
.main-nav {
    position: fixed; top: 0; right: 0; bottom: 0;
	width: 85%; max-width: 320px;
	background-color: var(--nav-bg);
	z-index: 100;
	box-shadow: -5px 0 25px rgba(0,0,0,0.1);
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	padding: 1.5rem;
	display: flex; flex-direction: column; gap: 2rem;
	border-left: 1px solid var(--border-color);
	height:100vh;
}
.main-nav.open { transform: translateX(0); }

.main-nav a{text-decoration:none}

.nav-mobile-header { display: flex; justify-content: space-between; align-items: center; }
.nav-links-wrapper { display: flex; flex-direction: column; gap: 1.5rem; }

/* Утилиты отображения */
.desktop-only { display: none !important; }
.mobile-only { display: flex; } /* Или block, зависит от контекста */

.nav-actions{display: flex;gap: 20px;justify-content: space-between;}


/* --- ДЕСКТОПНАЯ ВЕРСИЯ (>= 1024px) --- */
@media (min-width: 1024px) {
    .main-nav {
        position: static;
        width: auto; max-width: none;
        height: auto;
        transform: none;
        background: transparent;
        box-shadow: none;
        padding: 0;
        border: none;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        z-index: auto;
    }

    .nav-link { font-size: 0.95rem; }
    .nav-links-wrapper { flex-direction: row; gap: 2rem; align-items: center; }
    
    .nav-mobile-header { display: none; }
    .mobile-only { display: none !important; }
    .desktop-only { display: inline-flex !important; }
    
    /* Скрываем иконки в ссылках на десктопе, если они внутри .mobile-only не скрылись (на всякий случай) */
    .nav-icon { display: none; }
}

/* Mobile Burger Button */
.burger-btn { display: flex; align-items: center; padding: 0.5rem; margin-right: -0.5rem; }
@media (min-width: 1024px) { .burger-btn { display: none; } }

/* Оверлей */
.mobile-drawer-overlay {
position: fixed; inset: 0; background: rgba(0,0,0,0.5); 
    z-index: 40; 
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}
.mobile-drawer-overlay.open { opacity: 1; pointer-events: auto; }


/* === 4. ГЛАВНЫЙ КОНТЕНТ (остальные стили без изменений) === */
.hero-text { text-align: center; margin: 3rem auto 2rem; max-width: 800px; }
h1 { font-size: 2rem; font-weight: 900; margin-bottom: 1rem; line-height: 1.1; }
@media (min-width: 640px) { h1 { font-size: 3.5rem; } }
.hero-desc { color: var(--text-muted); font-size: 1.125rem; line-height: 1.6; }

/* Категории (Табы) */
.category-section { margin-bottom: 2rem; }

/* Desktop tabs */
.category-container { display: none; justify-content: center; flex-wrap: wrap; gap: 0.5rem; }
@media (min-width: 768px) { .category-container { display: flex; } }

.category-tab {
	padding: 0.5rem 1.5rem; border-radius: 9999px;
	border: 1px solid var(--slate-300); color: var(--slate-600); font-weight: 700;
	transition: all 0.2s; background: transparent;
}
html.dark .category-tab { border-color: var(--slate-600); color: var(--slate-400); }
.category-tab:hover { border-color: var(--color-primary); color: var(--color-primary); }
.category-tab.active { background-color: var(--color-primary); color: white; border-color: var(--color-primary); }

/* Mobile Select */
.mobile-select-wrapper { position: relative; max-width: 100%; margin: 0 auto; }
@media (min-width: 768px) { .mobile-select-wrapper { display: none; } }
select {
	width: 100%; padding: 0.8rem 1rem; border-radius: 0.75rem;
	border: 1px solid var(--slate-300); background: white; 
	font-weight: 700; font-size: 1rem; appearance: none;
	color: var(--slate-900);
}
html.dark select { background: var(--slate-800); border-color: var(--slate-600); color: white; }

/* === 5. СЛАЙДЕР === */
.slider-card {
	background-color: var(--card-bg); padding: 1rem; border-radius: 1.5rem;
	box-shadow: 0 20px 40px -5px rgba(0,0,0,0.1); margin-bottom: 4rem;
	border: 1px solid var(--border-color);
}
@media (min-width: 640px) { .slider-card { padding: 1.5rem; } }

.slider-wrapper {
	position: relative; width: 100%; border-radius: 1rem;
	overflow: hidden; 
	border: 1px solid rgba(0,0,0,0.1);
	transform: translateZ(0); 
}

.ba-slider-root {
	position: relative; width: 100%; aspect-ratio: 4/3; 
	cursor: ew-resize; user-select: none;
}
@media (min-width: 640px) { .ba-slider-root { aspect-ratio: 16/9; } }

.ba-img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* БЫЛО: cover. СТАЛО: contain (вписать целиком) */
    display: block; 
    position: relative; 
    z-index: 2; /* Чтобы быть над размытым фоном */
}
.ba-absolute { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ba-before { z-index: 10; will-change: clip-path; }

.ba-handle-line { 
	position: absolute; top: 0; bottom: 0; width: 4px; background: #fff; z-index: 20; 
	transform: translateX(-50%); box-shadow: 0 0 10px rgba(0,0,0,0.3); pointer-events: none;
}
.ba-handle-circle {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: 48px; height: 48px; background: white; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; color: var(--color-primary);
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Инфо-панель */
.style-info-panel {
	position: relative; padding: 1rem 0 0 0;
	display: flex; flex-direction: column; gap: 1rem; text-align: center;
	z-index: 30;
}
@media (min-width: 768px) {
	.style-info-panel {
		position: absolute; bottom: 1.5rem; left: 1.5rem; right: auto; width: auto;
		padding: 1.25rem; background-color: rgba(0, 0, 0, 0.7); 
		backdrop-filter: blur(12px); border-radius: 1rem; 
		border: 1px solid rgba(255,255,255,0.15);
		text-align: left; flex-direction: row; align-items: center;
		box-shadow: 0 10px 20px -5px rgba(0,0,0,0.4);
	}
}

.style-title { font-size: 1.25rem; font-weight: 700; color: var(--text-main); }
.style-desc { font-size: 0.9rem; color: var(--text-muted); }
@media (min-width: 768px) {
	.style-title { color: white; }
	.style-desc { color: #e2e8f0; }
}

/* Навигация слайдера */
.controls-wrapper { display: flex; flex-direction: column; align-items: center; margin-top: 1.5rem; gap: 1rem; }
.controls-label { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-400); }

.nav-btn {
	width: 3.5rem; height: 3.5rem; display: flex; align-items: center; justify-content: center;
	border-radius: 50%; background: var(--slate-100); color: var(--slate-600);
	transition: all 0.2s;
}
html.dark .nav-btn { background: var(--slate-800); color: var(--slate-300); }
.nav-btn:hover { background: var(--color-primary); color: white; transform: scale(1.1); }

.dots-container { display: flex; gap: 0.6rem; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--slate-300); cursor: pointer; transition: all 0.3s; }
html.dark .dot { background: var(--slate-700); }
.dot.active { background: var(--color-primary); transform: scale(1.2); }

footer { text-align: center; padding: 2rem; border-top: 1px solid var(--border-color); margin-top: auto; color: var(--slate-500); font-size: 0.9rem; }

/* Loader & Blur */
#loader { position: absolute; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.3); transition: opacity 0.3s; pointer-events: none;}
#bg-blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; filter: blur(30px); transform: scale(1.2); z-index: 0; }
.opacity-0 { opacity: 0; }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.slider-expand-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.2s;
}
.slider-expand-btn:hover { background: rgba(0, 0, 0, 0.8); transform: scale(1.1); }

/* Режим ПОЛНОГО ЭКРАНА */
body.fullscreen-active { overflow: hidden; } /* Блокируем скролл сайта */

.slider-wrapper.fullscreen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    border-radius: 0;
    border: none;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* В полноэкранном режиме меняем пропорции корневого элемента */
.slider-wrapper.fullscreen .ba-slider-root {
    aspect-ratio: unset; /* Убираем фиксированные пропорции */
    height: 100%;
    width: 100%;
    max-height: 100vh;
}

/* Скрываем инфо-панель в фуллскрине, чтобы не мешала (опционально) */
.slider-wrapper.fullscreen .style-info-panel {
    display: none; 
}

/* Кнопка закрытия в фуллскрине */
.slider-wrapper.fullscreen .slider-expand-btn {
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
}



/* === БЛОК ONE PRICE (Честная цена) === */

.one-price-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding: 2rem 0;
}

@media (min-width: 900px) {
    .one-price-wrapper {
        grid-template-columns: 1.2fr 1fr;
        gap: 5rem;
    }
}

/* Левая часть (Текст) */
.op-badge {
    display: inline-block;
    background: rgba(14, 165, 233, 0.1);
    color: var(--color-primary);
    font-weight: 800;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 99px;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.op-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}
@media (min-width: 640px) { .op-title { font-size: 3rem; } }

.op-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Список преимуществ */
.op-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.op-features li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.op-icon {
    width: 40px; height: 40px;
    background: var(--slate-100);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
html.dark .op-icon { background: var(--slate-800); }

.op-features strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}
.op-features span {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Правая часть (Карточка) */
.op-card-container {
    position: relative;
    padding: 20px;
}

.op-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.15);
    z-index: 10;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease;
}
.op-card:hover { transform: translateY(-5px); }

.op-card-content {
    padding: 3rem 2rem;
    position: relative;
    z-index: 2;
}

/* Свечение внутри карточки */
.op-card-glow {
    position: absolute; top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, var(--color-primary), #a855f7);
}

.op-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.op-price-block {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    line-height: 1;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.op-val { font-size: 6rem; font-weight: 900; letter-spacing: -0.03em; }
.op-cur { font-size: 2.5rem; font-weight: 600; margin-top: 1rem; }

.op-subtext {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 2rem;
}

.op-divider {
    height: 1px;
    background: var(--slate-200);
    margin: 0 auto 2rem;
    width: 60%;
}
html.dark .op-divider { background: var(--slate-700); }

.btn-lg-cta {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
    text-decoration: none; /* Если это <a> */
}

.op-guarantee {
    font-size: 0.85rem;
    color: var(--slate-400);
}

/* Декоративные пятна сзади */
.op-blob-1, .op-blob-2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    opacity: 0.6;
}

.op-blob-1 {
    width: 150px; height: 150px;
    background: var(--color-primary);
    top: -20px; right: -20px;
}

.op-blob-2 {
    width: 200px; height: 200px;
    background: #a855f7; /* Фиолетовый акцент */
    bottom: -40px; left: -40px;
}


/* === БЛОК СРАВНЕНИЯ === */

.section-desc {
    font-size: 1.1rem; color: var(--text-muted); line-height: 1.6;
}

.comparison-wrapper {
    position: relative;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    position: relative;
}

/* На десктопе делаем две колонки */
@media (min-width: 900px) {
    .comparison-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: stretch;
    }
}

/* Центральный кружок VS */
.vs-badge {
    display: none;
}
@media (min-width: 900px) {
    .vs-badge {
        display: flex;
        position: absolute;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        width: 60px; height: 60px;
        background: var(--card-bg);
        border: 4px solid var(--slate-100);
        border-radius: 50%;
        align-items: center; justify-content: center;
        font-weight: 900; font-size: 1.2rem;
        color: var(--slate-400);
        z-index: 10;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }
    html.dark .vs-badge { background: var(--slate-900); border-color: var(--slate-800); }
}

/* Карточки */
.comp-card {
    border-radius: 2rem;
    padding: 2.5rem;
    position: relative;
    border: 1px solid transparent;
}

/* Стиль "Старый способ" */
.old-way {
    background: var(--slate-50);
    border-color: var(--slate-200);
}
html.dark .old-way { background: rgba(255,255,255,0.03); border-color: var(--slate-800); }

/* Стиль "Новый способ" (AiMio) */
.new-way {
    background: var(--card-bg);
    border: 2px solid var(--color-primary);
    box-shadow: 0 20px 40px -10px rgba(14, 165, 233, 0.15);
    transform: scale(1.02); /* Чуть больше, чтобы выделить */
}
@media (max-width: 899px) { .new-way { transform: none; } }

.comp-header {
    display: flex; flex-direction: column; gap: 0.5rem;
    margin-bottom: 2rem; padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.comp-header h3 { font-size: 1.5rem; font-weight: 800; }

.comp-badge {
    display: inline-block; align-self: flex-start;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    padding: 4px 10px; border-radius: 6px; letter-spacing: 0.05em;
}
.comp-badge.bad { background: #fee2e2; color: #ef4444; } /* Красный */
.comp-badge.good { background: #dcfce7; color: #166534; } /* Зеленый */

/* Списки */
.comp-list { list-style: none; display: flex; flex-direction: column; gap: 1.5rem; }
.comp-list li { display: flex; gap: 1rem; align-items: flex-start; }

.icon-bad, .icon-good {
    font-size: 1.5rem; line-height: 1; flex-shrink: 0;
    width: 32px; text-align: center;
}
.icon-bad { filter: grayscale(1); opacity: 0.7; }

.comp-list strong { display: block; font-size: 1.05rem; margin-bottom: 0.25rem; color: var(--text-main); }
.comp-list p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.4; margin: 0; }









/* === МОДАЛЬНОЕ ОКНО ЗАГРУЗКИ (остальной CSS без изменений) === */
.upload-modal-overlay {
    position: fixed; inset: 0; 
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px);
    z-index: 200; 
    display: flex; justify-content: center; align-items: center;
    padding: 1rem;
    opacity: 1; transition: opacity 0.3s;
}
.upload-modal-overlay.hidden { opacity: 0; pointer-events: none; }

.upload-modal-content {
    background: var(--card-bg);
    width: 100%; max-width: 500px;
    padding: 2rem; border-radius: 1.5rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(0); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}
.upload-modal-overlay.hidden .upload-modal-content { transform: translateY(20px); }

.modal-close-btn {
    position: absolute; top: 1rem; right: 1rem;
    color: var(--slate-400); padding: 0.5rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.modal-close-btn:hover { background: var(--slate-100); color: var(--slate-600); }
html.dark .modal-close-btn:hover { background: var(--slate-800); color: var(--slate-200); }

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--slate-300);
    border-radius: 1rem;
    padding: 3rem 1.5rem;
    background: var(--slate-50);
    position: relative;
    transition: all 0.2s;
    overflow: hidden;
}
html.dark .drop-zone { background: var(--slate-900); border-color: var(--slate-600); }

.drop-zone.drag-over {
    border-color: var(--color-primary);
    background: rgba(14, 165, 233, 0.05);
    transform: scale(0.98);
}

.upload-loader {
    position: absolute; inset: 0;
    background: var(--card-bg);
    display: flex; flex-direction: column; 
    justify-content: center; align-items: center;
    z-index: 10;
}

/* Статусы */
.status-error { color: #ef4444; margin-top: 0.5rem; }
.status-success { color: #10b981; margin-top: 0.5rem; }

/* === АНИМАЦИЯ СКАНЕРА === */
.scan-container {
    position: relative;
    width: 100%;
    max-height: 300px;
    border-radius: 1rem;
    overflow: hidden;
    background: #000;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

#scan-preview-img {
    width: 100%;
    height: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
    opacity: 0.6;
    transition: opacity 0.5s;
}

.scanner-line {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: #0ea5e9;
    box-shadow: 0 0 10px #0ea5e9, 0 0 20px #0ea5e9;
    z-index: 10;
    animation: scanMove 2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.scanner-grid {
    position: absolute; inset: 0;
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 5;
    opacity: 0.5;
}

@keyframes scanMove {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.ai-status-box {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}

.ai-badge {
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em;
    background: var(--slate-200); color: var(--slate-600);
    padding: 2px 8px; border-radius: 4px;
}
html.dark .ai-badge { background: var(--slate-700); color: var(--slate-300); }

.ai-message {
    font-family: monospace;
    font-size: 1rem; font-weight: 600;
    min-height: 1.5em;
    color: var(--text-main);
}

.scan-container.success #scan-preview-img { opacity: 1; }
.scan-container.success .scanner-line { display: none; }
.scan-container.success .scanner-grid { display: none; }

.success-overlay {
    position: absolute; inset: 0;
    background: rgba(16, 185, 129, 0.2);
    display: flex; align-items: center; justify-content: center;
    z-index: 20;
    animation: fadeIn 0.3s ease-out;
}
.success-icon {
    width: 64px; height: 64px;
    background: #10b981; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    transform: scale(0);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.1s;
}

@keyframes popIn { to { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.hex-grid {
    position: absolute; inset: 0;
    display: flex; flex-wrap: wrap;
    opacity: 1; mix-blend-mode: overlay;
}
.hex-cell {
    width: 10%; height: 20%;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    transition: background 0.2s;
}
.hex-cell.active {
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
}

/* === ЭКРАН РЕГИСТРАЦИИ (AUTH STEP) === */
.auth-step {
    padding: 1rem 0;
    animation: slideUpFade 0.5s ease-out;
}

.auth-icon-wrapper {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--color-primary), #3b82f6);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.5);
    transform: scale(0);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 0.2s;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === СТРАНИЦА ТАРИФОВ === */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 4rem;
    align-items: start;
}
@media (min-width: 768px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

.pricing-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column; height: 100%;
}
.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -5px rgba(0,0,0,0.1);
}
.pricing-card.featured {
    border: 2px solid var(--color-primary);
    box-shadow: 0 10px 30px -10px rgba(14, 165, 233, 0.25);
    transform: scale(1.02);
    z-index: 10;
}
.pricing-card.featured:hover { transform: scale(1.02) translateY(-5px); }

.popular-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--color-primary); color: white;
    font-size: 0.85rem; font-weight: 700; padding: 4px 12px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}

.card-header { text-align: center; margin-bottom: 2rem; border-bottom: 1px solid var(--slate-200); padding-bottom: 1.5rem; }
html.dark .card-header { border-color: var(--slate-700); }

.tariff-name { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.tariff-audience { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; }

.price-block { display: flex; justify-content: center; align-items: flex-start; color: var(--text-main); }
.price-block .currency { font-size: 1.5rem; font-weight: 600; margin-top: 0.5rem; margin-right: 0.2rem; }
.price-block .amount { font-size: 3.5rem; font-weight: 900; line-height: 1; letter-spacing: -0.02em; }

.features-list { list-style: none; margin-bottom: 2rem; flex-grow: 1; display: flex; flex-direction: column; gap: 1rem; }
.features-list li { display: flex; align-items: center; gap: 0.75rem; font-size: 1rem; color: var(--slate-600); }
html.dark .features-list li { color: var(--slate-300); }

.check-icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--color-primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.btn-outline {
    background-color: transparent; color: var(--color-primary);
    border: 2px solid var(--color-primary); box-shadow: none; width: 100%;
}
.btn-outline:hover { background-color: rgba(14, 165, 233, 0.1); transform: none; }
.pricing-card.featured .btn-primary { width: 100%; padding: 1rem; font-size: 1.1rem; }





.balance-pill {
    display: flex;
    align-items: center;
    background-color: var(--slate-100);
    border: 1px solid var(--slate-200);
    border-radius: 9999px; /* Полный круг */
    padding: 4px 4px 4px 16px; /* Отступ справа меньше, там кнопка */
    gap: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    height: 42px; /* Фиксируем высоту под кнопку профиля */
}

.balance-pill:hover {
    background-color: var(--slate-200);
    border-color: var(--slate-300);
}

.balance-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.balance-amount {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.balance-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.balance-add {
    width: 32px;
    height: 32px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

html.dark .balance-pill { background: var(--slate-800); border-color: var(--slate-700); }
html.dark .balance-add { background: var(--slate-700); color: white; }


.balance-card {
    /* Добавляем градиент или акцент */
    background: linear-gradient(135deg, var(--slate-50), var(--slate-100));
    border: 1px solid var(--slate-200);
    padding: 1.25rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Делаем цифры крупнее */
.balance-card span:last-child {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary);
}






/* === ПРОФИЛЬ 1: ШАПКА === */
.profile-header-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .profile-header-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.profile-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; line-height: 1.1; }
.profile-subtitle { color: var(--text-muted); font-size: 1rem; }

.profile-stats {
    display: flex;
    align-items: center;
    background: var(--slate-50);
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--slate-200);
    gap: 1.5rem;
}
html.dark .profile-stats { background: var(--slate-900); border-color: var(--slate-700); }

.stat-item { display: flex; flex-direction: column; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.stat-value { font-size: 1.25rem; font-weight: 800; color: var(--text-main); line-height: 1.2; }
.text-primary { color: var(--color-primary); }

.stat-divider { width: 1px; height: 30px; background: var(--slate-300); }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.9rem; margin-left: auto; }

/* === СЕТКА ФОТОГРАФИЙ === */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* КАРТОЧКА ФОТО */
.photo-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.photo-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

/* Зона изображения */
.card-image-area {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5; /* Вертикальные фото смотрятся лучше */
    background: var(--slate-100);
    overflow: hidden;
}

.card-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s;
}
.hidden { display: none; }

/* Бейджи и кнопки поверх фото */
.card-badges {
    position: absolute; top: 1rem; left: 1rem; z-index: 10;
    display: flex; gap: 0.5rem;
}
.badge-style {
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    color: white; font-size: 0.8rem; font-weight: 600;
    padding: 4px 10px; border-radius: 99px;
}

.toggle-view-btn {
    position: absolute; bottom: 1rem; right: 1rem; z-index: 10;
    background: white; color: black;
    padding: 6px 12px; border-radius: 99px;
    font-size: 0.8rem; font-weight: 700;
    display: flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: grab;
}
.toggle-view-btn:active { cursor: grabbing; transform: scale(0.95); }

/* Зона управления */
.card-controls { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }

.control-label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.5rem; }

/* Горизонтальный скролл стилей */
.style-scroller {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    /* Скрываем скроллбар */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.style-scroller::-webkit-scrollbar { display: none; }

.style-item {
    flex: 0 0 70px; /* Фикс ширина */
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    cursor: pointer; opacity: 0.7; transition: all 0.2s;
}
.style-item img {
    width: 50px; height: 50px; border-radius: 12px;
    object-fit: cover; border: 2px solid transparent;
}
.style-item span { font-size: 0.75rem; font-weight: 600; text-align: center; line-height: 1.1; }

.style-item:hover { opacity: 1; }
.style-item.active { opacity: 1; }
.style-item.active img { border-color: var(--color-primary); transform: scale(1.05); }
.style-item.active span { color: var(--color-primary); }

/* Кнопки в карточке */
.btn-full { width: 100%; justify-content: center; }
.generate-btn {
    display: flex; justify-content: space-between; align-items: center;
}
.generate-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(1); }

.completed-actions { display: flex; flex-direction: column; gap: 0.8rem; text-align: center; }
.btn-outline {
    border: 2px solid var(--slate-200); background: transparent; color: var(--text-main);
    padding: 0.8rem; border-radius: 0.75rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; text-decoration: none;
    transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-text { font-size: 0.9rem; color: var(--text-muted); text-decoration: underline; font-weight: 500; }
.btn-text:hover { color: var(--color-primary); }

/* Карточка загрузки */
.upload-card {
    border: 2px dashed var(--slate-300);
    background: transparent;
    cursor: pointer;
    min-height: 400px;
    justify-content: center; align-items: center;
}
.upload-card:hover { border-color: var(--color-primary); background: rgba(14, 165, 233, 0.03); }
.upload-card-content { text-align: center; padding: 2rem; }
.upload-icon-circle {
    width: 64px; height: 64px; background: var(--slate-100); border-radius: 50%;
    color: var(--color-primary); display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.upload-card h3 { font-weight: 800; font-size: 1.2rem; margin-bottom: 0.5rem; }
.upload-card p { font-size: 0.9rem; color: var(--text-muted); }



/* КОНЕЦ ПРОФИЛЬ 1 */


/* === ПРОФИЛЬ2: Общие стили === */
.profile-header-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2.5rem;
    display: flex; flex-direction: column; gap: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) {
    .profile-header-card { flex-direction: row; align-items: center; justify-content: space-between; }
}

.profile-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; }
.profile-subtitle { color: var(--text-muted); font-size: 1rem; }
.profile-stats {
    display: flex; align-items: center; background: var(--slate-50);
    padding: 1rem; border-radius: 1rem; border: 1px solid var(--slate-200); gap: 1.5rem; flex-wrap: wrap;justify-content: space-between;
}
html.dark .profile-stats { background: var(--slate-900); border-color: var(--slate-700); }
.stat-item { display: flex; flex-direction: column; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.stat-value { font-size: 1.25rem; font-weight: 800; color: var(--text-main); }
.text-primary { color: var(--color-primary); }
.stat-divider { width: 1px; height: 30px; background: var(--slate-300); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.9rem; margin: 0 auto;}

/* === СЕТКА ФОТО === */
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

.photo-card {
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: 1.25rem; overflow: hidden;
    display: flex; flex-direction: column; transition: transform 0.2s;
}
.photo-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.card-image-area { position: relative; width: 100%; aspect-ratio: 4/5; background: var(--slate-100); overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; }
.hidden { display: none !important; }

.card-badges { position: absolute; top: 1rem; left: 1rem; z-index: 10; display: flex; gap: 0.5rem; }
.badge-style { background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); color: white; font-size: 0.8rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; }

.toggle-view-btn {
    position: absolute; bottom: 1rem; right: 1rem; z-index: 10;
    background: white; color: black; padding: 8px; border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.toggle-view-btn:active { transform: scale(0.95); }

.card-controls { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.8rem; }
.btn-full { width: 100%; justify-content: center; text-align: center;  text-decoration: none;}
.btn-outline {
    border: 2px solid var(--slate-200); background: transparent; color: var(--text-main);
    padding: 0.6rem; border-radius: 0.5rem; font-weight: 700;
}
.btn-text { font-size: 0.9rem; color: var(--text-muted); text-decoration: underline; }
.text-red { color: #ef4444; }

.upload-card {
    border: 2px dashed var(--slate-300); background: transparent; cursor: pointer;
    min-height: 400px; justify-content: center; align-items: center;
}
.upload-card:hover { border-color: var(--color-primary); background: rgba(14, 165, 233, 0.03); }
.upload-card-content { text-align: center; padding: 2rem; }
.upload-icon-circle {
    width: 64px; height: 64px; background: var(--slate-100); border-radius: 50%;
    color: var(--color-primary); display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}

/* === МОДАЛЬНОЕ ОКНО СТУДИИ === */
.style-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 200;
    display: flex; justify-content: center; align-items: center; padding: 1rem;
    backdrop-filter: blur(5px);
}
.style-modal-content {
    background: var(--card-bg); width: 100%; max-width: 1000px; height: 85vh;
    border-radius: 1.5rem; overflow: hidden; position: relative;
    display: flex; flex-direction: column;
}

.studio-layout { display: flex; height: 100%; overflow: hidden; flex-direction: column; }
@media (min-width: 768px) { .studio-layout { flex-direction: row; } }

/* Левая колонка (Превью) */
.studio-preview-col {
    background: #dcddc05e; color: black; padding: 1.5rem;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    flex: 1; position: relative;border-right: 1px solid #e1e1e1;
}
.studio-preview-col h3 { margin-bottom: 1rem; font-size: 1.2rem; }
.preview-wrapper { width: 100%; max-width: 300px; aspect-ratio: 4/5; border-radius: 1rem; overflow: hidden; border: 1px solid rgba(255,255,255,0.2); }
.preview-wrapper img { width: 100%; height: 100%; object-fit: contain; }
.studio-balance-info { margin-top: 1rem; text-align: center; font-size: 0.9rem; opacity: 0.8; }
.text-green { color: #10b981; }

/* Правая колонка (Стили) */
.studio-styles-col {
    flex: 1.5; padding: 1.5rem; background: var(--card-bg);
    display: flex; flex-direction: column; overflow-y: auto;
}
.studio-styles-col h3 { margin-bottom: 1rem; font-size: 1.5rem; font-weight: 800; }

.studio-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.studio-tab {
    padding: 0.5rem 1.2rem; border-radius: 99px; border: 1px solid var(--slate-300);
    font-weight: 600; color: var(--slate-600); transition: all 0.2s;
}
.studio-tab.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }

.studio-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem;
    padding-bottom: 4rem; /* место под кнопку */
}

/* Карточка стиля */
.style-option-card {
    border: 2px solid transparent; border-radius: 1rem; overflow: hidden;
    cursor: pointer; transition: all 0.2s; background: var(--slate-50);
}
html.dark .style-option-card { background: var(--slate-800); }

.style-option-card:hover { transform: translateY(-2px); }
.style-option-card.selected { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary); }

.style-img-wrapper { position: relative; aspect-ratio: 1; }
.style-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }

.check-icon {
    position: absolute; top: 0.5rem; right: 0.5rem;
    width: 24px; height: 24px; background: var(--color-primary); color: white;
    border-radius: 50%; padding: 2px;
    opacity: 0; transform: scale(0.5); transition: all 0.2s;
}
.style-option-card.selected .check-icon { opacity: 1; transform: scale(1); }

.style-info { padding: 0.8rem; text-align: center; }
.style-info h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.2rem; }
.style-info p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.2; }

/* Кнопка */
.studio-actions {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 1.5rem; background: linear-gradient(to top, var(--card-bg) 80%, transparent);
    z-index: 10;
}
@media (max-width: 768px) {
    .studio-layout { flex-direction: column; }
    .studio-preview-col { flex: 0; padding: 1rem; display: none; } /* Скрываем превью на мобилках для экономии места, или можно сделать маленьким */
    .style-modal-content { height: 95vh; }
}


/* КОНЕЦ ПРОФИЛЬ 2 */



/* === КАРТОЧКА СЛАЙДЕР ПРОФИЛЬ3 === */

/* Область слайдера (Картинка) */
.card-slider-area {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5; /* Портретный формат */
    background: #000; /* Черный фон для фото */
    overflow: hidden;
}

/* Трек со слайдами */
.card-slides-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* Магия CSS: слайды "прилипают" */
    scrollbar-width: none; /* Скрываем скроллбар Firefox */
    -ms-overflow-style: none;
}
.card-slides-track::-webkit-scrollbar { display: none; } /* Скрываем скроллбар Chrome */

/* Один слайд */
.card-slide {
    flex: 0 0 100%; /* Ширина 100% карточки */
    width: 100%;
    height: 100%;
    scroll-snap-align: center;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Или contain, если не хотите обрезать */
}

/* Бейджи (Оригинал / Стиль) */
.slide-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    backdrop-filter: blur(4px);
}
.badge-original {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.badge-style {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Кнопка скачать (на слайде) */
.slide-download-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px; height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #000;
    z-index: 10;
    transition: transform 0.2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.slide-download-btn:active { transform: scale(0.9); }

/* Навигация (Стрелки) */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px; height: 32px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 20;
    opacity: 0; /* Скрыты по умолчанию */
    transition: opacity 0.2s, background 0.2s;
}
/* Показываем стрелки только при наведении на карточку (на десктопе) */
.slider-card-wrapper:hover .slider-arrow { opacity: 1; }

.slider-arrow.prev { left: 10px; }
.slider-arrow.next { right: 10px; }
.slider-arrow:hover { background: #fff; }

/* Точки (Dots) */
.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 20;
    pointer-events: none; /* Чтобы не мешали свайпать */
}
.slider-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s;
}
.slider-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* Подвал карточки */
.controls-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.count-label { font-weight: 600; }

/* === НОВЫЕ СТИЛИ ДЛЯ УДАЛЕНИЯ (Добавить в конец style.css) === */

/* Кнопка удаления (Глобальная для карточки) */
.delete-card-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px; height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #ef4444; /* Красный цвет */
    display: flex; align-items: center; justify-content: center;
    z-index: 30; /* Поверх всего */
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(239, 68, 68, 0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.delete-card-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
    border-color: #ef4444;
}

/* Изменяем позицию кнопки скачивания (чтобы не мешала удалению) */
/* Было top: 1rem; Стало bottom: 1rem; */
.slide-download-btn {
    top: auto !important;
    bottom: 10px !important;
    right: 10px !important;
}

/* Анимация удаления карточки */
.photo-card.deleting {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}


/* === СЛАЙД "В ОБРАБОТКЕ" (ОЧЕРЕДЬ) === */
.processing-slide {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); /* Светло-зеленый градиент */
    color: var(--slate-700);
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
html.dark .processing-slide { background: linear-gradient(135deg, #064e3b 0%, #065f46 100%); color: #ecfdf5; }

/* Анимированные круги на фоне */
.processing-slide::before {
    content: ''; position: absolute; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 60%);
    animation: rotateBg 10s linear infinite;
}
@keyframes rotateBg { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.processing-icon-wrapper {
    position: relative; z-index: 2;
    width: 64px; height: 64px; margin-bottom: 1.5rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.5); border-radius: 50%;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}
.processing-icon {
    width: 32px; height: 32px; color: #10b981;
    animation: spin 2s linear infinite;
}

.processing-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.5rem; position: relative; z-index: 2; }
.processing-desc { font-size: 0.9rem; line-height: 1.5; opacity: 0.8; position: relative; z-index: 2; max-width: 250px; }

/* Значок очереди */
.queue-badge {
    margin-top: 1rem; padding: 4px 12px; border-radius: 99px;
    background: rgba(16, 185, 129, 0.2); color: #059669;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    position: relative; z-index: 2;
}

/* === СЛАЙД С ОШИБКОЙ === */
.error-slide {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); /* Светло-красный */
    color: var(--slate-700);
    text-align: center;
    padding: 2rem;
    position: relative;
}
html.dark .error-slide { background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%); color: #fecaca; }

.error-icon-wrapper {
    width: 64px; height: 64px; margin-bottom: 1rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(239, 68, 68, 0.1); border-radius: 50%;
    color: #ef4444;
}
html.dark .error-icon-wrapper { background: rgba(0,0,0,0.3); }

.error-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.5rem; color: #ef4444; }
.error-desc { font-size: 0.85rem; line-height: 1.4; opacity: 0.9; margin-bottom: 1.5rem; max-width: 240px; }

.btn-close-error {
    background: white; border: 1px solid #ef4444; color: #ef4444;
    padding: 8px 16px; border-radius: 99px; font-weight: 600; font-size: 0.85rem;
    cursor: pointer; transition: all 0.2s;
}
.btn-close-error:hover { background: #ef4444; color: white; }


/* === УВЕДОМЛЕНИЕ О ХРАНЕНИИ === */
.storage-notice {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    position: relative;
    animation: slideDownFade 0.5s ease-out;
}
html.dark .storage-notice {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.notice-icon-box {
    width: 42px; height: 42px;
    background: #ffffff;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #3b82f6; /* Синий */
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
}
html.dark .notice-icon-box { background: #334155; color: #60a5fa; }

.notice-content { flex-grow: 1; padding-right: 20px; }

.notice-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.notice-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.notice-close {
    position: absolute; top: 1rem; right: 1rem;
    color: var(--slate-400);
    padding: 4px; border-radius: 6px;
    transition: all 0.2s;
}
.notice-close:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text-main);
}
html.dark .notice-close:hover { background: rgba(255,255,255,0.1); }


.quality-banner {
    background-color: #f0f7ff; /* Светло-голубой фон */
    border: 1px solid #cce5ff;
    border-radius: 8px;
    margin: 15px 0; /* Отступы сверху и снизу */
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-family: Arial, sans-serif;
    position: relative;
}

.quality-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.quality-icon {
    font-size: 24px; /* Размер лампочки */
}

.quality-text strong {
    color: #0056b3; /* Темно-синий заголовок */
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.quality-text p {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
}

.quality-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Чтобы на мобилке переносилось */
    gap: 10px;
}

.quality-list li {
    font-size: 13px;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
    color: #555;
}

.quality-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 0;
    margin-left: auto; /* Прижимает крестик вправо */
    line-height: 1;
}

.quality-close:hover {
    color: #333;
}

/* Адаптив для мобильных */
@media (max-width: 600px) {
    .quality-list {
        flex-direction: column; /* Список столбиком */
        gap: 5px;
    }
}






/* КОНЕЦ ПРОФИЛЬ 3 */



/* === TOAST NOTIFICATIONS (Уведомления) === */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 10000; /* Поверх всего */
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none; /* Чтобы не мешал кликать, пока невидим */
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast-notification.error {
    background-color: #ef4444; /* Красный */
}

.toast-notification.success {
    background-color: #10b981; /* Зеленый */
}