/* ═══ AIFORYPRO — Dark hero, professional, teal ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.6; color: #0F172A; background: #fff; -webkit-font-smoothing: antialiased; overflow-x: hidden; max-width: 100%; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rates-table { min-width: 480px; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ─── HEADER (dark) ─── */
.header { position: sticky; top: 0; z-index: 200; background: #0A1628; border-bottom: 1px solid rgba(255,255,255,.08); }
.header .container { display: flex; align-items: center; height: 60px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 600; color: #fff; }
.logo-icon { width: 32px; height: 32px; background: #0D9488; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo strong { color: #2DD4BF; font-weight: 800; }
.nav { display: none; }
.header-cta { display: none; }
.burger { display: flex; flex-direction: column; gap: 4px; margin-left: auto; padding: 6px; }
.burger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }
@media (min-width: 700px) {
  .nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
  .nav a { padding: 6px 14px; border-radius: 6px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,.7); transition: all .2s; }
  .nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
  .header-cta { display: inline-flex; background: #0D9488; color: #fff; padding: 8px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
  .burger { display: none; }
}
.nav.open { display: flex; flex-direction: column; position: fixed; top: 60px; left: 0; right: 0; background: #0A1628; border-bottom: 1px solid rgba(255,255,255,.1); padding: 12px 16px; z-index: 199; }
.nav.open a { padding: 14px 0; font-size: 15px; color: rgba(255,255,255,.8); border-bottom: 1px solid rgba(255,255,255,.06); }

/* ─── HERO (dark bg, form on right) ─── */
.hero { background: linear-gradient(135deg, #0A1628 0%, #0D2240 100%); padding: 48px 0 56px; }
.hero-inner { display: flex; flex-direction: column; gap: 36px; }
.hero-text { color: #fff; }
.hero-label { display: inline-block; background: rgba(13,148,136,.2); color: #2DD4BF; border: 1px solid rgba(13,148,136,.4); padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; letter-spacing: .05em; margin-bottom: 18px; }
.hero-text h1 { font-size: 30px; font-weight: 900; line-height: 1.12; letter-spacing: -.03em; margin-bottom: 16px; }
.hero-text p { font-size: 15px; color: rgba(255,255,255,.65); line-height: 1.65; margin-bottom: 28px; max-width: 480px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hstat-val { font-size: 22px; font-weight: 900; color: #2DD4BF; }
.hstat-label { font-size: 12px; color: rgba(255,255,255,.5); margin-top: -2px; }

/* Exchange card in hero */
.hero-card { background: #fff; border-radius: 16px; padding: 0; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: #F8FAFF; border-bottom: 1px solid #E5E7EB; }
.card-title { font-size: 16px; font-weight: 700; color: #0F172A; }
.card-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #6B7280; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #10B981; animation: pulse 2s infinite; }
.live-dot.error { background: #EF4444; animation: none; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.4} }
.card-body { padding: 16px 20px 20px; }
.field-group { margin-bottom: 6px; }
.field-group label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #9CA3AF; margin-bottom: 7px; }
.field-wrap { display: flex; border: 1.5px solid #E5E7EB; border-radius: 9px; overflow: visible; transition: border-color .2s; }
.field-wrap:focus-within { border-color: #0D9488; box-shadow: 0 0 0 3px rgba(13,148,136,.1); }
.field-mid { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.rate-text { font-size: 12px; color: #9CA3AF; }
.swap-btn { width: 34px; height: 34px; border-radius: 50%; background: #CCFBF1; color: #0D9488; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .2s; }
.swap-btn:hover { background: #0D9488; color: #fff; transform: rotate(180deg); }
.cur-select { position: relative; flex-shrink: 0; }
.cur-btn { display: flex; align-items: center; gap: 6px; padding: 11px 9px 11px 11px; background: #F9FAFB; border-right: 1.5px solid #E5E7EB; border-radius: 0; min-width: 96px; white-space: nowrap; }
.cur-btn:hover { background: #CCFBF1; }
.cur-icon { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; flex-shrink: 0; background: #E5E7EB; }
.cur-label { font-size: 13px; font-weight: 700; color: #0F172A; }
.cur-drop { position: absolute; top: calc(100% + 6px); left: 0; width: 220px; background: #fff; border: 1.5px solid #E5E7EB; border-radius: 9px; box-shadow: 0 8px 30px rgba(0,0,0,.12); z-index: 500; display: none; }
.cur-drop.open { display: block; }
.cur-drop.drop-up { top: auto; bottom: calc(100% + 6px); }
.currency-search { width: 100%; padding: 10px 12px; border: none; border-bottom: 1px solid #E5E7EB; outline: none; font-size: 13px; border-radius: 9px 9px 0 0; }
.currency-list { list-style: none; max-height: 190px; overflow-y: auto; padding: 4px 0; }
.currency-list li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; font-weight: 500; }
.currency-list li:hover, .currency-list li.selected { background: #CCFBF1; color: #0D9488; }
.currency-list .c-name { flex: 1; }
.currency-list .c-full { font-size: 11px; color: #9CA3AF; }
.num-input { flex: 1; border: none; outline: none; padding: 11px 10px; font-size: 19px; font-weight: 700; color: #0F172A; background: transparent; min-width: 0; max-width: 100%; }
.num-input[readonly] { color: #6B7280; }
.exchange-btn { display: block; width: 100%; padding: 14px; background: #0D9488; color: #fff; border-radius: 9px; font-size: 15px; font-weight: 700; margin-top: 12px; transition: background .2s, transform .15s; }
.exchange-btn:hover { background: #0F766E; transform: translateY(-1px); }
.card-note { font-size: 11px; color: #9CA3AF; text-align: center; margin-top: 8px; }

@media (max-width: 400px) {
  .cur-drop { width: calc(100vw - 40px); }
  .cur-btn { min-width: 82px; }
}
@media (min-width: 900px) {
  .hero-inner { flex-direction: row; align-items: center; gap: 60px; }
  .hero-text { flex: 1; }
  .hero-card { flex: 0 0 380px; }
  .hero-text h1 { font-size: 48px; }
}

/* ─── FEATURES: horizontal scroll on mobile ─── */
.features { padding: 48px 0; background: #F0FDFA; }
.features h2 { font-size: 22px; font-weight: 800; margin-bottom: 20px; text-align: center; }
.features-scroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 12px; padding-left: 2px; }
.features-scroll::-webkit-scrollbar { height: 4px; }
.features-scroll::-webkit-scrollbar-track { background: #E5E7EB; border-radius: 2px; }
.features-scroll::-webkit-scrollbar-thumb { background: #0D9488; border-radius: 2px; }
.feat-card { min-width: 200px; scroll-snap-align: start; flex-shrink: 0; background: #fff; border: 1.5px solid #CCFBF1; border-radius: 14px; padding: 20px 16px; text-align: center; }
.feat-icon { font-size: 32px; margin-bottom: 10px; }
.feat-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.feat-card p { font-size: 13px; color: #4B5563; line-height: 1.55; }
@media (min-width: 700px) {
  .features-scroll { overflow-x: visible; flex-wrap: nowrap; justify-content: center; }
  .feat-card { min-width: 0; flex: 1; max-width: 220px; }
  .features h2 { font-size: 28px; }
}

/* ─── RATES TABLE ─── */
.rates { padding: 56px 0; }
.rates h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.rates-filter { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.rf-btn { padding: 7px 16px; border-radius: 7px; font-size: 13px; font-weight: 600; border: 1.5px solid #E5E7EB; color: #4B5563; background: #fff; cursor: pointer; transition: all .2s; }
.rf-btn.active, .rf-btn:hover { background: #0D9488; color: #fff; border-color: #0D9488; }
.table-wrap { background: #fff; border: 1.5px solid #E5E7EB; border-radius: 12px; overflow: hidden; }
.rates-table { width: 100%; border-collapse: collapse; }
.rates-table thead { background: #F0FDFA; border-bottom: 1.5px solid #E5E7EB; }
.rates-table th { padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #6B7280; }
.rates-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid #F3F4F6; vertical-align: middle; }
.rates-table tbody tr:last-child td { border-bottom: none; }
.rates-table tbody tr:hover { background: #F0FDFA; }
.rate-currency { display: flex; align-items: center; gap: 8px; }
.c-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0; }
.c-info strong { display: block; font-weight: 700; font-size: 13px; }
.c-info span { font-size: 11px; color: #9CA3AF; }
.rate-val { font-weight: 700; font-size: 13px; }
.rate-min { font-size: 12px; color: #6B7280; }
.hide-sm { display: none; }
.status-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #059669; }
.status-dot::before { content:''; width:6px; height:6px; background:#10B981; border-radius:50%; animation: pulse 2s infinite; }
.rate-exchange-btn { padding: 6px 14px; border-radius: 6px; background: #CCFBF1; color: #0D9488; font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: all .2s; }
.rate-exchange-btn:hover { background: #0D9488; color: #fff; }
@media (min-width: 600px) {
  .hide-sm { display: table-cell; }
  .rates h2 { font-size: 28px; }
}

/* ─── HOW IT WORKS ─── */
.how { padding: 56px 0; background: #F0FDFA; }
.how-inner { display: flex; flex-direction: column; gap: 32px; }
.how-text h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.how-text p { font-size: 15px; color: #4B5563; margin-bottom: 16px; }
.how-link { display: inline-flex; align-items: center; gap: 4px; color: #0D9488; font-weight: 600; font-size: 14px; }
.how-steps { display: flex; flex-direction: column; gap: 20px; }
.how-step { display: flex; gap: 14px; align-items: flex-start; }
.how-num { font-size: 28px; font-weight: 900; color: #0D9488; opacity: .25; flex-shrink: 0; width: 44px; line-height: 1; }
.how-step h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.how-step p { font-size: 13px; color: #4B5563; line-height: 1.6; }
@media (min-width: 800px) {
  .how-inner { flex-direction: row; align-items: flex-start; gap: 60px; }
  .how-text { flex: 1; }
  .how-text h2 { font-size: 28px; }
  .how-steps { flex: 1; }
}

/* ─── FAQ GRID ─── */
.faq { padding: 56px 0; }
.faq h2 { font-size: 22px; font-weight: 800; margin-bottom: 24px; }
.faq-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.faq-block { background: #F0FDFA; border: 1.5px solid #CCFBF1; border-radius: 12px; padding: 18px; }
.faq-block h4 { font-size: 14px; font-weight: 700; color: #0D9488; margin-bottom: 8px; }
.faq-block p { font-size: 13px; color: #4B5563; line-height: 1.65; }
@media (min-width: 640px) {
  .faq-grid { grid-template-columns: 1fr 1fr; }
  .faq h2 { font-size: 28px; }
}

/* ─── FOOTER ─── */
.footer { background: #0A1628; color: #64748B; padding: 36px 0 24px; }
.footer-inner { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.07); }
.footer .logo { color: #fff; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-nav a { font-size: 13px; color: #64748B; transition: color .2s; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ─── MODAL ─── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: 16px; padding: 32px 24px; max-width: 380px; width: 100%; text-align: center; position: relative; animation: popIn .25s ease; }
@keyframes popIn { from{opacity:0;transform:scale(.9)} to{opacity:1;transform:scale(1)} }
.modal-close { position: absolute; top: 12px; right: 14px; font-size: 24px; color: #6B7280; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.modal-icon { margin: 0 auto 16px; }
.modal-box h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.modal-box p { font-size: 14px; color: #4B5563; line-height: 1.6; margin-bottom: 20px; }

/* TG float */
#tg-float-btn { position: fixed; bottom: 20px; right: 16px; width: 50px; height: 50px; background: #0D9488; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(13,148,136,.4); z-index: 999; transition: transform .2s; }
#tg-float-btn:hover { transform: scale(1.1); }
