:root {
  --color-bg-base: #000000;
  --color-surface-1: #0A0D12;
  --color-surface-2: #0F131C;
  --color-surface-3: #161D2B;
  --color-surface-4: #1E2636;
  --color-accent: #F9B234;
  --color-accent-dark: #F7931A;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #9CA3AF;
  --color-text-muted: #6B7280;
  --color-border: #2D3748;
  --color-success: #6EE7B7;
  --color-error: #F87171;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 4px 24px rgba(249, 178, 52, 0.2);
  
  --font-display: clamp(2.5rem, 5vw, 4rem);
  --font-heading: clamp(1.5rem, 3vw, 2.25rem);
  --font-subheading: clamp(1.25rem, 2.5vw, 1.75rem);
  --font-body: clamp(1rem, 2vw, 1.125rem);
  --font-small: clamp(0.875rem, 1.5vw, 1rem);
  
  --font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  --font-family-mono: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-body);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 18, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-size: var(--font-subheading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.logo-accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: var(--space-xl);
}

.nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--color-accent);
}

.lang-switch {
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-switch:hover {
  background: var(--color-surface-4);
  border-color: var(--color-accent);
}

/* Hero */
.hero {
  padding: var(--space-2xl) 0;
  text-align: center;
}

.hero-title {
  font-size: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, #FFFFFF 0%, #D1D5DB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--font-body);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

/* Exchange Widget */
.exchange-widget {
  max-width: 580px;
  margin: 0 auto;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.widget-header h2 {
  font-size: var(--font-subheading);
  font-weight: 700;
}

.rate-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-surface-3);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-small);
}

.rate-label {
  color: var(--color-text-muted);
}

.rate-value {
  color: var(--color-text-primary);
  font-weight: 600;
  font-family: var(--font-family-mono);
}

.exchange-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.input-group label {
  font-size: var(--font-small);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.input-wrapper {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-sm);
  background: var(--color-surface-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--color-accent);
}

.amount-input {
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  font-size: var(--font-subheading);
  font-weight: 700;
  font-family: var(--font-family-mono);
  outline: none;
}

.amount-input::placeholder {
  color: var(--color-text-muted);
}

.currency-select {
  background: var(--color-surface-4);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: var(--font-body);
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.currency-select:hover {
  border-color: var(--color-accent);
}

.swap-button {
  align-self: center;
  width: 48px;
  height: 48px;
  background: var(--color-surface-3);
  border: 2px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  margin: calc(-1 * var(--space-sm)) 0;
}

.swap-button:hover {
  background: var(--color-surface-4);
  border-color: var(--color-accent);
  transform: rotate(180deg);
}

.location-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.location-section label {
  font-size: var(--font-small);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.country-select,
.region-select {
  background: var(--color-surface-3);
  border: 2px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: var(--font-body);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.country-select:focus,
.region-select:focus {
  border-color: var(--color-accent);
}

.country-select option,
.region-select option {
  background: var(--color-surface-3);
  color: var(--color-text-primary);
}

.region-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: var(--space-sm);
}

.rate-info {
  background: var(--color-surface-3);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-small);
}

.info-row span:first-child {
  color: var(--color-text-secondary);
}

.info-row span:last-child {
  color: var(--color-text-primary);
  font-weight: 600;
  font-family: var(--font-family-mono);
}

.info-row.highlight {
  color: var(--color-accent);
  font-weight: 700;
  font-size: var(--font-body);
}

.info-row.highlight span {
  color: var(--color-accent);
}

.exchange-button {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  border: none;
  color: #000000;
  font-size: var(--font-body);
  font-weight: 700;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all 0.3s;
  box-shadow: var(--shadow-accent);
  margin-top: var(--space-sm);
}

.exchange-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(249, 178, 52, 0.3);
}

.exchange-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Features */
.features {
  padding: var(--space-2xl) 0;
  background: var(--color-surface-1);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  background: var(--color-surface-3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.feature-card h3 {
  font-size: var(--font-subheading);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* Supported */
.supported {
  padding: var(--space-2xl) 0;
}

.section-title {
  font-size: var(--font-heading);
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.crypto-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.crypto-badge {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-family: var(--font-family-mono);
  transition: all 0.2s;
}

.crypto-badge:hover {
  background: var(--color-surface-3);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.info-box {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  max-width: 800px;
  margin: 0 auto;
}

.info-box h3 {
  font-size: var(--font-subheading);
  margin-bottom: var(--space-md);
}

.info-box p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.info-box p:last-child {
  margin-bottom: 0;
}

.conversion-flow {
  color: var(--color-accent) !important;
  text-align: center;
  font-size: var(--font-body);
}

/* Countries */
.countries {
  padding: var(--space-2xl) 0;
  background: var(--color-surface-1);
}

.countries-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.countries-grid span {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: var(--font-body);
  font-weight: 600;
}

.countries-note {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-small);
  font-style: italic;
}

/* Contact */
.contact {
  padding: var(--space-2xl) 0;
}

.contact-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact-card h2 {
  font-size: var(--font-heading);
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.contact-card > p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
}

.contact-link.telegram {
  background: #0088cc;
  color: #FFFFFF;
}

.contact-link.telegram:hover {
  background: #0077b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 136, 204, 0.3);
}

.contact-link.manager {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #000000;
}

.contact-link.manager:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

/* Footer */
.footer {
  background: var(--color-surface-1);
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand .logo {
  margin-bottom: var(--space-md);
}

.footer-slogan {
  color: var(--color-text-secondary);
  font-size: var(--font-body);
  font-weight: 600;
}

.footer-section h4 {
  font-size: var(--font-body);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
}

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

.footer-section ul li {
  margin-bottom: var(--space-sm);
}

.footer-section a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--font-small);
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: var(--font-small);
  margin-bottom: var(--space-sm);
}

.footer-disclaimer {
  font-size: 0.8rem !important;
  font-style: italic;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  font-size: var(--font-subheading);
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

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

.modal-body {
  padding: var(--space-xl);
}

.exchange-summary {
  background: var(--color-surface-3);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row span {
  color: var(--color-text-secondary);
}

.summary-row strong {
  color: var(--color-text-primary);
  font-family: var(--font-family-mono);
}

.telegram-cta {
  text-align: center;
}

.telegram-cta p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.telegram-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  background: #0088cc;
  color: #FFFFFF;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  margin-bottom: var(--space-md);
}

.telegram-button:hover {
  background: #0077b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 136, 204, 0.3);
}

.telegram-note {
  font-size: var(--font-small);
  color: var(--color-text-muted);
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: var(--space-md);
  }

  .nav {
    gap: var(--space-md);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .exchange-widget {
    padding: var(--space-lg);
  }

  .widget-header {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}
