/* Сгенерировано scripts/build-css.js из common.css, style.css, currencySelector.css, lang-switcher.css, site-nav.css. Не редактировать: правьте исходники и пересоберите. */
/* ===== common.css ===== */
/**
 * Benefit Exchange - Общие стили
 * Используются как на веб-сайте, так и в Telegram MiniApp
 */

:root {
  /* Основные цвета в стиле Liquid Glass */
  --primary-color: #007AFF;
  --primary-dark: #0051D5;
  --primary-light: #5AC8FA;
  --secondary-color: rgba(248, 249, 250, 0.8);
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-light: #86868B;
  --border-color: rgba(0, 0, 0, 0.1);
  --success-color: #34C759;
  --error-color: #FF3B30;
  --warning-color: #FF9500;
  
  /* Градиенты Dark Theme */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --gradient-light: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  --gradient-background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 50%, #050510 100%);
  
  /* Тени в стиле Liquid Glass */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  
  /* Радиусы (более закругленные) */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  /* Отступы */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Шрифты */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  
  /* Переходы */
  --transition-fast: 0.15s;
  --transition-base: 0.3s;
  --transition-slow: 0.5s;
}

/* Базовые стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--gradient-background);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Animated Shader Background Container */
#shader-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

#shader-background canvas {
  display: block;
  width: 100vw !important;
  height: 100vh !important;
  position: absolute;
  top: 0;
  left: 0;
}

/* Fallback анимированный фон (если WebGL не поддерживается или шейдер отключен) */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(118, 75, 162, 0.06) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -2;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 30px) scale(1.1); }
}

/* Контейнеры */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-md);
  position: relative;
  z-index: 1;
}

