* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: #0b0c10;
    background-image: radial-gradient(circle at 50% 0%, #1f2833 0%, #0b0c10 70%);
    color: #c5c6c7;
    min-height: 100vh;
    overflow-x: hidden; /* Убирает горизонтальную прокрутку на мобильных */
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
   padding:20px;
}

/* === ШАПКА === */
header {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

nav a {
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
    font-size: 14px;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 1;
}

.balance {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    padding: 6px 14px;
    border-radius: 20px;
    color: #000;
    font-weight: bold;
    font-size: 14px;
}

/* === БАННЕР === */
.banner {
   background: linear-gradient(45deg, #FF5722, #FF9800);
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    margin: 25px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

.banner h2 {
    font-size: 28px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.banner p {
    font-size: 16px;
    opacity: 0.9;
}

/* === СЕТКА КАРТОЧЕК (ОСНОВНАЯ ИСПРАВЛЕНИЕ) === */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px; /* Расстояние между блоками */
    margin-bottom: 20px;
}

/* === КАРТОЧКИ === */
.card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === ТАЙМЕР === */
.timer-box {
    text-align: center;
    padding: 10px 0;
}

.timer {
    font-size: 54px;
    font-weight: bold;
    background: linear-gradient(135deg, #181818 0%, #455352 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* === СТАТИСТИКА === */
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 15px;
}

.stat-row:last-child {
    border: none;
}

/* === КНОПКИ === */
.btn {
    background: linear-gradient(45deg, #11998e, #38ef7d);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56,239,125,0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-big {
    padding: 18px;
    font-size: 18px;
}

/* === ВВОДЫ === */
input {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.2);
    color: #fff;
    font-size: 15px;
    outline: none;
}

input:focus {
    border-color: #38ef7d;
}

/* === РЕФЕРАЛЬНАЯ ССЫЛКА === */
.ref-link input {
    font-size: 12px;
    padding: 10px;
    margin-top: 5px;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
}

.hint {
    font-size: 13px;
    opacity: 0.75;
    margin: 10px 0;
    text-align: center;
}

/* === РЕКЛАМНЫЙ БЛОК (ИСПРАВЛЕНИЕ) === */
.ad-banner {
    background: rgba(255,255,255,0.1);
    border: 2px dashed rgba(255,255,255,0.3);
    padding: 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 25px; /* Отступ снизу */
    color: #ddd;
    font-size: 14px;
}

/* === МОДАЛЬНОЕ ОКНО === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    animation: modalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

@keyframes modalPop {
    0% { transform: scale(0.5) translateY(50px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-icon {
    width: 90px; height: 90px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 42px;
    position: relative; z-index: 1;
}

.modal-icon.success {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    box-shadow: 0 10px 30px rgba(0,176,155,0.4);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.modal-bonus {
    background: linear-gradient(135deg, rgba(240,147,251,0.15), rgba(245,87,108,0.15));
    border: 1px solid rgba(245,87,108,0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.modal-bonus-value {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-modal-close {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102,126,234,0.6);
}


/* =========================================
   АДАПТИВНОСТЬ (МОБИЛЬНАЯ ВЕРСИЯ)
   ========================================= */
@media (max-width: 768px) {
    /* Шапка */
    header .wrap {
        flex-direction: column;
        gap: 15px;
    }
    
    nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Баннер */
    .banner {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .banner h2 {
        font-size: 22px; /* Уменьшаем заголовок */
    }
    
    .banner p {
        font-size: 14px;
    }

    /* Сетка - делаем в 1 колонку */
    .grid {
        grid-template-columns: 1fr;
        gap: 15px; /* Чуть меньше отступ */
    }

    /* Карточки */
    .card {
        padding: 20px 15px; /* Уменьшаем внутренние отступы */
    }

    /* Таймер - делаем меньше */
    .timer {
        font-size: 40px; /* Было 54px */
        padding: 15px;
    }

    /* Рекламный блок */
    .ad-banner {
        margin-bottom: 15px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .wrap {
        padding: 10px;
    }
    
    .balance {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .timer {
        font-size: 32px;
    }
}


/* ============================================
   БАННЕРЫ
   ============================================ */

.banners-container {
    margin: 20px 0;
}

/* === ВЕРХНИЕ БАННЕРЫ === */
.banners-container.top {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 100px !important;
    text-align: center;
    margin-bottom: 30px;
}

/* === САЙДБАР === */
.banners-container.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* === НИЖНИЕ БАННЕРЫ === */
.banners-container.bottom {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 100px !important;
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
}

/* === ССЫЛКА-БАННЕР (контейнер для картинки + кнопки) === */
.banner-link {
    position: relative !important;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    overflow: visible !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0 !important;
}

.banner-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.banner-img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

/* === КНОПКА "+" НА БАННЕРЕ === */
.banner-link .add-banner-btn {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    background: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
    transition: 0.3s !important;
    text-decoration: none !important;
    z-index: 999 !important;
}

.banner-link .add-banner-btn:hover {
    transform: scale(1.2) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

.banner-link .add-banner-btn svg {
    width: 16px !important;
    height: 16px !important;
    fill: #333 !important;
}

/* === САЙДБАР === */
.banners-container.sidebar .banner-img {
    width: 100%;
    max-width: 300px;
}

/* === АДАПТИВ === */
@media (max-width: 768px) {
    .banners-container.top,
    .banners-container.bottom {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }

    .banners-container.sidebar {
        margin: 20px 0;
    }
}




/* 💼 Стили для баланса рекламного счёта */
.ads-balance {
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.15), rgba(56, 239, 125, 0.1));
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.ads-balance .balance-icon {
    color: #64ffda;
}

.ads-balance .balance-value {
    color: #64ffda;
}

.ads-balance .balance-currency {
    color: #64ffda;
    opacity: 0.7;
}

/* Балансы в выпадающем меню */
.dropdown-balance,
.dropdown-ads-balance {
    font-size: 13px;
    color: #8892b0;
    margin-top: 6px;
}

.dropdown-balance b {
    color: #38ef7d;
}

.dropdown-ads-balance b {
    color: #64ffda;
}

/* Балансы в мобильном меню */
.mobile-balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: #c5c6c7;
    font-size: 14px;
}

.mobile-balance-item b {
    font-weight: 700;
}

.mobile-balance-item:first-child b {
    color: #38ef7d;
}

.mobile-balance-item:last-child b {
    color: #64ffda;
}

/* ============================================
   ШАПКА САЙТА
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-wrap {
  
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* --- Логотип --- */
.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #fff !important;
  font-size: 22px;
  font-weight: 800;
  transition: transform 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.03);
}

.logo-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 8px rgba(56, 239, 125, 0.4));
}

.logo-text {
  letter-spacing: -0.5px;
}

.logo-accent {
  background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Навигация --- */
.header-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: #38ef7d;
  background: rgba(56, 239, 125, 0.1);
}

/* --- Блок пользователя --- */
.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Чип баланса */
.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 239, 125, 0.12);
  border: 1px solid rgba(56, 239, 125, 0.3);
  padding: 8px 14px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.balance-chip:hover {
  background: rgba(56, 239, 125, 0.2);
  transform: translateY(-1px);
}

.balance-icon {
  font-size: 16px;
}

.balance-value {
  color: #38ef7d;
  font-variant-numeric: tabular-nums;
}

.balance-currency {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  font-size: 13px;
}

/* Кнопка вывода */
.btn-withdraw {
  background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
  color: #000 !important;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
}

.btn-withdraw:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 239, 125, 0.5);
}



