/* Основные переменные и настройки */
:root {
    /* Пастельная цветовая палитра */
    --primary-color: #9B8FE3;
    --primary-light: #B5AAF0;
    --primary-dark: #7D6FD4;
    --secondary-color: #FFB5BA;
    --accent-color: #88D8B0;
    --background: #FBF9FF;
    --surface: #FFFFFF;
    --text-primary: #2D2D3F;
    --text-secondary: #6B6B7D;
    --text-light: #9494A6;
    --border-color: #E8E5F0;
    --shadow-sm: 0 2px 8px rgba(155, 143, 227, 0.08);
    --shadow-md: 0 4px 16px rgba(155, 143, 227, 0.12);
    --shadow-lg: 0 8px 32px rgba(155, 143, 227, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация */
.navbar {
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.nav-logo {
    height: 56px;
    width: auto;
    display: block;
}
@media (max-width: 480px) {
  .nav-logo { height: 48px; }
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.cart-btn:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--secondary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.login-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero секция */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--background) 0%, rgba(155, 143, 227, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Hero декорации */
.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#heroParticles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

:root {
  --particle-color: rgba(125, 111, 212, 0.7);
  --particle-link: rgba(155, 143, 227, 0.35);
}

body.theme-dark {
  --particle-color: rgba(166, 77, 255, 0.75);
  --particle-link: rgba(166, 77, 255, 0.35);
}

/* Секция с основным товаром */
.featured-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.featured-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    max-width: 800px;
    margin: 0 auto;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(155, 143, 227, 0.2);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 3;
}

.featured-card .btn {
    position: relative;
    z-index: 2;
}

.featured-content { position: relative; z-index: 2; }

.featured-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.featured-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.featured-link {
    margin-bottom: 1.5rem;
}

.featured-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-link a:hover {
    text-decoration: underline;
}

.featured-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.price-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Каталог */
.catalog-section {
    padding: 4rem 0;
    background: var(--surface);
}

.catalog-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--background);
    border: 2px solid transparent;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

/* Карточка товара */
.product-card {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.product-icon {
    font-size: 1.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.product-link:hover {
    text-decoration: underline;
}

.product-action {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: auto;
}

.product-action:hover {
    background: var(--primary-dark);
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--surface);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    max-width: 600px;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.cart-modal-content {
    max-width: 500px;
}

.login-modal-content {
    max-width: 400px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.5rem;
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--background);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface);
}

/* Опции товара */
.product-options {
    margin: 2rem 0;
}

.option-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--background);
    border-radius: var(--radius-md);
}