.container-fluid {
  width: 100%;
  padding: var(--spacing-md);
  position: relative;
  z-index: 1;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

/* Кнопки в стиле Liquid Glass */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  background: rgba(102, 126, 234, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  box-shadow: var(--shadow-glass), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover:not(:disabled)::before {
  left: 100%;
}

.btn:hover:not(:disabled) {
  background: rgba(102, 126, 234, 1);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-secondary {
  background: var(--secondary-color);
  color: var(--text-primary);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-danger {
  background: var(--error-color);
  color: white;
}

.btn-block {
  width: 100%;
  display: block;
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: 16px 32px;
  font-size: var(--font-size-lg);
}

/* Формы */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  transition: all var(--transition-base);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-primary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
  opacity: 0.7;
}

.form-input[readonly] {
  background-color: var(--secondary-color);
  cursor: not-allowed;
}

.form-error {
  color: var(--error-color);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-xs);
}

/* Карточки - тёмная тема */
.card {
  background: rgba(20, 20, 35, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(102, 126, 234, 0.15);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.card-header {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.card-body {
  padding: var(--spacing-md) 0;
  color: rgba(255, 255, 255, 0.9);
}

.card-body p,
.card-body strong {
  color: rgba(255, 255, 255, 0.95);
}

.card-body code {
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Monaco', 'Courier New', monospace;
}

.card-footer {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

/* Алерты */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Утилиты */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-success {
  color: var(--success-color);
}

.text-error {
  color: var(--error-color);
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Адаптивность */
@media (max-width: 768px) {
  .container {
    padding: var(--spacing-sm);
  }
  
  h1 {
    font-size: var(--font-size-3xl);
  }
  
  h2 {
    font-size: var(--font-size-2xl);
  }
  
  .card {
    padding: var(--spacing-md);
  }
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--transition-base) ease-out;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
}

/* Footer Styles - тёмная тема */
footer {
  background: rgba(10, 10, 20, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(102, 126, 234, 0.1);
  margin-top: 60px;
  padding: 40px 0 20px;
  position: relative;
  z-index: 1;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.footer-section p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  text-decoration: none;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
}

.telegram-link {
  display: inline-block;
  transition: all 0.3s ease;
  border-radius: 50%;
  line-height: 0;
}

.telegram-link:hover {
  transform: translateY(-4px) scale(1.05);
  filter: drop-shadow(0 8px 16px rgba(42, 171, 238, 0.4));
}

.telegram-link svg {
  display: block;
  border-radius: 50%;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  line-height: 1.8;
}

.footer-bottom p {
  margin: 6px 0;
}

/* Features Section */
.features-section {
  margin: 50px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: rgba(20, 20, 35, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.4);
  background: rgba(30, 30, 50, 0.8);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.feature-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

@media (max-width: 768px) {
  footer {
    padding: 30px 0 15px;
    margin-top: 40px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 20px;
  }

  .footer-section {
    text-align: center;
  }
}

/* ===== style.css ===== */
/* Импорт общих стилей */

/* Navigation */
.nav-links {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.nav-links {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links a {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.nav-links a.active {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    background: rgba(102, 126, 234, 0.3);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Alert styles */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Контейнер уже определен в common.css */

/* Выравнивание отступов на главной странице */
body:not(.order-page) .container {
    padding-top: 24px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
    margin-bottom: 8px;
}

.logo-link:hover {
    opacity: 0.85;
}

.logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.logo-benefit {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo-exchange {
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: -0.5px;
}

header h1 a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: inline-block;
}

header h1 a:hover {
    opacity: 0.8;
}

.subtitle {
    font-size: var(--font-size-lg);
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
}

.exchange-form {
    padding: 0;
    position: relative;
    max-width: 100%;
}

.exchange-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-bottom: 24px;
    max-width: 100%;
}

.currency-input-row {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    position: relative;
}

.currency-input-row {
    max-width: 100%;
    width: 100%;
    min-width: 0;
}

.currency-input-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.currency-input-row label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-size: calc(var(--font-size-sm) * 1.2);
}

.input-currency-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    margin-bottom: 20px; /* Постоянный отступ для лимитов - не прыгает */
}

.amount-currency-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  background: rgba(15, 15, 25, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(102, 126, 234, 0.25);
  overflow: visible !important; /* Важно: не обрезаем dropdown */
  transition: all var(--transition-base);
  height: 70px;
  position: relative;
  z-index: 1;
}

/* Когда dropdown открыт, изменяем скругление только сверху для визуального соединения */
.amount-currency-row.dropdown-open {
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    border-bottom: none !important;
    /* Усиливаем эффект стекла для визуального соединения */
    box-shadow: 
        0 -4px 16px rgba(0, 0, 0, 0.2),
        0 4px 16px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1) !important;
}

.amount-currency-row:focus-within {
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.15);
}

.amount-currency-row .amount-input,
.amount-currency-row .amount-input-search {
    flex: 1;
    padding: 20px 20px;
    border: none;
    background: transparent;
    font-size: calc(var(--font-size-lg) * 1.2);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    outline: none;
    box-sizing: border-box;
    transition: all var(--transition-base);
    min-width: 150px;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.amount-currency-row .amount-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.amount-currency-row .amount-input-search::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 0.7;
    font-size: calc(var(--font-size-base) * 1.1);
}

.amount-currency-row .amount-input-search {
    display: none;
}

.amount-currency-row .amount-input-search.active {
    display: block;
}

.amount-currency-row .amount-input-search:focus {
    outline: none;
}

/* Убираем стрелки у number input */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.amount-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.amount-input[readonly] {
    opacity: 0.8;
    cursor: default;
}

.input-currency-wrapper .currency-selector-wrapper {
    position: absolute !important;
    top: calc(100% - 1px) !important; /* Точное соединение без зазора (минус 1px для перекрытия границы) */
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    overflow: visible !important;
    display: none !important;
    visibility: hidden !important;
    margin-top: 0 !important;
    pointer-events: none !important;
    transform: translateY(-10px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.input-currency-wrapper .currency-selector-wrapper.active {
    display: block !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.amount-currency-row .currency-selector-btn {
    flex-shrink: 0;
    width: 150px;
    min-width: 155px;
    max-width: 150px;
    padding: 20px 40px 20px 20px;
    border: none;
    background: transparent;
    font-size: calc(var(--font-size-base) * 1.2);
    transition: all var(--transition-base);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    text-align: right;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.amount-currency-row .currency-selector-btn:hover {
    background: transparent;
    opacity: 0.8;
}

.amount-currency-row .currency-selector-btn.active {
    background: transparent;
    opacity: 1;
}

.currency-selector-placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
}

.currency-selector-selected {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.currency-logo-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.currency-selector-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.currency-network-logo {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(30, 30, 40, 0.98);
    background: rgba(30, 30, 40, 0.98);
    z-index: 10;
}

.currency-selector-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    align-items: flex-end;
    justify-content: center;
}

.currency-selector-name {
    font-weight: 600;
    font-size: calc(var(--font-size-sm) * 1.3);
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    line-height: 1.2;
    text-align: right;
}

.currency-network-badge {
    display: none;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 2px 7px;
    white-space: nowrap;
    line-height: 1.2;
    text-align: right;
    /* Цвета задаются динамически через JavaScript в зависимости от сети */
}

.currency-selector-code {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    display: none;
}

.currency-selector-arrow {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    transition: transform var(--transition-base);
    flex-shrink: 0;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.currency-selector-btn.active .currency-selector-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Старые стили для совместимости */
.currency-input {
    display: flex;
    flex-direction: column;
}

.currency-input label {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.currency-input input,
.currency-input select {
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.currency-input input:focus,
.currency-input select:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.currency-input input[readonly] {
    background: rgba(248, 249, 250, 0.3);
    opacity: 0.8;
}

.swap-btn {
    width: auto;
    height: auto;
    min-width: 32px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-xl);
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 18px;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.swap-btn:hover {
    color: rgba(102, 126, 234, 1);
    background: transparent;
}

/* Анимация через JS-класс */
.swap-btn.swapping {
    transform: rotate(180deg) !important;
    color: rgba(102, 126, 234, 1);
}

@keyframes swapGlow {
    0%, 100% {
        color: rgba(102, 126, 234, 1);
        text-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
    }
    50% {
        color: rgba(102, 126, 234, 0.7);
        text-shadow: 0 0 10px rgba(102, 126, 234, 0.8), 0 0 20px rgba(102, 126, 234, 0.4);
    }
}

/* Rate info removed - курс рассчитывается автоматически */

.address-input {
    margin-bottom: 20px;
}

.address-input label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-size: calc(var(--font-size-sm) * 1.2);
}

.address-input input {
  width: 100%;
  height: 70px;
  padding: 20px 30px;
  font-size: calc(var(--font-size-base) * 1.3);
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  background: rgba(15, 15, 25, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: none;
  box-sizing: border-box;
}

.address-input input:focus {
  outline: none;
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(20, 20, 35, 0.9);
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.15);
}

.address-input input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 0.7;
}


.order-type {
    margin-bottom: 30px;
}

.order-type label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.type-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.type-btn {
  flex: 1;
  padding: 14px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: var(--radius-md);
  background: rgba(15, 15, 25, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: none;
  box-shadow: none;
}

.type-btn:hover {
  background: rgba(25, 25, 40, 0.9);
  border-color: rgba(102, 126, 234, 0.4);
  transform: translateY(-1px);
}

.type-btn.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  color: rgba(255, 255, 255, 0.95);
  text-shadow: none;
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.exchange-btn {
  width: 100%;
  padding: 16px;
  background: rgba(40, 40, 60, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: rgba(255, 255, 255, 0.6);
  text-shadow: none;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: var(--radius-md);
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.exchange-btn.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 0 25px rgba(102, 126, 234, 0.3);
}

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

.exchange-btn:hover:not(:disabled)::before {
    left: 100%;
}

.exchange-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(102, 126, 234, 1) 0%, rgba(118, 75, 162, 1) 100%);
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
}

.exchange-btn:disabled {
  background: rgba(40, 40, 60, 0.6);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.order-result {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glass);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.order-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

@media (max-width: 768px) {
    .exchange-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .swap-btn {
        transform: rotate(90deg);
        align-self: center;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    /* Анимация через JS-класс на мобильных */
    .swap-btn.swapping {
        transform: rotate(270deg) !important;
    }

    header h1 {
        font-size: 2rem;
    }
}

/* Предотвращаем горизонтальный скролл глобально */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

/* ===== FOOTER STYLES ===== */
footer {
    margin-top: 60px;
    padding: 40px 0 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 20, 0.5) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1.5fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: rgba(255, 255, 255, 0.95);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 6px 0;
}

.social-link:hover {
    color: rgba(255, 255, 255, 0.95);
}

.social-link svg {
    flex-shrink: 0;
}

.copy-tooltip {
    position: absolute;
    right: -90px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.copy-tooltip.show {
    opacity: 1;
    transform: translateX(0);
}

.social-link.email-link {
    position: relative;
}

/* «Email» в подвале — кнопка копирования, а не ссылка javascript:void(0) (Lighthouse SEO: ссылки без адреса) */
button.social-link {
    background: none;
    border: 0;
    margin: 0;
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-terms-link {
    display: inline-block;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-terms-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== ORDER TYPE HELP BUTTON ===== */
.type-buttons {
    display: flex;
    align-items: center;
}

.type-help-btn {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.type-help-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(139, 92, 246, 0.5));
    border-color: rgba(99, 102, 241, 0.6);
    color: #c4b5fd;
}

.type-help-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(5px);
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.98), rgba(20, 20, 40, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 8px;
    padding: 8px 14px;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 100;
    pointer-events: none;
}

.type-help-btn:hover .type-help-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.type-help-tooltip::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(99, 102, 241, 0.4);
}

.type-help-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(30, 30, 50, 0.98);
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(145deg, rgba(25, 25, 45, 0.98), rgba(15, 15, 30, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 32px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.1);
    animation: modalSlideIn 0.3s ease;
}

.modal-section-last {
    border-bottom: none !important;
    margin-bottom: 16px !important;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 24px;
    padding-right: 40px;
    text-align: center;
}

.modal-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.modal-section h3 {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
}

.modal-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 12px;
}

.modal-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.modal-section li {
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 0 6px 24px;
    position: relative;
    line-height: 1.6;
}

.modal-section li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #a5b4fc;
}

.modal-highlight {
    padding: 14px 18px;
    border-radius: 12px;
    margin-top: 12px;
}

.modal-highlight.warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.modal-highlight.warning strong {
    color: #fcd34d;
}

.modal-highlight.info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.modal-highlight.info strong {
    color: #a5b4fc;
}

.modal-highlight p,
.modal-highlight {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

.modal-ok-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-ok-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Modal scrollbar */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 24px;
        max-height: 90vh;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .modal-section h3 {
        font-size: 1.05rem;
    }
    
    .type-help-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ===== CONTACT BUTTON ===== */
.contact-button-wrapper {
    text-align: center;
    margin-top: 32px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(145deg, rgba(30, 30, 50, 0.8), rgba(20, 20, 35, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: linear-gradient(145deg, rgba(40, 40, 60, 0.9), rgba(30, 30, 50, 0.95));
    border-color: rgba(99, 102, 241, 0.3);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.contact-btn svg {
    flex-shrink: 0;
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    position: relative;
    z-index: 99999;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-current:hover {
    background: rgba(40, 40, 60, 0.9);
    border-color: rgba(99, 102, 241, 0.3);
}

.lang-flag {
    font-size: 1.1rem;
}

.lang-code {
    font-weight: 600;
    font-size: 0.85rem;
}

.lang-arrow {
    font-size: 0.7rem;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.language-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: fixed;
    min-width: 160px;
    background: rgba(25, 25, 40, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: scaleY(0);
    transform-origin: top center;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 999999;
}

.language-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.lang-option:hover {
    background: rgba(99, 102, 241, 0.2);
    color: rgba(255, 255, 255, 1);
}

.lang-option.active {
    background: rgba(99, 102, 241, 0.15);
    color: rgba(99, 102, 241, 1);
}

.lang-name {
    flex: 1;
}

.lang-code-small {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(99, 102, 241, 0.8);
    min-width: 24px;
}

.lang-check {
    color: rgba(99, 102, 241, 1);
    font-weight: bold;
}

/* Header with language switcher */
.header-top {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow: visible;
}

.header-top .logo-link {
    /* Логотип остается по центру */
}

.header-top .language-switcher {
    position: absolute;
    right: 0;
    top: 0;
}

header {
    position: relative;
    z-index: 99999;
    overflow: visible;
}

.container {
    overflow: visible;
}

/* ===== FOOTER LINKS (Terms + Partner) ===== */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.footer-terms-link,
.footer-partner-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-terms-link:hover,
.footer-partner-link:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* Currency unavailable warning */
.currency-dropdown-item.currency-item-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.currency-dropdown-item.currency-item-disabled:hover {
    background: rgba(255, 255, 255, 0.03);
}

.currency-item-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 6px;
    font-size: 0.7rem;
    color: #fcd34d;
}

.currency-item-warning .warning-icon {
    font-size: 0.8rem;
}

.currency-item-warning .warning-text {
    line-height: 1.3;
}

.receive-hint-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 30, 50, 0.95);
    color: #fcd34d;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(251, 191, 36, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    max-width: 90%;
    text-align: center;
}

.receive-hint-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== currencySelector.css ===== */
/* Currency Selector - Full Width Under Input Field */

.currency-selector-wrapper {
  position: absolute !important;
  top: calc(100% - 1px) !important; /* Точное соединение без зазора (минус 1px для перекрытия границы) */
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 10000 !important;
  overflow: visible !important;
  display: none !important;
  visibility: hidden !important;
  margin-top: 0 !important;
  pointer-events: none !important;
  transform: translateY(-10px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.currency-selector-wrapper.active {
  display: block !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Dropdown Styles - тёмная тема */
.currency-dropdown {
  position: relative !important;
  width: 100% !important;
  max-height: 500px !important;
  min-height: 100px !important;
  /* Тёмный фон */
  background: rgba(15, 15, 25, 0.95) !important;
  backdrop-filter: blur(50px) !important;
  -webkit-backdrop-filter: blur(50px) !important;
  /* Скругление только снизу - продолжение окна суммы */
  border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
  /* Тени */
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.3) !important;
  /* Границы */
  border: none !important;
  border-left: 1px solid rgba(102, 126, 234, 0.25) !important;
  border-right: 1px solid rgba(102, 126, 234, 0.25) !important;
  border-bottom: 1px solid rgba(102, 126, 234, 0.25) !important;
  /* Убираем верхнюю границу для полного соединения */
  border-top: none !important;
  display: none !important;
  flex-direction: column;
  overflow: hidden;
  z-index: 10001 !important;
  visibility: hidden !important;
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  opacity: 1 !important;
}

.currency-dropdown.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  min-height: 100px !important;
  z-index: 10001 !important;
  transform: translateY(0) scale(1) !important;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  /* Тёмные тени */
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(102, 126, 234, 0.1) !important;
}

.currency-dropdown-search {
  display: none; /* Поиск теперь в поле суммы */
}

.currency-dropdown-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 12px 12px;
  max-height: 400px;
  /* Улучшенная стилизация скроллбара */
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.5) rgba(255, 255, 255, 0.05);
}

.currency-section {
  margin-bottom: 16px;
}

.currency-section-title {
  padding: 8px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(102, 126, 234, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  box-shadow: none;
}

.currency-dropdown-item {
  padding: 10px 14px;
  /* Тёмный фон */
  background: rgba(25, 25, 40, 0.8) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  border: 1px solid rgba(102, 126, 234, 0.15);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

/* Эффект свечения при наведении */
.currency-dropdown-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(102, 126, 234, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.currency-dropdown-item:hover::before {
  left: 100%;
}

.currency-dropdown-item:hover {
  background: rgba(102, 126, 234, 0.2) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  transform: translateX(6px) scale(1.02);
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.2);
}

.currency-dropdown-item:active {
  background: rgba(102, 126, 234, 0.3) !important;
  transform: translateX(4px) scale(0.99);
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.currency-item-logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-item-logo::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.currency-dropdown-item:hover .currency-item-logo::before {
  opacity: 1;
}

.currency-item-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(30, 30, 50, 0.8);
  padding: 3px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  position: relative;
  z-index: 1;
  box-shadow: none;
  transition: all 0.3s ease;
}

.currency-dropdown-item:hover .currency-item-logo img {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
  border-color: rgba(102, 126, 234, 0.5);
}

.currency-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.currency-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.98);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: color 0.3s ease;
}

.currency-dropdown-item:hover .currency-item-name {
  color: rgba(255, 255, 255, 1);
  text-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.currency-item-code {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.currency-dropdown-item:hover .currency-item-code {
  color: rgba(102, 126, 234, 0.9);
}

.no-results {
  text-align: center;
  padding: 48px 24px;
  color: rgba(255, 255, 255, 0.6);
}

.no-results p {
  margin: 8px 0;
  font-size: var(--font-size-base);
}

/* Scrollbar Styling */
.currency-dropdown-list::-webkit-scrollbar {
  width: 8px;
}

.currency-dropdown-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin: 8px 0;
}

.currency-dropdown-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.currency-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
  box-shadow: 0 0 8px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .currency-dropdown {
    max-height: 400px;
  }
  
  .currency-dropdown-list {
    max-height: 380px;
    padding: 10px;
  }
}

/* ===== lang-switcher.css ===== */
/* Переключатель языка: флаг + код в шапке, меню с флагами и самоназваниями.
   Подключается сервером (pageRenderer) на всех страницах, поверх стилей из style.css. */

.language-switcher {
    position: relative;
    z-index: 99999;
}

.language-switcher .lang-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 8px;
    min-height: 36px;
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.language-switcher .lang-current:hover,
.language-switcher.open .lang-current {
    background: rgba(40, 40, 64, 0.95);
    border-color: rgba(99, 102, 241, 0.45);
}

.language-switcher .lang-current:focus-visible,
.language-switcher .lang-option:focus-visible {
    outline: 2px solid rgba(129, 140, 248, 0.9);
    outline-offset: 2px;
}

.lang-flag-img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.language-switcher .lang-code {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.language-switcher .lang-arrow {
    font-size: 0.75rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.language-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.language-switcher .lang-dropdown {
    position: fixed;
    min-width: 220px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 6px;
    background: rgba(22, 24, 38, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transform-origin: top right;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 999999;
}

.language-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-switcher .lang-dropdown-title {
    padding: 10px 12px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.875rem;
    font-weight: 600;
}

.language-switcher .lang-option {
    display: grid;
    grid-template-columns: 16px 20px 1fr;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: none;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.85);
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.language-switcher .lang-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.language-switcher .lang-option.active {
    color: #fff;
    font-weight: 600;
}

.language-switcher .lang-check {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    text-align: center;
}

.language-switcher .lang-name {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .language-switcher .lang-dropdown {
        min-width: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .language-switcher .lang-dropdown,
    .language-switcher .lang-arrow {
        transition: none;
    }
}

/* ===== site-nav.css ===== */
/* Навигация в шапке, ссылки на документы в футере, согласие с правилами,
   блоки страниц направлений (/swap/…). Подключается pageRenderer на всех страницах. */

/* ---------- Навигация ---------- */
.site-nav {
    display: flex;
    gap: 4px;
    width: max-content;
    max-width: 100%;
    margin: 6px auto 16px;
    padding: 4px;
    background: rgba(20, 20, 35, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav-link {
    flex: 0 0 auto;
    padding: 7px 14px;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.site-nav-link:focus-visible {
    outline: 2px solid rgba(165, 180, 252, 0.8);
    outline-offset: 1px;
}

.site-nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.35), rgba(118, 75, 162, 0.35));
}

@media (max-width: 600px) {
    .site-nav {
        margin: 4px 0 14px;
        /* пункты, не влезшие в ширину, листаются; край подсказывает, что дальше есть ещё */
        -webkit-mask-image: linear-gradient(to right, #000 90%, transparent);
        mask-image: linear-gradient(to right, #000 90%, transparent);
    }

    .site-nav-link {
        padding: 7px 10px;
        font-size: 0.84rem;
    }
}

/* На узком экране логотип заходил под переключатель языка */
@media (max-width: 420px) {
    .header-top .logo-img {
        width: 48px;
        height: 48px;
    }

    .header-top .logo-link {
        gap: 10px;
    }

    .header-top .logo-benefit {
        font-size: 1.65rem;
    }

    .header-top .logo-exchange {
        font-size: 1.05rem;
        letter-spacing: 3px;
    }
}

/* Подзаголовок главной стал H1: сохраняем прежний вид */
header h1.subtitle {
    margin: 0;
    font-size: var(--font-size-lg, 1.125rem);
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.4;
}

/* Ссылки внутри текста документов (Правила, AML/KYC, Конфиденциальность) */
.terms-section a {
    color: #a5b4fc;
    text-decoration: none;
}

.terms-section a:hover {
    text-decoration: underline;
}

.terms-section code {
    padding: 1px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.9em;
}

/* ---------- Документы в футере ---------- */
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin: 0 0 12px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, 0.95);
}

/* ---------- Согласие под кнопкой обмена ---------- */
.consent-note {
    margin: 10px 0 0;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
}

.consent-note a {
    color: #a5b4fc;
    text-decoration: none;
}

.consent-note a:hover {
    text-decoration: underline;
}

/* ---------- Страницы направлений и популярные направления ---------- */
.pair-content {
    display: grid;
    gap: 16px;
    margin: 28px 0 8px;
}

.pair-card {
    background: linear-gradient(145deg, rgba(30, 30, 50, 0.7), rgba(20, 20, 35, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px 24px;
}

.pair-card h2 {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

/* ---------- Инструменты: /tools/usdt-fees и /tools/tx-check ---------- */
.tool-intro {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin: 0 0 18px;
}

.tool-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tool-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
    font-size: 0.92rem;
}

.tool-table th,
.tool-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

.tool-table thead th {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.03);
}

.tool-table tbody th {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
}

.tool-table td {
    color: #fff;
    font-weight: 600;
}

.tool-table tr:last-child th,
.tool-table tr:last-child td {
    border-bottom: 0;
}

.tool-usd {
    display: block;
    font-weight: 400;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

.tool-na {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
}

.tool-updated {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 6px 0 16px;
}

.tool-notes {
    margin: 0 0 18px;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.65;
}

.tool-notes li {
    margin: 0 0 6px;
}

.tool-form {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
}

.tool-form label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.tool-form input,
.tool-form select {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font: inherit;
    font-size: 0.95rem;
}

.tool-form input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tool-form select option {
    background: #15151f;
}

.tool-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.tool-btn {
    display: inline-block;
    padding: 13px 22px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.tool-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.tool-btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 16px;
    margin-top: 6px;
}

.tool-result {
    margin: 0 0 18px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.8);
    word-break: break-word;
}

.tool-result p {
    margin: 0 0 8px;
}

.tool-result--ok { border-color: rgba(16, 185, 129, 0.5); }
.tool-result--wait { border-color: rgba(245, 158, 11, 0.5); }
.tool-result--bad,
.tool-result--warn { border-color: rgba(239, 68, 68, 0.45); }

.tool-status {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.tool-facts {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
    line-height: 1.7;
}

.tool-facts li,
.guide-article .tool-facts li {
    padding-left: 0;
    margin: 0;
}

.tool-facts li::before {
    content: none;
}

/* Телефон: строки таблицы комиссий — карточками, подпись колонки над значением (data-label) */
@media (max-width: 600px) {
    .tool-form-row {
        grid-template-columns: 1fr;
    }

    .tool-table-wrap {
        overflow: visible;
        border: 0;
    }

    .tool-table,
    .tool-table tbody,
    .tool-table tr,
    .tool-table th,
    .tool-table td {
        display: block;
        min-width: 0;
    }

    .tool-table thead {
        display: none;
    }

    .tool-table tr {
        margin: 0 0 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
    }

    .tool-table tbody th {
        padding: 12px 14px 4px;
        border-bottom: 0;
    }

    .tool-table td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
        padding: 8px 14px;
        border-bottom: 0;
        text-align: right;
    }

    .tool-table td:last-child {
        padding-bottom: 12px;
    }

    .tool-table td::before {
        content: attr(data-label);
        flex: 1;
        text-align: left;
        font-weight: 400;
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.55);
    }

    .tool-usd {
        display: inline;
        margin-left: 4px;
    }
}

/* Карточка «Курс сейчас» на странице пары (данные с сервера, обновляются раз в 15 минут) */
.pair-rate-main {
    margin: 0 0 12px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    word-break: break-word;
}

.pair-rate-limits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 12px;
}

.pair-rate-limits > div {
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.pair-rate-limits dt {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

.pair-rate-limits dd {
    margin: 2px 0 0;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.pair-rate-note {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
}

/* «Популярные направления» в подвале всех страниц: 4 колонки тихих ссылок (на телефоне 2) */
.footer-pairs {
    margin: 0 0 20px;
    padding: 0 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.footer-pairs-title {
    margin: 0 0 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.footer-pairs-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 24px;
}

.footer-pairs-col {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-pairs-col li {
    margin: 0;
    padding: 0;
}

.footer-pair {
    display: inline-block;
    padding: 4px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.footer-pair:hover {
    color: rgba(255, 255, 255, 0.95);
}

.pair-steps,
.pair-notes {
    margin: 0;
    padding-left: 1.3em;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
}

.pair-steps li + li,
.pair-notes li + li {
    margin-top: 8px;
}

.pair-notes strong {
    color: rgba(255, 255, 255, 0.92);
}

.pair-faq-item {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.pair-faq-item:first-child {
    border-top: none;
}

.pair-faq-item summary {
    padding: 12px 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    list-style: none;
    position: relative;
    padding-right: 28px;
}

.pair-faq-item summary::-webkit-details-marker {
    display: none;
}

.pair-faq-item summary::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #a5b4fc;
    font-size: 1.2rem;
}

.pair-faq-item[open] summary::after {
    content: '−';
}

.pair-faq-item p {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.7;
}

.pair-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pair-chip {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pair-chip:hover {
    color: #fff;
    background: rgba(102, 126, 234, 0.18);
    border-color: rgba(102, 126, 234, 0.45);
}

@media (max-width: 600px) {
    .pair-card {
        padding: 18px 16px;
    }

    .pair-chip {
        padding: 7px 11px;
        font-size: 0.85rem;
    }

    .footer-pair {
        font-size: 0.8rem;
    }
}

/* Подвал: 4 колонки ссылок не влезают на планшете и телефоне — две */
@media (max-width: 860px) {
    .footer-pairs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 16px;
    }
}

/* ---------- Отзывы: блок на главной и страница /reviews ---------- */

.reviews-block,
.rv-summary,
.rv-empty {
    background: linear-gradient(145deg, rgba(30, 30, 50, 0.7), rgba(20, 20, 35, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px 24px;
}

.reviews-block {
    margin: 24px 0 8px;
    display: grid;
    gap: 16px;
}

.reviews-block h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.rv-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    justify-content: space-between;
}

.rv-all {
    color: #a9b2ff;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.rv-all:hover {
    color: #fff;
}

.rv-why {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.88rem;
}

.rv-score {
    display: flex;
    gap: 12px;
    align-items: center;
}

.rv-score b {
    font-size: 2.1rem;
    line-height: 1;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.rv-score div {
    display: grid;
    gap: 2px;
}

.rv-score small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.rv-stars {
    color: #f6c453;
    letter-spacing: 1px;
    white-space: nowrap;
    font-size: 1rem;
}

.rv-stars-off {
    color: rgba(255, 255, 255, 0.18);
}

.rv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 14px;
}

.rv-card {
    background: rgba(22, 22, 38, 0.82);
    border: 1px solid rgba(102, 126, 234, 0.22);
    border-radius: 16px;
    padding: 15px 16px;
    display: grid;
    gap: 9px;
    align-content: start;
    min-width: 0;
    scroll-margin-top: 20px;
}

.rv-card:target {
    border-color: rgba(246, 196, 83, 0.7);
    box-shadow: 0 0 0 3px rgba(246, 196, 83, 0.15);
}

.rv-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.rv-top time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.rv-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    overflow-wrap: anywhere;
}

.rv-card-compact .rv-text {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rv-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    font-size: 0.85rem;
}

.rv-author {
    font-weight: 600;
    color: #fff;
}

.rv-verified {
    color: #43d197;
    font-size: 0.8rem;
}

.rv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rv-chip {
    padding: 3px 9px;
    font-size: 0.78rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
}

.rv-reply {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.25);
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
    overflow-wrap: anywhere;
}

.rv-reply b {
    display: block;
    font-size: 0.8rem;
    color: #b8bfff;
    margin-bottom: 3px;
}

.rv-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px 32px;
    align-items: center;
}

.rv-bars {
    display: grid;
    gap: 5px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-variant-numeric: tabular-nums;
}

.rv-bar {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 8px;
    align-items: center;
}

.rv-bar i {
    display: block;
    height: 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.rv-bar i::before {
    content: "";
    display: block;
    height: 100%;
    width: var(--w);
    background: #f6c453;
    border-radius: 4px;
}

.rv-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.rv-filter {
    padding: 7px 13px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.88rem;
    white-space: nowrap;
}

.rv-filter:hover,
.rv-filter.active {
    color: #fff;
    background: rgba(102, 126, 234, 0.22);
    border-color: rgba(102, 126, 234, 0.55);
}

.rv-list {
    display: grid;
    gap: 12px;
}

.rv-more {
    display: block;
    width: max-content;
    margin: 18px auto 0;
    padding: 10px 22px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.92rem;
}

.rv-more:hover {
    color: #fff;
    border-color: rgba(102, 126, 234, 0.55);
}

.rv-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.reviews-page .support-note {
    margin-top: 32px;
}

@media (max-width: 600px) {
    .reviews-block,
    .rv-summary,
    .rv-empty {
        padding: 18px 16px;
    }

    .rv-summary {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Раздел «Помощь»: статьи и список ---------- */

.guide-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0 0 18px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

.guide-crumbs a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
}

.guide-crumbs a:hover {
    color: #fff;
}

.guide-article {
    background: linear-gradient(145deg, rgba(30, 30, 50, 0.7), rgba(20, 20, 35, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 36px 40px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.guide-article h1 {
    margin: 0 0 20px;
    font-size: 2rem;
    line-height: 1.25;
    color: #fff;
    text-wrap: balance;
}

.guide-article h2 {
    margin: 32px 0 12px;
    font-size: 1.3rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.96);
}

.guide-article h3 {
    margin: 24px 0 10px;
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.94);
}

.guide-article p {
    margin: 0 0 14px;
    max-width: 72ch;
}

.guide-article ul,
.guide-article ol {
    margin: 0 0 16px;
    padding-left: 1.4em;
    max-width: 72ch;
}

.guide-article li {
    margin: 0 0 8px;
}

.guide-article a,
.guide-more a {
    color: #a9b2ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(169, 178, 255, 0.35);
}

.guide-article a:hover,
.guide-more a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.guide-article strong {
    color: #fff;
}

.guide-faq {
    margin-top: 32px;
}

.guide-faq .pair-faq-item p {
    margin: 8px 0 0;
}

.guide-after {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.guide-more {
    margin: 0;
    padding-left: 1.2em;
    display: grid;
    gap: 8px;
}

.guides-cluster {
    margin: 0 0 32px;
}

.guides-cluster h2 {
    margin: 0 0 14px;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 12px;
}

.guide-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(22, 22, 38, 0.82);
    border: 1px solid rgba(102, 126, 234, 0.22);
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.guide-card b {
    color: #fff;
    font-size: 1rem;
    line-height: 1.35;
}

.guide-card span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.88rem;
    line-height: 1.5;
}

.guide-card:hover {
    border-color: rgba(102, 126, 234, 0.55);
    background: rgba(30, 30, 52, 0.9);
}

.guide-page .support-note,
.guides-hub .support-note {
    margin-top: 28px;
}

.pair-guides {
    margin-top: 16px;
}

@media (max-width: 600px) {
    .guide-article {
        padding: 22px 18px;
    }

    .guide-article h1 {
        font-size: 1.55rem;
    }

    .guide-article h2 {
        font-size: 1.15rem;
    }
}