/* --- Кнопки для гостей --- */
.header-auth {
  display: flex;
  gap: 10px;
}

.btn-login {
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn-register {
  background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
  color: #000 !important;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(56, 239, 125, 0.35);
}

.btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 239, 125, 0.5);
}

/* --- Бургер --- */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Мобильное меню --- */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(10, 15, 30, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  gap: 5px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-balance {
  background: rgba(56, 239, 125, 0.12);
  border: 1px solid rgba(56, 239, 125, 0.3);
  color: #38ef7d;
  font-weight: 700;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 10px;
}

.mobile-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mobile-link.logout:hover {
  background: rgba(255, 80, 80, 0.15);
  color: #ff6b6b;
}

/* --- НОВЫЕ СТИЛИ ДЛЯ МОБИЛЬНОГО МЕНЮ --- */
.mobile-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 10px 0;
}

.mobile-section-title {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0 16px 5px;
  letter-spacing: 0.5px;
}


/* Компактные чипы на мобильных */
@media (max-width: 768px) {
    .balance-chip {
        padding: 6px 10px !important;
        gap: 4px !important;
    }
    
    .balance-chip .balance-icon {
        font-size: 14px !important;
    }
    
    .balance-chip .balance-value {
        font-size: 12px !important;
    }
    
    .balance-chip .balance-currency {
        display: none !important; /* Скрываем слово "Руб"/"Рекл" на мобилке */
    }
    
    /* Скрываем кнопку "Вывести" на мобилке — она есть в меню */
    .btn-withdraw {
        display: none !important;
    }
    
    /* Чипы ближе друг к другу */
    .header-user {
        gap: 6px !important;
    }
}

