@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* Prevent font flash by ensuring fonts are loaded */
html {
    font-family: var(--font-body);
}

:root {
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --dark-gradient: linear-gradient(135deg, #1a0b2e 0%, #2d1b4e 50%, #4a1942 100%);
    --card-bg: rgba(30, 20, 50, 0.6);
    --card-border: rgba(139, 92, 246, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a78bfa;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --font-logo: 'Orbitron', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 20, 50, 0.6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9f7aea 0%, #f472b6 100%);
}

::-webkit-scrollbar-corner {
    background: rgba(30, 20, 50, 0.6);
}

/* Performance mode - disable heavy effects for Android WebView and low-end devices */
.perf-mode *,
.perf-mode *::before,
.perf-mode *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}
.perf-mode .main-navbar,
.perf-mode .submenu-navbar,
.perf-mode .modal-content,
.perf-mode .card,
.perf-mode .dropdown-menu,
.perf-mode .btn,
.perf-mode .hero-section,
.perf-mode [class*="backdrop"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.perf-mode .submenu-link:hover,
.perf-mode .nav-link:hover,
.perf-mode .btn:hover {
    transform: none !important;
}
.perf-mode .submenu-link svg,
.perf-mode .nav-link svg {
    filter: none !important;
}
.perf-mode lottie-player {
    display: none !important;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 rgba(30, 20, 50, 0.6);
}

body {
    font-family: var(--font-body);
    background: #06040f;
    background-image: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    font-weight: 400;
    letter-spacing: -0.011em;
}

body:not(.auth-page):not(.login-page):not(.register-page):not(.app-page):not(.error-page) {
    display: flex;
    flex-direction: column;
}

body:not(.auth-page):not(.login-page):not(.register-page):not(.app-page):not(.error-page):not(.admin-page) {
    padding-top: 102px;
}

/* Отступы на мобильных (шапка и submenu скрыты, минимальный отступ) */
@media (max-width: 991.98px) {
    body:not(.auth-page):not(.login-page):not(.register-page):not(.app-page):not(.error-page):not(.admin-page) {
        padding-top: 0px;
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0)) !important;
    }
}

/* Когда клавиатура открыта (класс kb-open выставляет mobile-nav.js):
   нижняя панель скрыта (kb-hidden = display:none), паддинг под неё не нужен.
   70px мёртвого пространства съедают высоту формы поверх клавиатуры,
   из-за чего поле промта и кнопка отправки не помещаются в видимую область.
   Оставляем только safe-area-inset для устройств с вырезом. */
@media (max-width: 991.98px) {
    html.kb-open body:not(.auth-page):not(.login-page):not(.register-page):not(.app-page):not(.error-page):not(.admin-page) {
        padding-bottom: env(safe-area-inset-bottom, 0) !important;
    }
}

.main-navbar {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
}

/* Скрываем шапку на мобильных - она не несёт смысловой нагрузки */
@media (max-width: 991.98px) {
    .main-navbar {
        display: none !important;
    }
}

.submenu-navbar {
    background: rgba(10, 10, 30, 0.85) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding: 0.75rem 0;
    position: fixed;
    top: 95px;
    left: 0;
    right: 0;
    z-index: 9999;
}

/* Submenu прижимается к верху на мобильных (шапка скрыта) */
@media (max-width: 991.98px) {
    .submenu-navbar {
        top: 0;
    }
}

.submenu-nav {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    height: 56px;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .submenu-nav {
        gap: 0.25rem;
    }
    .submenu-link {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
        gap: 0.4rem;
    }
    .submenu-link svg {
        width: 20px;
        height: 20px;
    }
}

@media (min-width: 1200px) and (max-width: 1400px) {
    .submenu-nav {
        gap: 0.35rem;
    }
    .submenu-link {
        padding: 0.55rem 0.9rem;
        font-size: 0.9rem;
    }
}

.submenu-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.submenu-link svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.submenu-link:hover,
.submenu-link.active {
    color: white;
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
}