.option-group h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.option-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    transition: var(--transition);
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.quality-options {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.quality-option {
    padding: 1rem;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.quality-option:hover {
    border-color: var(--primary-color);
}

.quality-option.selected {
    border-color: var(--primary-color);
    background: rgba(155, 143, 227, 0.1);
}

.quality-option-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.quality-option-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.quality-option-price {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.quantity-input {
    width: 100px;
    padding: 0.5rem;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.quick-amounts {
    display: flex;
    gap: 0.5rem;
}

.quick-amount {
    padding: 0.5rem 1rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.quick-amount:hover {
    border-color: var(--primary-color);
    background: var(--surface);
}

/* Корзина */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-options {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary-color);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: #e74c3c;
}

.cart-footer {
    border-top: 2px solid var(--border-color);
    padding-top: 1.5rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Уведомления */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
}

.notification {
    background: var(--surface);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    margin-bottom: 1rem;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    position: relative;
}

.notification.success {
    border-left: 4px solid var(--accent-color);
}

.notification.error {
    border-left: 4px solid #e74c3c;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Футер */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-card {
        padding: 2rem;
    }
    
    .modal-content {
        margin: 10% 20px;
        padding: 1.5rem;
    }
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1.5rem;
}

/* Дополнительные стили для предупреждения */
.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    cursor: help;
}

.info-tooltip:hover .tooltip-content {
    display: block;
}

.tooltip-content {
    display: none;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    line-height: 1.45;
    width: 320px;
    max-width: min(90vw, 360px);
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    box-shadow: var(--shadow-md);
    z-index: 20;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-primary);
}

@media (max-width: 480px) {
    .tooltip-content {
        left: 0;
        transform: none;
    }
}

.warning-box {
    background: rgba(255, 181, 186, 0.2);
    border: 1px solid var(--secondary-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1rem 0;
    color: var(--text-primary);
}

.warning-box strong {
    color: var(--primary-dark);
} 

/* Scroll inside modal content and tooltip text wrapping */
.modal-content {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Prevent long text overflow in modals/tooltips */
.modal-content, .tooltip-content {
    word-break: break-word;
}

/* Tooltip should wrap and stay readable */
.tooltip-content {
    white-space: normal;
    max-width: 280px;
} 

/* ===== Тёмная тема с неоновыми акцентами ===== */
:root {
  --neon-green: #39ff14;
  --neon-blue: #00eaff;
  --neon-purple: #a64dff;
}

body.theme-dark {
  --background: #0b0f14;
  --surface: #0f1620;
  --text-primary: #e5e7eb;
  --text-secondary: #9aa4b2;
  --text-light: #6b7280;
  --border-color: #1f2a37;

  /* меняем палитру под неоновые акценты */
  --primary-color: var(--neon-purple);
  --primary-light: #caa6ff;
  --primary-dark: #7b2fff;
  --secondary-color: var(--neon-blue);
  --accent-color: var(--neon-green);

  /* тени приглушаем и добавляем свечение */
  --shadow-sm: 0 0 10px rgba(166, 77, 255, 0.15);
  --shadow-md: 0 0 16px rgba(0, 234, 255, 0.18);
  --shadow-lg: 0 0 28px rgba(57, 255, 20, 0.2);

  /* фон hero мягко затемняем */
}

/* Неоновые утилиты */
.neon-purple-glow { box-shadow: 0 0 8px var(--neon-purple), 0 0 16px rgba(166,77,255,.5); }
.neon-blue-glow   { box-shadow: 0 0 8px var(--neon-blue),   0 0 16px rgba(0,234,255,.5); }
.neon-green-glow  { box-shadow: 0 0 8px var(--neon-green),  0 0 16px rgba(57,255,20,.5); }

/* Подстраиваем hero в тёмной теме */
body.theme-dark .hero {
  background: radial-gradient(1200px 500px at 20% -10%, rgba(166,77,255,0.12), transparent 60%),
              radial-gradient(800px 400px at 90% 10%, rgba(0,234,255,0.12), transparent 60%),
              linear-gradient(135deg, #0b0f14 0%, #0f1620 100%);
}

/* Кнопка переключения темы */
.theme-toggle {
  border: 2px solid var(--border-color);
  background: var(--surface);
  color: var(--text-primary);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.theme-toggle:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 0 10px rgba(166, 77, 255, 0.3);
}

/* В тёмной теме карточки, модалки и футер уже используют переменные, ничего доп. не требуется */ 

/* Ползунок темы (moon→sun) */
.theme-switch { display:inline-flex; align-items:center; cursor:pointer; }
.theme-switch input { display:none; }
.theme-slider {
  position: relative;
  width: 60px; height: 28px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--border-color);
  display: inline-flex;
  align-items: center; justify-content: space-between;
  padding: 0 6px;
  transition: var(--transition);
}
.theme-slider .moon, .theme-slider .sun { font-size: 14px; opacity: .8; }
.theme-switch input:checked + .theme-slider { border-color: var(--primary-color); box-shadow: 0 0 10px rgba(166,77,255,.3); }

/* Индикатор */
.theme-slider::after {
  content: '';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  left: 4px;
  width: 22px; height: 22px;
  background: var(--primary-color);
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 0 8px var(--primary-color);
}
.theme-switch input:checked + .theme-slider::after { left: 34px; }

/* Фильтры в тёмной теме */
body.theme-dark .filter-btn {
  background: var(--surface);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}
body.theme-dark .filter-btn:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(166,77,255,0.25);
}
body.theme-dark .filter-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 12px rgba(166,77,255,0.35);
}

/* Футер в тёмной теме */
body.theme-dark .footer { background: #0a0f16; color: #e5e7eb; }
body.theme-dark .footer-section a { color: rgba(229,231,235,0.8); }
body.theme-dark .footer-section a:hover { color: #fff; }
body.theme-dark .footer-bottom { border-top-color: rgba(255,255,255,0.12); color: rgba(229,231,235,0.7); } 

body.theme-dark .navbar { background: var(--surface); box-shadow: var(--shadow-sm); }
body.theme-dark .nav-link { color: var(--text-primary); }
body.theme-dark .mobile-menu-btn span { background: var(--text-primary); }

body.theme-dark .featured-card,
body.theme-dark .product-card,
body.theme-dark .modal-content,
body.theme-dark .notification,
body.theme-dark .option-group,
body.theme-dark .cart-item { background: var(--surface); }

body.theme-dark .catalog-section { background: var(--surface); }

body.theme-dark .brand-subtitle,
body.theme-dark .hero-subtitle,
body.theme-dark .product-description,
body.theme-dark .cart-item-options,
body.theme-dark .notification-message { color: var(--text-secondary); }

body.theme-dark .product-title,
body.theme-dark .section-title,
body.theme-dark .price-label,
body.theme-dark .cart-item-title,
body.theme-dark .modal-header h2,
body.theme-dark .form-group label { color: var(--text-primary); }

body.theme-dark .product-link,
body.theme-dark .featured-link a { color: var(--primary-light); }
body.theme-dark .product-link:hover,
body.theme-dark .featured-link a:hover { color: var(--primary-color); }

/* Формы и инпуты */
body.theme-dark .form-control,
body.theme-dark .quantity-input,
body.theme-dark #tgBotUrlInput {
  background: #0c121a;
  color: var(--text-primary);
  border-color: var(--border-color);
}
body.theme-dark .form-control::placeholder,
body.theme-dark .quantity-input::placeholder { color: var(--text-light); }
body.theme-dark .form-control:focus {
  background: #111826;
  border-color: var(--primary-color);
}

/* Кнопки */
body.theme-dark .btn { color: #fff; }
body.theme-dark .btn-primary { background: var(--primary-color); color: #fff; }
body.theme-dark .btn-primary:hover { background: var(--primary-dark); }
body.theme-dark .btn-secondary { background: transparent; color: var(--primary-light); border-color: var(--primary-color); }
body.theme-dark .btn-secondary:hover { background: var(--primary-color); color: #0b0f14; }

/* Переключатели и тумблеры */
body.theme-dark .toggle-slider { background: #1a2430; }
body.theme-dark input:checked + .toggle-slider { background: var(--primary-color); }
body.theme-dark .quality-option { background: #0c121a; border-color: var(--border-color); }
body.theme-dark .quality-option.selected { background: rgba(166,77,255,0.12); border-color: var(--primary-color); }

/* Кнопки выбора подписчиков (качество и быстрые количества) в тёмной теме */
body.theme-dark .quality-option { color: var(--text-primary); }
body.theme-dark .quality-option-title { color: var(--text-primary); }
body.theme-dark .quality-option-desc { color: var(--text-secondary); }
body.theme-dark .quality-option-price { color: var(--primary-light); }

body.theme-dark .quick-amount {
  color: var(--text-primary);
  background: #0c121a;
  border-color: var(--border-color);
}
body.theme-dark .quick-amount:hover {
  background: #111826;
  color: var(--primary-light);
  border-color: var(--primary-color);
}

/* Tooltip */
body.theme-dark .tooltip-content { background: #0f1620; color: #e5e7eb; box-shadow: 0 0 12px rgba(0,0,0,0.35); }
body.theme-dark .tooltip-content::after { border-top-color: #0f1620; }

/* Корзина */
body.theme-dark .cart-item-remove { color: var(--text-secondary); }
body.theme-dark .cart-item-remove:hover { color: #ff6b6b; }
body.theme-dark .cart-footer { border-top-color: var(--border-color); }

/* Модал фон */
body.theme-dark .modal { background: rgba(0,0,0,0.6); }

/* Навбар кнопки/иконки */
body.theme-dark .cart-btn { color: var(--text-primary); }
body.theme-dark .cart-count { background: var(--secondary-color); color: #0b0f14; }

/* Ссылки в футере уже переопределены выше */

/* Admin page inherits variables; ensure tables have contrast */
body.theme-dark .admin-table th { background: #0c121a; color: var(--text-primary); border-bottom-color: var(--border-color); }
body.theme-dark .admin-table tr:hover { background: #0c121a; }
body.theme-dark .table-container,
body.theme-dark .recent-orders,
body.theme-dark .stat-card,
body.theme-dark .chart-card { background: var(--surface); } 

/* Очертания карточек и блоков в тёмной теме */
body.theme-dark .product-card,
body.theme-dark .featured-card,
body.theme-dark .option-group,
body.theme-dark .cart-item {
  border: 1px solid var(--border-color);
}

body.theme-dark .product-card:hover,
body.theme-dark .featured-card:hover,
body.theme-dark .option-group:hover,
body.theme-dark .cart-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 14px rgba(166,77,255,0.18);
} 

/* Адаптация логотипа под темы: в тёмной теме инвертируем цвета растрового/монохромного SVG */
.theme-adaptive-logo { filter: none; }
body.theme-dark .theme-adaptive-logo { filter: invert(1) hue-rotate(180deg) brightness(1.1) contrast(1.05); } 