/* Скрываем круглую кнопку профиля на мобильных */
@media (max-width: 768px) {
    .user-menu {
        display: none !important;
    }
}
/* ============================================
   АДАПТИВ
   ============================================ */
@media (max-width: 992px) {
  .header-nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .btn-withdraw {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-wrap {
    height: 60px;
    padding: 0 15px;
  }

  .header-logo {
    font-size: 18px;
  }

  .logo-icon {
    font-size: 24px;
  }

  .balance-chip {
    padding: 6px 10px;
    font-size: 12px;
  }

  .balance-currency {
    display: none;
  }

  .user-btn {
    width: 38px;
    height: 38px;
  }

  .btn-login, .btn-register {
    padding: 8px 14px;
    font-size: 13px;
  }
}


.btn-deposit {
    background: #e74c3c;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: 0.3s;
    white-space: nowrap;
    border: none;
    text-decoration: none;
}
.btn-deposit:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    text-decoration: none;
}
@media (max-width: 768px) {
    .user-menu {
        display: none !important;
    }
    
    .header-actions {
        display: none !important;
    }
    
    .btn-deposit,
    .btn-withdraw {
        display: none;
    }
}



/* Контейнер баннеров — ОДИНАКОВЫЙ ВЕЗДЕ */
.banners-container {
    display: flex !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Каждый баннер — НЕ СЖИМАЕТСЯ */
.banners-container .banner-item {
    position: relative !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.banners-container .banner-item .banner-link {
    display: block !important;
    transition: opacity 0.3s !important;
    position: relative !important;
}

.banners-container .banner-item .banner-link:hover {
    opacity: 0.85 !important;
}

.banners-container .banner-item .banner-img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 6px !important;
}

/* Заглушка */
.banners-container .banner-empty {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 60px !important;
    min-width: 200px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px dashed rgba(255,255,255,0.15) !important;
    border-radius: 8px !important;
    color: #8892b0 !important;
    font-size: 13px !important;
    padding: 10px 15px !important;
}

/* Кнопка "+" — ПРЯМО НА БАННЕРЕ */
.banners-container .banner-item .add-banner-btn {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    background: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
    transition: 0.3s !important;
    text-decoration: none !important;
    z-index: 999 !important;
    flex-shrink: 0 !important;
}

.banners-container .banner-item .add-banner-btn:hover {
    transform: scale(1.2) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

.banners-container .banner-item .add-banner-btn svg {
    width: 16px !important;
    height: 16px !important;
    fill: #333 !important;
}

@media (max-width: 600px) {
    .banners-container {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }
    .banners-container .banner-item {
        width: 100% !important;
        text-align: center !important;
    }
}



.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 20px;
    gap: 20px;
}

/* Левая часть: кнопка + лого */
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Правая часть: балансы + профиль */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Навигация по центру */
.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
}
.header-nav a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    white-space: nowrap;
}
.header-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.header-nav a.active { background: rgba(56, 239, 125, 0.12); color: #38ef7d; }


/* Меню пользователя */
.user-menu {
  position: relative;
}

.user-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.user-btn:hover {
  background: rgba(56, 239, 125, 0.2);
  border-color: #38ef7d;
}

.user-avatar {
  color: #38ef7d;
  font-weight: 700;
  font-size: 16px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(20, 25, 45, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  min-width: 240px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 10px 12px;
}

.dropdown-name {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.dropdown-wallet {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  word-break: break-all;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

.dropdown-link {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dropdown-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dropdown-link.logout:hover {
  background: rgba(255, 80, 80, 0.15);
  color: #ff6b6b;
}




/* ===== SIDEBAR — ВЫРАВНИВАНИЕ ИКОНОК ===== */
.sidebar-item {
    display: flex !important;
    align-items: center !important;
    padding: 10px 18px !important;
    gap: 0 !important;
}

.sidebar-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 20px !important;
    font-size: 16px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    margin-right: 12px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.sidebar-item span:not(.sidebar-icon) {
    flex: 1 !important;
}



.info-hero {
  text-align: center;
  margin-bottom: 30px;
  padding: 40px 20px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
}
.info-hero-icon { font-size: 56px; margin-bottom: 15px; }
.info-hero h1 { color: #fff; font-size: 34px; font-weight: 800; margin: 0 0 10px; }
.info-hero p { color: rgba(255,255,255,0.7); font-size: 16px; margin: 0; }





/* Отступ контента на десктопе */
body.has-sidebar {
   
    transition: padding-left 0.3s ease;
}
body.sidebar-collapsed {
    padding-left: 0;
}

/* Кнопка сворачивания sidebar */
.sidebar-toggle {
    display: none;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    margin-right: 10px;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    flex-shrink: 0;
}
.sidebar-toggle:hover {
    background: rgba(255,255,255,0.15);
}
.sidebar-toggle svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

/* бейдж — справа, ровно по центру */
.sidebar-badge {
    margin-left: auto;
    /* background: #16a34a; */
    color: #12b5a6;
    font-weight: 800;
    font-size: 12px;
    padding: 4px 10px;
    /* border-radius: 999px; */
    line-height: 1;
    /* box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15); */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-badge.zero{
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  box-shadow: none;
}
.sidebar-item{
  white-space: nowrap;
}
/* ===== SIDEBAR ===== */
.site-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    
    background: rgba(12, 14, 20, 0.98);
    border-right: 1px solid rgba(255,255,255,0.08);
    overflow-y: auto;
    z-index: 900;
    transition: transform 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.site-sidebar::-webkit-scrollbar { width: 4px; }
.site-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.site-sidebar.collapsed {
    transform: translateX(-230px);
}

.sidebar-navs {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    width: 220px;
}

.sidebar-section-title {
    color: rgba(255,255,255,0.3);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 14px 18px 6px;
    font-weight: 700;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}
.sidebar-item:hover {
    background: rgba(255,255,255,0.04);
    color: #fff;
}
.sidebar-item.active {
    background: rgba(56, 239, 125, 0.08);
    color: #38ef7d;
    border-left-color: #38ef7d;
}
.sidebar-item.logout:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.sidebar-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}


/* чтобы лого и меню жили рядом */
.header-left{
  display: flex;
  align-items: center;
  gap: 140px;
}

/* гостевое меню */
.header-guest-nav{
  display: flex;
  align-items: center;
  gap: 42px;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-guest-nav a{
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  font-weight: 700;

  font-size: 18px !important;   /* <- важное */
  line-height: 1;
}

.header-guest-nav a:hover{
  color: #ffd700;
}
/* ЛЮБОЙ sidebar-item: делаем “контейнером” для абсолютного badge */
.sidebar-item{
  position: relative;          /* ✅ важно */
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  white-space: nowrap;

  justify-content: flex-start;
  overflow: hidden;
  
  /* ✅ освобождаем место под badge, чтобы текст не налезал */
  padding-right: 52px; 
}

/* badge всегда на фиксированном X справа */
.sidebar-badge{
  position: absolute;          /* ✅ фиксируем справа */
  right: 18px;                /* должно совпасть с padding-right якоря */
  top: 50%;
  transform: translateY(-50%);

  color: #12b5a6;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;

  font-variant-numeric: tabular-nums; /* на всякий */
  text-align: right;
  flex-shrink: 0;
  
  /* если хочешь “пилюлю”, раскомментируй эти строки */
  /* background: rgba(56,239,125,0.12);
  border-radius: 999px;
  padding: 4px 10px; */
  /* сейчас у тебя padding/фон закомментированы — поэтому оставляю минимум */
  padding: 4px 10px;          /* чтобы было как раньше визуально */
  border-radius: 999px;
  background: rgba(56,239,125,0.12);
  box-shadow: 0 0 0 2px rgba(18,181,166,0.08);
}

/* zero — как у тебя */
.sidebar-badge.zero{
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  box-shadow: none;
}

/* на мобилке скрываем */
@media (max-width: 768px){
  .header-guest-nav{ display:none !important; }
}


/* Скрываем на мобильных */
.d-none-mobile {
    display: flex !important;
}

@media (max-width: 1024px) {
    .d-none-mobile {
        display: none !important;
    }
}
/* На планшетах и мобильных — sidebar скрыт */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: none !important;
    }
    .site-sidebar {
        display: none !important;
    }
    body.has-sidebar {
        padding-left: 0;
    }
    body.sidebar-collapsed {
        padding-left: 0;
    }
}

/* На десктопе показываем кнопку сворачивания */
@media (min-width: 1025px) {
    .sidebar-toggle {
        display: flex;
    }
}


@media (max-width: 768px){

  /* Скрываем верхнее меню */
  .header-nav{
    display:none !important;
  }

  /* Чтобы бургеру было место */
  .balance-chip{
    display:none !important;
  }
  .header-right .user-menu{
    display:none !important;
  }

  /* Бургер: гарантированно виден и рисует 3 полоски */
  .header-right .burger{
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    z-index:1000001 !important;
    margin-left:0 !important;
    position:relative !important;

    flex-direction:column !important;
    gap:6px !important;
    align-items:center !important;
    justify-content:center !important;
  }

  /* Важно: принудительно показываем все 3 span */
  .header-right .burger span{
    display:block !important;
    opacity:1 !important;
    transform:none !important;

    width:26px !important;
    height:2px !important;
    background:#fff !important;
    border-radius:2px !important;
  }

  /* Мобильное меню: закрыто по умолчанию */
  #mobileMenu{
    display:none !important;
    position: fixed !important;
    top: 90px !important;
    z-index: 1000000 !important;
    flex-direction: column !important;
    box-shadow: 0 26px 90px rgba(0, 0, 0, .65) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 84px) !important;
    border-radius:18px !important;

    left: 12px !important;
    right: 12px !important;
    padding: 14px 14px 10px !important;
    background: rgba(8,10,14,.96) !important;
  }

  /* Открытое меню */
  #mobileMenu.open{
    display:flex !important;
  }

  /* Пункты меню */
  .mobile-link{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:10px !important;

    padding:11px 12px !important;
    border-radius:14px !important;

    background: rgba(255,255,255,.04) !important;
    border:1px solid rgba(255,255,255,.08) !important;

    color:#fff !important;
    text-decoration:none !important;
    font-weight:1000 !important;
  }

  .mobile-link:hover{
    background: rgba(56,239,125,.10) !important;
    border-color: rgba(56,239,125,.25) !important;
  }

  .mobile-divider{
    height:1px !important;
    background: rgba(255,255,255,.10) !important;
    margin:4px 2px !important;
  }

  .mobile-section-title{
    font-size:12px !important;
    font-weight:1200 !important;
    color: rgba(124,255,203,.95) !important;
    letter-spacing:.6px !important;
    text-transform:uppercase !important;
    padding:2px 4px 0 !important;
  }

  /* Если ты добавишь блок баланса/профиля в меню */
  .mobile-profile-balance{
    padding:12px !important;
    border-radius:16px !important;
    border:1px solid rgba(56,239,125,.22) !important;
    background: rgba(56,239,125,.08) !important;
    margin-bottom:8px !important;
  }
  .mobile-profile-name{
    font-weight:1200 !important;
    color:#fff !important;
    margin-bottom:6px !important;
  }
  .mobile-profile-row{
    font-size:13px !important;
    opacity:.95 !important;
    color:#e9edf5 !important;
    margin-top:5px !important;
  }
  .mobile-profile-row b{ color:#7CFFB2 !important; }

  /* ===== Бургер -> крестик при .open (только на мобилке) ===== */
  .header-right .burger.open span:nth-child(1){
    transform: translateY(8px) rotate(45deg) !important;
  }
  .header-right .burger.open span:nth-child(2){
    opacity:0 !important;
    transform: scaleX(0) !important;
  }
  .header-right .burger.open span:nth-child(3){
    transform: translateY(-8px) rotate(-45deg) !important;
  }
}



.online-vertical {
    position: fixed;
    right: 6px;
    top: 120px;
    z-index: 99999;
    pointer-events: none;
    background: #38ef7d4d;
    border: 1px solid #38ef7d4d;
    border-radius: 10px;
    padding: 10px 6px;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

  .online-vertical-inner{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .online-vertical-num{
  color: #f0f5ff;
  font-weight: 900;
 
  line-height: 1;
  padding: 0;

  writing-mode: vertical-rl; /* цифры/текст по вертикали */
  transform: rotate(180deg); /* переворот чтобы читалось как надо */
}
  .online-vertical-label{
    color: rgba(255,255,255,0.65);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    writing-mode: vertical-rl;   /* вертикально */
    transform: rotate(180deg);  /* чтобы читалось снизу вверх */
  }

  /* если нужно совсем маленько — можешь подстроить ширину/паддинги */
  @media (max-width: 900px){
    .online-vertical{ top: 90px; right: 4px; transform: scale(0.95); }
  }
  
  
  
/* ============================================
   СТИЛИ ФУТЕРА
   ============================================ */

.site-footer {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 60px;
  padding: 50px 0 0;
  color: #fff;
}

.footer-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Сетка колонок --- */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

/* --- Колонка --- */
.footer-col h4.footer-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 18px;
  color: #fff;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background: #38ef7d;
  border-radius: 2px;
}

/* --- Логотип в футере --- */
.footer-logo {
  display: inline-block;
  font-size: 22px;
  font-weight: 800;
  color: #fff !important;
  text-decoration: none !important;
  margin-bottom: 14px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 20px;
  max-width: 280px;
}

/* --- Соцсети --- */
.footer-socials {
  display: flex;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #38ef7d;
  color: #000;
  border-color: #38ef7d;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(56, 239, 125, 0.3);
}

/* --- Ссылки --- */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links a:hover {
  color: #38ef7d;
  transform: translateX(4px);
}

.footer-icon {
  font-size: 14px;
}

/* --- Разделитель --- */
.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  margin-bottom: 20px;
}

/* --- Нижняя часть --- */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.footer-disclaimer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  margin: 0;
}

/* ============================================
   АДАПТИВ
   ============================================ */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 576px) {
  .site-footer {
    padding: 30px 0 0;
    margin-top: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    text-align: center;
  }

  .footer-col h4.footer-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-desc {
    max-width: 100%;
  }

  .footer-socials {
    justify-content: center;
  }

  .footer-links a {
    justify-content: center;
  }

  .footer-links a:hover {
    transform: none;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}  
  .user-btn{
  background: transparent;
  border: none;
  cursor: pointer;
}

.user-avatar-img,
.user-avatar{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.user-avatar-img{
  object-fit: cover;
}

    .afg{ --ac:#ff7a1a; --ac2:#ff9a4d; --panel:rgba(255,255,255,.03); --stroke:rgba(255,255,255,.07); --muted:#98a2b3; --shadow:0 18px 60px rgba(0,0,0,.35); --radius:18px; }
    .afg *{ box-sizing:border-box; }
    .afg .wrap{ max-width:1100px; margin:0 auto; padding:18px 16px 60px; }
    .afg .grid{ display:grid; grid-template-columns:420px 1fr; gap:16px; align-items:stretch; }
    @media(max-width:980px){ .afg .grid{ grid-template-columns:1fr; } }

    .afg .hero{
      background: linear-gradient(135deg, rgba(56,239,125,.18), rgba(17,153,142,.10));
      border: 1px solid rgba(56,239,125,.25);
      border-radius: 16px;
      box-shadow: var(--shadow);
      padding: 14px 16px;
      margin-bottom: 16px;
    }
    .afg .hero .title{ font-size:20px; color:#fff; font-weight:1100; margin-bottom:6px; }
    .afg .hero .sub{ color: rgba(215,221,232,.85); font-size:13px; line-height:1.35; }

    .afg .panel{
      background: var(--panel);
      border: 1px solid var(--stroke);
      border-radius: var(--radius);
      padding: 16px;
      box-shadow: 0 12px 40px rgba(0,0,0,.20);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      display:flex;
      flex-direction:column;   /* ВАЖНО для отсутствия пустоты */
    }

    .afg .section{ margin-bottom:14px; }
    .afg .section:last-child{ margin-bottom:0; }

    .afg .lbl{
      display:flex; align-items:center; gap:8px;
      font-size:11px; font-weight:900;
      text-transform:uppercase; letter-spacing:.6px;
      color: var(--muted);
      margin-bottom:8px;
    }
    .afg .lbl i{ color: var(--ac); font-size:12px; }

    .afg input[type="text"], .afg input[type="color"], .afg input[type="url"]{ width:100%; }
    .afg input[type="text"], .afg input[type="url"]{
      padding:10px 12px;
      border-radius:10px;
      background: rgba(127,127,127,.04);
      border: 1px solid rgba(255,255,255,.07);
      color: #fff;
      font-family:inherit;
      font-size:13px;
      font-weight:650;
      outline:none;
    }
    .afg input[type="text"]:focus, .afg input[type="url"]:focus{
      border-color: rgba(255,255,255,.18);
      box-shadow: 0 0 0 3px rgba(56,239,125,.12);
    }

    .afg .row{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
    @media(max-width:520px){ .afg .row{ grid-template-columns:1fr; } }

    .afg .colorItem{
      display:flex; align-items:center; gap:10px;
      padding:10px; border-radius:12px;
      border: 1px solid rgba(255,255,255,.07);
      background: rgba(127,127,127,.04);
    }
    .afg .colorSwatch{
      width:34px; height:34px; border-radius:10px;
      border:2px solid rgba(255,255,255,.12);
      overflow:hidden;
      background: rgba(255,255,255,.05);
      flex-shrink:0;
      position:relative;
    }
    .afg .colorSwatch input{ position:absolute; inset:-6px; width:calc(100% + 12px); height:calc(100% + 12px); border:none; padding:0; cursor:pointer; background:transparent; }
    .afg .colorName{ color:#fff; font-weight:800; font-size:12px; }

    .afg .logoBox{
      display:flex; gap:12px; align-items:center;
      border: 1.5px dashed rgba(255,255,255,.18);
      border-radius: 14px;
      padding: 12px;
      background: rgba(127,127,127,.03);
      position:relative;
      overflow:hidden;
    }
    .afg .logoBox input[type="file"]{ position:absolute; inset:0; opacity:0; cursor:pointer; }
    .afg .logoPrev{
      width:42px; height:42px; border-radius:12px;
      border: 1px solid rgba(255,255,255,.15);
      background: rgba(255,255,255,.04);
      display:flex; align-items:center; justify-content:center;
      color: rgba(255,255,255,.85);
      flex-shrink:0;
      overflow:hidden;
    }
    .afg .logoPrev img{ width:100%; height:100%; object-fit:contain; display:block; }
    .afg .logoText .t1{ color:#fff; font-weight:900; font-size:13px; }
    .afg .logoText .t2{ color: var(--muted); font-size:11px; margin-top:2px; font-weight:700; }

    .afg .clearBtn{
      width:28px; height:28px; border-radius:50%;
      border:none; background:#dc3545; color:#fff;
      display:flex; align-items:center; justify-content:center;
      cursor:pointer; flex-shrink:0; opacity:.9;
      margin-left:auto;
    }

    .afg .btns{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
    .afg button{
      border:none; cursor:pointer; font-family:inherit;
      font-weight:900; text-transform:uppercase; letter-spacing:.5px;
      border-radius:14px; padding:12px 14px;
      transition: .18s ease;
    }
    .afg .btnPrimary{
      background: linear-gradient(135deg, var(--ac), var(--ac2));
      color:#170c2b;
      box-shadow: 0 10px 24px rgba(0,0,0,.35);
    }
    .afg .btnPrimary:hover{ transform: translateY(-2px); filter:brightness(1.02); }
    .afg .btnSecondary{
      background: rgba(127,127,127,.08);
      color: #fff;
      border: 1px solid rgba(255,255,255,.12);
    }
    .afg .btnSecondary:hover{ transform: translateY(-2px); border-color: rgba(255,255,255,.2); }

    .afg .previewTop{ flex:0 0 auto; }
    .afg .orderWrap{ flex:1 1 auto; margin-top:14px; display:flex; }
    .afg .orderCard{ width:100%; height:100%; }

    .afg .previewHead{
      display:flex; justify-content:space-between; align-items:center;
      margin-bottom:12px;
      color:#fff; font-weight:900;
    }
    .afg .previewHead small{
      color: var(--muted);
      font-weight:800;
      font-size:11px;
      text-transform:uppercase;
      letter-spacing:.5px;
    }
    .afg .canvasWrap{
      background: rgba(255,255,255,.02);
      border: 1px solid rgba(255,255,255,.07);
      border-radius: var(--radius);
      padding: 14px;
      box-shadow: 0 18px 60px rgba(0,0,0,.25);
    }
    .afg canvas{
      display:block;
      width:468px;
      height:60px;
      border-radius: 12px;
    }

    /* ===== Тематика ===== */
    .afg .bgtm-grid{
      display:grid;
      grid-template-columns: repeat(5, 1fr);
      gap:10px;
      margin-bottom: 4px;
    }
    .afg .bgtm-item{
      height:46px;
      border-radius:12px;
      border:1px solid rgba(255,255,255,.10);
      color:#fff;
      cursor:pointer;
      font-size:16px;
      display:flex;
      align-items:center;
      justify-content:center;
      box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
      outline:none;
      position:relative;
      overflow:hidden;
    }
    .afg .bgtm-item i{ filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
    .afg .bgtm-item.active{
      outline:2px solid rgba(255,122,26,.95);
      outline-offset:2px;
    }

    /* ===== Блок заказа справа (красиво и ровно, как на скрине) ===== */
    .orderCard{
      background: rgba(255,255,255,.02);
      border: 1px solid rgba(255,255,255,.07);
      border-radius: var(--radius);
      padding: 16px;
      box-shadow: 0 18px 60px rgba(0,0,0,.18);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);

      display:flex;
      flex-direction:column;
      justify-content:flex-start;
    }

    .orderTitle{
      display:flex;
      align-items:center;
      gap:10px;
      margin-bottom:8px;
      color:#fff;
      font-weight:1100;
      font-size:18px;
    }
    .orderSub{
      margin:0 0 14px;
      color: rgba(215,221,232,.85);
      font-size:13px;
      line-height:1.35;
    }

    .orderSection{
      margin-top:14px;
      padding-top:14px;
      border-top:1px solid rgba(255,255,255,.07);
    }
    .orderSection:first-child{
      margin-top:0;
      padding-top:0;
      border-top:none;
    }

    .orderLbl{
      color: var(--muted);
      text-transform:uppercase;
      font-weight:900;
      letter-spacing:.6px;
      font-size:11px;
      margin-bottom:8px;
      display:flex;
      align-items:center;
      gap:8px;
    }

    .orderInput{
      width:100%;
      padding:11px 12px;
      border-radius:12px;
      background: rgba(127,127,127,.04);
      border: 1px solid rgba(255,255,255,.08);
      color:#fff;
      outline:none;
      font-family:inherit;
      font-size:13px;
      font-weight:650;
    }
    .orderInput:focus{
      border-color: rgba(255,255,255,.18);
      box-shadow: 0 0 0 3px rgba(56,239,125,.12);
    }

    .orderRow{
      display:grid;
      grid-template-columns:1fr 1fr;
      gap:10px;
    }
    @media(max-width:520px){ .orderRow{ grid-template-columns:1fr; } }

    .periodRow{
      display:grid;
      grid-template-columns: 1fr 1fr;
      gap:10px;
    }

    .periodCard, .payCard{
      border-radius:14px;
      padding:12px;
      border:1px solid rgba(255,255,255,.08);
      background: rgba(127,127,127,.03);
      cursor:pointer;
      user-select:none;
      color:#fff;
      display:flex;
      gap:10px;
      align-items:center;
      min-height:44px;
    }

    .periodCard input, .payCard input{ margin:0; }

    .orderSubmit{
      margin-top:16px;
      width:100%;
      border:none;
      cursor:pointer;
      font-weight:1100;
      text-transform:uppercase;
      letter-spacing:.5px;
      border-radius:14px;
      padding:14px 14px;
      background: linear-gradient(135deg, var(--ac), var(--ac2));
      color:#170c2b;
      box-shadow: 0 12px 30px rgba(0,0,0,.35);
      transition: .18s ease;
      display:flex;
      justify-content:center;
      align-items:center;
      gap:10px;
    }
    .orderSubmit:hover{ transform: translateY(-2px); filter:brightness(1.02); }

    .orderHint{
      margin-top:10px;
      color: rgba(215,221,232,.85);
      font-size:12px;
      line-height:1.35;
      display:flex;
      gap:10px;
      align-items:flex-start;
    }
    .presetSection{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.07);
}

.presetTitle{
  display:flex;
  align-items:center;
  gap:10px;
  color:#fff;
  font-weight:1100;
  font-size:14px;
  margin-bottom:10px;
}

.presetGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.presetBtn{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(127,127,127,.03);
  color:#fff;
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
  text-align:left;
  transition:.18s ease;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

.presetBtn span{
  font-weight:900;
  letter-spacing:.2px;
  font-size:13px;
}

.presetBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,122,26,.45);
}
@media(max-width:520px){
  .presetGrid{ grid-template-columns:1fr; }
}

    @media(max-width:520px){
  .afg .canvasWrap{ padding:10px; }
  .afg canvas{
    width:100% !important;   /* важно из-за возможного inline/стилей */
    height:auto !important;
    aspect-ratio: 468 / 60;  /* чтобы сохранялось 468×60 по пропорциям */
  }
}