.submenu-link:hover svg,
.submenu-link.active svg {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.8)) drop-shadow(0 0 12px rgba(236, 72, 153, 0.6));
}

.submenu-link:hover svg path,
.submenu-link.active svg path {
    fill: url(#gradient-hover);
}

.navbar-nav {
    position: relative;
    z-index: 10001;
}

.dropdown-menu {
    position: absolute !important;
    z-index: 10002 !important;
    will-change: transform;
}

.dropdown-menu.show {
    z-index: 10002 !important;
}

.nav-item.dropdown {
    position: relative;
    z-index: 10001;
}

/* Bootstrap модальные окна должны быть поверх всего */
.modal {
    z-index: 10010 !important;
}

.modal-backdrop {
    z-index: 10009 !important;
}

.navbar-brand {
    font-family: var(--font-logo);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.brand-logo {
    width: 52px;
    height: 52px; 
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6)) 
            drop-shadow(0 0 16px rgba(236, 72, 153, 0.3));
} 

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    padding: 0.6rem 1.25rem !important;
    font-size: 1rem;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: var(--text-primary) !important;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 10px;
    transform: translateY(-2px);
}

.user-menu-toggle {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 0.6rem 1.25rem !important;
}

.user-menu-toggle:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}

.nav-link-icon {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
}

/* Fix: Hide mobile menu items on desktop (override display: flex !important) */
@media (min-width: 992px) {
    .nav-item.d-lg-none {
        display: none !important;
    }
}

.nav-link-icon svg {
    flex-shrink: 0;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.nav-link-icon:hover svg {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.6));
}

.dropdown-item-icon {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
}

.dropdown-item-icon svg {
    flex-shrink: 0;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.dropdown-item-icon:hover svg {
    opacity: 1;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.5));
}

.dropdown-menu .dropdown-item:hover {
    background: rgba(139, 92, 246, 0.15) !important;
    color: white !important;
}

@media (max-width: 991px) {
    .submenu-navbar {
        display: none;
    }
}

.btn-gradient {
    font-family: var(--font-body);
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
    color: white;
}

.btn-gradient:hover::before {
    opacity: 1;
}

.btn-gradient * {
    position: relative;
    z-index: 1;
}

.btn-outline-gradient {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn-outline-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: var(--primary-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.btn-outline-gradient:hover {
    background: var(--primary-gradient);
    transform: translateY(-2px);
}

.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 70%, rgba(236, 72, 153, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease;
}

.hero-badge svg {
    color: var(--accent-purple);
}

.hero-title {
    font-family: var(--font-logo);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1.2s ease;
    flex-wrap: wrap;
}

.stats-section {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
    animation: fadeInUp 1.4s ease;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

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

.card-modern {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
}

.card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
    border-color: var(--accent-purple);
}

a.card-modern.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.card-modern.card-link:hover {
    text-decoration: none;
    color: inherit;
}

.features-section {
    padding: 6rem 0;
}

.section-title {
    font-family: var(--font-logo);
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
}

.feature-card {
    text-align: center;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.feature-title {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.feature-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.feature-price {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-page, .register-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #06040f;
    background-image: radial-gradient(circle at 30% 50%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
                      radial-gradient(circle at 70% 50%, rgba(236, 72, 153, 0.2) 0%, transparent 50%);
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.auth-logo .brand-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.auth-logo .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.form-control-modern {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-control-modern::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.forgot-password {
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-password a {
    color: var(--accent-purple);
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.4);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
}

.btn-google {
    width: 100%;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-purple);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.auth-footer a {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
}

footer a {
    color: rgba(255, 255, 255, 0.9) !important;
}

footer a:hover {
    color: rgba(255, 255, 255, 1) !important;
}

.dashboard-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: visible;
    margin-bottom: 0.75rem;
    padding: 1.25rem;
}

.card-header-custom {
    background: rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid var(--card-border);
    padding: 1.5rem;
}

.card-body-custom {
    padding: 2rem;
}

.dashboard-card > .d-flex {
    padding: 0;
}

.dashboard-card h5 {
    margin-bottom: 0;
}

dl.row {
    margin-bottom: 0;
}

dl.row dt {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.75rem 0;
}

dl.row dd {
    color: white;
    font-weight: 400;
    padding: 0.75rem 0;
    margin-bottom: 0;
}

.dashboard-header {
    background: var(--primary-gradient);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* Premium balance card: deep violet/magenta with radial glow + inset highlight */
.dashboard-header--balance {
    background:
        radial-gradient(circle at 20% 0%, rgba(217, 70, 239, 0.32), transparent 38%),
        linear-gradient(135deg, rgba(139, 92, 246, 0.82), rgba(217, 70, 239, 0.72));
    box-shadow:
        0 0 22px rgba(139, 92, 246, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

/* Orders card: cyan/violet to keep brand consistency (no green) */
.dashboard-header--orders {
    background:
        radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.28), transparent 42%),
        linear-gradient(135deg, rgba(34, 211, 238, 0.78), rgba(139, 92, 246, 0.72));
    box-shadow:
        0 0 22px rgba(34, 211, 238, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* Calmer secondary CTA — dark glass with violet/magenta border, no flashy hover */
.btn-outline-gradient.btn-outline-soft {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(139, 92, 246, 0.32);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.9);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.btn-outline-gradient.btn-outline-soft::before { display: none; }
.btn-outline-gradient.btn-outline-soft:hover {
    background: rgba(139, 92, 246, 0.10);
    border-color: rgba(217, 70, 239, 0.48);
    color: #fff;
    transform: none;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge.bg-warning {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #fcd34d;
}

.badge.bg-info {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #93c5fd;
}

.badge.bg-success {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #86efac;
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fca5a5;
}

/* Alert Info - Purple Theme */
.alert-info {
    background: rgba(139, 92, 246, 0.1) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    color: #a78bfa !important;
    border-radius: 12px;
}

.alert-info strong {
    color: white !important;
}

.table {
    color: white !important;
    background: transparent !important;
}

.table thead {
    border-bottom: 2px solid var(--card-border);
    background: transparent !important;
}

.table thead th {
    color: white !important;
}

.table tbody {
    background: transparent !important;
}

.table tbody tr {
    background: transparent !important;
    color: white !important;
}

.table tbody tr:hover {
    background: rgba(139, 92, 246, 0.05) !important;
}

.table td, .table th {
    border-color: rgba(139, 92, 246, 0.1);
    padding: 1rem;
    background: transparent !important;
    color: white !important;
}

.table a {
    color: white !important;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        /* Градиентный текст (background-clip: text) ненадёжен на части мобильных браузеров —
           даём читаемый светлый текст со свечением вместо прозрачной заливки */
        background: none;
        -webkit-text-fill-color: #ffffff;
        color: #ffffff;
        text-shadow: 0 2px 24px rgba(139, 92, 246, 0.7), 0 0 48px rgba(139, 92, 246, 0.4);
    }

    .hero-description {
        font-size: 1rem;
    }

    .stats-section {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-gradient, .btn-outline-gradient {
        width: 100%;
    }

    /* Container mobile top margin */
    .container.my-4 {
        margin-top: 0.5rem !important;
    }

    .container.my-5 {
        margin-top: 0.5rem !important;
    }

    /* Dashboard mobile optimization */
    .dashboard-card {
        margin-bottom: 0.5rem;
        padding: 0.75rem;
        height: auto !important;
    }

    .dashboard-header {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .row.g-3 {
        --bs-gutter-y: 0.5rem;
        --bs-gutter-x: 0.5rem;
    }

    /* Pricing Table Mobile Optimization */
    .pricing-section {
        padding: 2rem 1rem;
    }

    .pricing-provider {
        margin-bottom: 2rem;
    }

    .provider-title {
        font-size: 1.5rem;
        padding: 0 1rem;
    }

    .provider-description {
        font-size: 0.9rem;
        padding: 0 1rem;
        margin-bottom: 1rem;
    }

    .pricing-table {
        margin: 0;
        border-radius: 12px;
        max-width: 100%;
    }

    .pricing-table table {
        min-width: 800px;
    }

    /* Карточки снизу - добавить отступы */
    .row.mt-5 {
        margin-top: 2rem !important;
    }

    .row.mt-5 .col-md-4 {
        margin-bottom: 1.5rem;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .pricing-table th:first-child,
    .pricing-table td:first-child {
        min-width: 150px;
    }

    /* Скрыть кнопки "Выбрать" на мобильных */
    .pricing-table .btn-select {
        display: none;
    }

    .pricing-table th:last-child,
    .pricing-table td:last-child {
        display: none;
    }

    .service-name {
        font-size: 0.9rem;
        white-space: normal;
        line-height: 1.3;
    }

    .model-name {
        font-size: 0.8rem;
    }

    .price-value {
        font-size: 1rem;
    }

    .service-description {
        font-size: 0.85rem;
        white-space: normal;
        max-width: 200px;
    }

    .btn-select {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .card-modern {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .card-modern h5 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .card-modern p {
        font-size: 0.85rem;
    }

    .card-modern svg {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 576px) {
    .pricing-section {
        padding: 1.5rem 0.5rem;
    }

    .section-title {
        font-size: 1.75rem;
        padding: 0 0.5rem;
    }

    .provider-title {
        padding: 0 0.5rem;
    }

    .provider-description {
        padding: 0 0.5rem;
    }

    .pricing-table {
        margin: 0;
        max-width: 100%;
        overflow-x: auto;
    }

    .pricing-table table {
        min-width: 600px;
    }

    /* Карточки с отступами */
    .row.mt-5 {
        margin-top: 1.5rem !important;
        padding: 0 0.5rem;
    }

    .row.mt-5 .col-md-4 {
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }

    .service-name {
        font-size: 0.85rem;
    }

    .model-name {
        font-size: 0.75rem;
    }

    .price-value {
        font-size: 0.95rem;
    }

    .service-description {
        font-size: 0.8rem;
        max-width: 180px;
    }

    .btn-select {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-purple);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 500;
}

.back-link:hover {
    color: var(--accent-pink);
}

.how-it-works-section {
    padding: 6rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.step-card {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.step-description {
    color: rgba(255, 255, 255, 0.7);
}

.examples-section {
    padding: 6rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.video-example-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.video-example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
    border-color: var(--accent-purple);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
}

.video-thumbnail img,
.video-thumbnail .example-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(139, 92, 246, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-thumbnail:hover .video-play-icon {
    background: var(--primary-gradient);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 1.5rem;
}

.video-model-badge {
    display: inline-block;
    background: var(--primary-gradient);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.example-detail-panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.prompt-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.prompt-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prompt-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.copy-prompt-btn {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.copy-prompt-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.style-badge {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin-right: 0.5rem;
}

.pricing-section {
    padding: 4rem 0;
}

.pricing-provider {
    margin-bottom: 4rem;
}

.provider-header {
    margin-bottom: 2rem;
}

.provider-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.provider-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

.pricing-table {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.pricing-table table {
    width: 100%;
    margin-bottom: 0;
    background: transparent !important;
}

.pricing-table thead {
    background: rgba(139, 92, 246, 0.15);
}

.pricing-table th {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
    border: none !important;
    background: transparent;
}

.pricing-table td {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    background: transparent;
}

.pricing-table tbody tr {
    background: transparent !important;
    transition: background 0.3s ease;
}

.pricing-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.05) !important;
}

.service-name {
    font-weight: 600;
    color: white;
}

.model-name {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    border-radius: 8px;
}

/* Анимация градиента для заголовков нейросетей */
.gradient-animated {
    background: linear-gradient(-45deg, #8b5cf6, #ec4899, #667eea, #f093fb) !important;
    background-size: 400% 400% !important;
    animation: gradientAnimation 8s ease infinite !important;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.price-value {
    color: #10b981;
    font-weight: 700;
    font-size: 1.1rem;
}

.service-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.btn-select {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
}

.table-responsive {
    background: transparent;
}

.list-group-item {
    background: transparent !important;
    color: white !important;
}

.list-group-item span {
    color: rgba(255, 255, 255, 0.9) !important;
}

.list-group-item small {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Подменю с навигацией */
.sub-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
    padding: 0;
    position: fixed;
    top: 60px; /* Начинается точно под основной шапкой */
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sub-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    height: 60px;
}

.sub-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.sub-nav a i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.sub-nav a:hover {
    background: rgba(147, 51, 234, 0.2);
    border-color: rgba(147, 51, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.sub-nav a:hover i {
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.1);
}

.sub-nav a.active {
    background: rgba(147, 51, 234, 0.3);
    border-color: rgba(147, 51, 234, 0.6);
}

/* Гамбургер меню */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sub-header {
        top: 60px;
    }

    .sub-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        padding: 1rem;
        gap: 0.5rem;
        height: auto;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }

    .sub-nav.active {
        display: flex;
    }

    .sub-nav a {
        width: 100%;
        justify-content: flex-start;
    }
}
.form-control, .form-select {
            width: 100%;
            padding: 0.875rem 1rem;
            background: rgba(15, 10, 25, 0.6) !important;
            border: 1px solid rgba(139, 92, 246, 0.25);
            border-radius: 0.375rem;
            color: rgba(255, 255, 255, 0.95) !important;
            font-size: 0.875rem;
            box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            transition: all 0.15s ease;
        }
        .form-control:-webkit-autofill,
        .form-control:-webkit-autofill:hover,
        .form-control:-webkit-autofill:focus,
        .form-control:-webkit-autofill:active {
            -webkit-box-shadow: 0 0 0 1000px rgba(15, 10, 25, 0.95) inset !important;
            -webkit-text-fill-color: rgba(255, 255, 255, 0.95) !important;
            background-color: rgba(15, 10, 25, 0.95) !important;
            caret-color: rgba(255, 255, 255, 0.95) !important;
        }
        .form-select {
            display: flex;
            align-items: center;
            justify-content: space-between;
            white-space: nowrap;
            padding-right: 2.5rem;
            appearance: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: none !important;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a78bfa' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
            background-repeat: no-repeat !important;
            background-position: right 1rem center !important;
            background-size: 16px !important;
            cursor: pointer;
        }
        .form-select::-ms-expand {
            display: none;
        }
        .form-select:hover {
            border-color: rgba(139, 92, 246, 0.4);
        }
        .form-control:focus, .form-select:focus {
            outline: none;
            border-color: rgba(139, 92, 246, 0.6);
            box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.5);
        }
        .form-select:focus {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238b5cf6' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
        }
        .form-select:disabled {
            cursor: not-allowed;
            opacity: 0.5;
        }
        .form-control::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }
        .form-control {
            color: rgba(255, 255, 255, 0.95) !important;
        }
        .form-select option {
            background: #1a0f2e;
            color: rgba(255, 255, 255, 0.95);
            padding: 0.625rem 0.75rem;
            font-size: 0.875rem;
            border-radius: 0.5rem;
            margin: 0.25rem 0.5rem;
            outline: none;
        }
        .form-select option:hover,
        .form-select option:focus {
            background: rgba(139, 92, 246, 0.3) !important;
            color: white !important;
        }
        .form-select option:checked {
            background: linear-gradient(90deg, #8b5cf6, #a855f7) !important;
            background-color: #8b5cf6 !important;
            color: #12091f !important;
            font-weight: 500;
        }
        .form-select::-webkit-scrollbar {
            width: 6px;
        }
        .form-select::-webkit-scrollbar-track {
            background: #12091f;
            border-radius: 3px;
        }
        .form-select::-webkit-scrollbar-thumb {
            background: rgba(139, 92, 246, 0.4);
            border-radius: 3px;
        }

        /* Modern select wrapper with ::after arrow - prevents tiling bug */
        .select-wrapper {
            position: relative;
            width: 100%;
        }
        .select-wrapper select {
            padding-right: 2.5rem !important;
            appearance: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: none !important;
            position: relative;
            z-index: 1;
            background-image: none !important;
            background-repeat: no-repeat !important;
        }
        .select-wrapper select::-ms-expand {
            display: none;
        }
        .select-wrapper::after {
            content: "";
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            width: 16px;
            height: 16px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a78bfa' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
            background-repeat: no-repeat !important;
            background-position: center center !important;
            background-size: 16px 16px !important;
            pointer-events: none;
            z-index: 2;
            transition: opacity 0.3s;
        }
        .select-wrapper:focus-within::after {
            opacity: 0.7;
        }
.image-preview-tooltip {
        display: none;
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        padding: 0;
        background: rgba(0, 0, 0, 0.95);
        border: 2px solid rgba(139, 92, 246, 0.5);
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
        z-index: 10005;
        max-width: 90vw;
        max-height: 90vh;
        overflow: hidden;
    }
    .image-preview-tooltip::before {
        content: 'Исходное изображение';
        display: block;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.7);
        text-align: center;
        padding: 12px 16px 8px;
        font-weight: 500;
        background: rgba(0, 0, 0, 0.5);
        width: 100%;
    }
    .image-preview-tooltip img {
        max-width: min(400px, 80vw);
        max-height: min(400px, 70vh);
        width: auto;
        height: auto;
        display: block;
        margin: 0;
        padding: 0 16px 16px;
    }
    @media (max-width: 768px) {
        .image-preview-tooltip img {
            max-width: min(300px, 70vw);
            max-height: min(300px, 60vh);
            padding: 0 12px 12px;
        }
    }

/* ===================================================================
   CUSTOM FORM ELEMENTS - Styled checkboxes and file inputs
   ================================================================== */

/* Custom Checkbox */
.custom-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding-left: 28px;
    user-select: none;
    color: white;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox .checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.custom-checkbox:hover .checkmark {
    border-color: rgba(139, 92, 246, 0.7);
    background: rgba(139, 92, 246, 0.15);
}

.custom-checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border-color: transparent;
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Custom File Input */
.custom-file-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.custom-file-input {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.custom-file-input input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
}

.custom-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-file-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-1px);
}

.custom-file-btn svg {
    width: 18px;
    height: 18px;
    color: #8b5cf6;
}

.custom-file-name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}
@media (max-width: 576px) {
    .custom-file-name { max-width: 120px; }
}

/* File input with preview area */
.file-upload-area {
    border: 2px dashed rgba(139, 92, 246, 0.4);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: rgba(139, 92, 246, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: rgba(139, 92, 246, 0.7);
    background: rgba(139, 92, 246, 0.1);
}

.file-upload-area.dragover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
}

.file-upload-area input[type="file"] {
    display: none;
}

.file-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: #8b5cf6;
}

.file-upload-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.file-upload-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* ===================================================================
   COIN ICON - Stylized star icon for coins
   ================================================================== */
.coin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='coinGrad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%238b5cf6;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%23ec4899;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z' fill='url(%23coinGrad)' stroke='url(%23coinGrad)' stroke-width='0.5' style='filter: drop-shadow(0 1px 3px rgba(139, 92, 246, 0.4));'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    flex-shrink: 0;
    transform: translateY(-1px);
    transition: transform 0.2s ease, filter 0.2s ease;
}

/* White coin icon for gradient backgrounds */
.coin-icon-white {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z' fill='%23ffffff' stroke='%23ffffff' stroke-width='0.5' style='filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));'/%3E%3C/svg%3E");
}

/* Yellow/gold coin icon variant */
.coin-icon-gold {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='goldGrad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23fbbf24;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%23f59e0b;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z' fill='url(%23goldGrad)' stroke='%23fbbf24' stroke-width='0.5' style='filter: drop-shadow(0 1px 3px rgba(251, 191, 36, 0.5));'/%3E%3C/svg%3E");
}

.coin-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 6px rgba(139, 92, 246, 0.6));
}

/* Larger coin icon variant */
.coin-icon-lg {
    width: 24px;
    height: 24px;
}

/* Extra large coin icon variant */
.coin-icon-xl {
    width: 32px;
    height: 32px;
}

.aspect-select {
    font-family: inherit;
}

.aspect-select option {
    font-family: inherit;
    letter-spacing: 0.02em;
}

.policy-hint {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.75rem;
}

.policy-hint a {
    color: rgba(139, 92, 246, 0.7);
    text-decoration: none;
}

.policy-hint a:hover {
    color: #a78bfa;
    text-decoration: underline;
}

.btn-templates-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.8rem;
    height: 32px;
}

.btn-templates-link:hover {
    color: white;
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
}

.btn-templates-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Кнопка истории промптов - унифицированные стили */
.prompt-history-icon-btn {
    padding: 0.35rem 0.6rem !important;
    height: 32px !important;
}

/* Custom Dropdown Component */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    height: auto;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    border-radius: 0.5rem;
    border: 1px solid rgba(139, 92, 246, 0.25);
    background-color: transparent;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.custom-select-trigger:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.custom-select-trigger:focus,
.custom-select.open .custom-select-trigger {
    outline: none;
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.custom-select-trigger .trigger-text {
    flex: 1;
    text-align: left;
}

.custom-select-trigger .trigger-arrow {
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
    color: rgba(139, 92, 246, 0.8);
}

.custom-select.open .trigger-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10050;
    max-height: 240px;
    overflow-y: auto;
    border-radius: 0.5rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background-color: #12091f;
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.2);
    padding: 0.375rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.15s ease;
}

.custom-select.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-select-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.1s ease;
    margin-bottom: 2px;
}

.custom-select-option:last-child {
    margin-bottom: 0;
}

.custom-select-option:hover {
    background: rgba(139, 92, 246, 0.25);
    color: white;
}

.custom-select-option.selected {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.5), rgba(168, 85, 247, 0.4));
    color: white;
    font-weight: 500;
}

.custom-select-option.selected::before {
    content: "✓";
    margin-right: 0.5rem;
    font-size: 0.75rem;
    color: #a78bfa;
}

.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.1);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.4);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.6);
}

/* Hidden native input for form submission */
.custom-select input[type="hidden"] {
    display: none;
}

/* Price Badge for Submit Buttons */
.price-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    margin-left: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.price-badge .coin-icon {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-shadow: 0 0 4px rgba(251, 191, 36, 0.5);
}

.price-badge .coin-icon::after {
    content: "★";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    color: #92400e;
}

/* Article Images */
.article-image {
    margin: 2rem 0;
    text-align: center;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.article-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.article-image .image-placeholder {
    max-width: 100%;
}

/* Step Images in Articles */
.step-image {
    margin: 1rem 0 0 0;
    text-align: center;
}

.step-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.step-card {
    overflow: hidden;
}
/* Push Bell Button */
.push-bell-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}
.push-bell-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
    color: #fff;
}
.push-bell-btn.push-subscribed {
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.18);
}
.push-bell-btn.push-subscribed svg {
    animation: pushBellRing 0.5s ease-in-out;
}
@keyframes pushBellRing {
    0%,100% { transform: rotate(0deg); }
    20%      { transform: rotate(-15deg); }
    40%      { transform: rotate(15deg); }
    60%      { transform: rotate(-10deg); }
    80%      { transform: rotate(10deg); }
}
