:root {
  color-scheme: dark;
  --bg: #060714;
  --bg-soft: #0a0c1e;
  --graphite: #0c0e22;
  --graphite-2: #10132a;
  --line: rgba(140, 170, 255, 0.16);
  --line-strong: rgba(0, 229, 255, 0.45);
  --text: #eef1ff;
  --muted: #8b93bd;
  --dim: #565f8c;
  --cyan: #00e5ff;
  --cyan-soft: rgba(0, 229, 255, 0.12);
  --magenta: #ff2e9a;
  --magenta-soft: rgba(255, 46, 154, 0.12);
  --lime: #c8ff3d;
  --red: #ff4d6d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --font-display: "Chakra Petch", "Segoe UI", sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 0, 0, 0.9), transparent 72%);
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px circle at 12% 8%, rgba(0, 229, 255, 0.07), transparent 58%),
    radial-gradient(620px circle at 92% 18%, rgba(255, 46, 154, 0.045), transparent 55%);
  z-index: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  font-family: var(--font-body);
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

code, .mono {
  font-family: var(--font-mono);
}

.bg-aurora {
  position: fixed;
  inset: -15%;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(
    from 0deg at 30% 20%,
    rgba(0, 229, 255, 0.05),
    rgba(255, 46, 154, 0.045),
    rgba(200, 255, 61, 0.03),
    rgba(0, 229, 255, 0.05)
  );
  filter: blur(90px);
  animation: auroraDrift 26s linear infinite;
  opacity: 0.8;
}

@keyframes auroraDrift {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.18);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .bg-aurora {
    display: none;
  }
}

#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.splash-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: #04050d;
  z-index: 9999;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-mark {
  width: 86px;
  height: 86px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.28);
  animation: splashTilt 1.6s ease-in-out infinite;
}

.splash-mark svg {
  display: block;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.5));
}

.splash-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.splash-line {
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  animation: splashLine 1.3s ease-in-out infinite;
}

.splash-status {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

@keyframes splashTilt {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(8deg); }
}

@keyframes splashLine {
  0%, 100% { transform: scaleX(0.45); opacity: 0.45; }
  50% { transform: scaleX(1); opacity: 1; }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 16px auto 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(8, 9, 20, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #101430, #0a0b18);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.22);
}

.brand-mark svg {
  display: block;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.45));
}

.brand strong,
.brand small {
  display: block;
  font-family: var(--font-display);
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand small {
  margin-top: 2px;
  color: var(--dim);
  font-size: 11px;
  text-transform: none;
  font-family: var(--font-mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 10px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: 0.2s ease;
}

.nav-links a:hover {
  color: var(--cyan);
  background: var(--cyan-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--cyan);
  border-radius: var(--radius);
}

main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 520px);
  align-items: center;
  gap: 42px;
  padding: 54px 0 42px;
}

.eyebrow,
.panel-kicker,
.section-head span,
.support-band span,
.admin-title span,
.admin-panel-head span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.eyebrow span,
.live-pill span,
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: 76px;
  line-height: 0.94;
  color: var(--text);
  background: linear-gradient(120deg, #ffffff 55%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.hero-stats div,
.exchange-panel,
.feature-card,
.reserve-card,
.feed-list,
.market-list,
.faq-item,
.support-band,
.admin-card,
.admin-panel,
.wallet-row {
  background: rgba(11, 13, 28, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero-stats div {
  position: relative;
  padding: 18px;
  box-shadow: none;
}

.hero-stats strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--text);
}

.hero-stats span {
  display: block;
  margin-top: 5px;
  color: var(--dim);
  font-size: 12px;
}

.exchange-panel {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.exchange-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 45%, transparent);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  position: relative;
}

.panel-head h2,
.section-head h2,
.support-band h2,
.admin-title h1,
.admin-panel-head h1 {
  margin: 6px 0 0;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--lime);
  border: 1px solid rgba(200, 255, 61, 0.3);
  border-radius: 999px;
  background: rgba(200, 255, 61, 0.08);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.exchange-form {
  display: grid;
  gap: 14px;
  position: relative;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: 1fr 1fr;
}

.field {
  display: grid;
  gap: 9px;
}

.field span {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 5, 12, 0.6);
  color: var(--text);
  font-family: var(--font-mono);
  padding: 0 14px;
  outline: none;
  transition: 0.2s ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.14);
}

.field input::placeholder {
  color: #4c5480;
}

.field select option {
  background: #0b0c1a;
  font-family: var(--font-body);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.coin-select {
  position: relative;
}

.coin-trigger {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 5, 12, 0.6);
  color: var(--text);
  padding: 0 14px;
  text-align: left;
  transition: 0.2s ease;
}

.coin-select.open .coin-trigger,
.coin-trigger:focus-visible {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.14);
  outline: none;
}

.coin-trigger img {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  flex: none;
}

.coin-trigger span {
  flex: 1;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  text-transform: none;
  letter-spacing: normal;
}

.coin-chevron {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--cyan);
  border-bottom: 1.5px solid var(--cyan);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.coin-select.open .coin-chevron {
  transform: rotate(-135deg);
}

.coin-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(8, 9, 20, 0.97);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: 0.16s ease;
}

.coin-select.open .coin-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.coin-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  transition: 0.15s ease;
}

.coin-option:hover,
.coin-option.active {
  background: var(--cyan-soft);
  color: var(--text);
}

.coin-option img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  flex: none;
}

.swap-button {
  width: 44px;
  height: 44px;
  margin: -2px auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 22px;
  transition: 0.2s ease;
}

.swap-button:hover {
  transform: rotate(180deg);
  color: #fff;
  background: rgba(0, 229, 255, 0.28);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.rate-box {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(3, 4, 10, 0.55);
}

.rate-box span {
  display: block;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 12px;
}

.rate-box strong {
  display: block;
  margin-top: 7px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 25px;
  word-break: break-word;
}

.primary-button,
.secondary-button,
.ghost-button,
.support-link {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 14px;
  transition: 0.2s ease;
}

.primary-button {
  width: 100%;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  color: #04050d;
  box-shadow: 0 12px 32px rgba(0, 229, 255, 0.22);
}

.primary-button:hover,
.support-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 229, 255, 0.34);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.primary-button.compact {
  width: auto;
}

.secondary-button,
.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.secondary-button:hover,
.ghost-button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.order-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.order-success {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-success > div {
  flex: 1;
}

.order-success h3 {
  margin: 0 0 4px;
}

.order-success p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
}

.copy-id-btn {
  flex: none;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: 0.15s ease;
}

.copy-id-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.wallet-box {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(3, 4, 10, 0.6);
  position: relative;
}

.wallet-box span {
  display: block;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.wallet-box code {
  display: block;
  color: var(--cyan);
  line-height: 1.6;
  word-break: break-all;
}

.order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.order-steps {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 13px;
}

.step span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.step.done {
  color: var(--lime);
}

.step.done span {
  background: var(--lime);
  border-color: var(--lime);
}

.step.active {
  color: var(--cyan);
}

.step.active span {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.45);
}

.market-strip {
  padding: 10px 0 34px;
}

.ticker-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.ticker-track::-webkit-scrollbar {
  display: none;
}

.ticker-item {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 168px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 2px solid rgba(0, 229, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.ticker-item span,
.market-row span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.ticker-item strong,
.market-row strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
}

.ticker-item em,
.market-row em {
  display: block;
  margin-top: 4px;
  color: var(--lime);
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
}

.ticker-item em.down,
.market-row em.down {
  color: var(--red);
}

.section-band {
  padding: 72px 0;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: 38px;
}

.feature-grid,
.reserve-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-card,
.reserve-card {
  position: relative;
  min-height: 190px;
  padding: 22px;
  overflow: hidden;
  box-shadow: none;
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.03);
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.feature-card h3 {
  margin: 22px 0 10px;
  font-size: 17px;
}

.feature-card p,
.support-band p,
.admin-title p,
.admin-panel-head p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.reserve-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.reserve-card {
  min-height: 150px;
}

.reserve-card img {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.25));
}

.reserve-card span {
  display: block;
  margin-top: 20px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.reserve-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 18px;
}

.market-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.feed-list,
.market-list {
  padding: 10px 18px;
  box-shadow: none;
}

.feed-row,
.market-row {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.feed-row {
  grid-template-columns: 1fr auto;
}

.market-row {
  grid-template-columns: 36px 1fr auto;
}

.feed-row:last-child,
.market-row:last-child {
  border-bottom: none;
}

.feed-row b,
.market-row b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.feed-row small {
  color: var(--dim);
  font-family: var(--font-mono);
}

.feed-row strong {
  color: var(--lime);
  font-family: var(--font-mono);
}

.market-row img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

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

.faq-item {
  overflow: hidden;
  box-shadow: none;
}

.faq-question {
  width: 100%;
  min-height: 66px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 700;
}

.faq-question span {
  color: var(--cyan);
  font-size: 22px;
  transition: 0.2s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
  padding: 0 20px;
  transition: 0.28s ease;
}

.faq-item.open {
  border-color: var(--line-strong);
}

.faq-item.open .faq-answer {
  max-height: 220px;
  padding-bottom: 20px;
}

.faq-item.open .faq-question span {
  transform: rotate(45deg);
  color: var(--magenta);
}

.support-band {
  position: relative;
  margin: 42px 0 64px;
  min-height: 210px;
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  overflow: hidden;
}

.support-band h2 {
  font-size: 34px;
}

.support-link {
  background: var(--cyan-soft);
  border-color: var(--line-strong);
  color: var(--text);
  min-width: 190px;
}

.support-link.muted {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.support-chat {
  display: grid;
  flex-basis: 100%;
  gap: 14px;
  width: 100%;
  margin-top: 6px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.support-chat[hidden] {
  display: none;
}

.support-chat textarea {
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 5, 12, 0.6);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.support-chat textarea:focus {
  border-color: var(--cyan);
}

.support-messages {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.support-msg {
  max-width: min(680px, 92%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.support-msg.user {
  justify-self: end;
  background: var(--cyan-soft);
  border-color: var(--line-strong);
}

.support-msg.operator {
  justify-self: start;
  background: rgba(255, 46, 154, 0.06);
  border-color: rgba(255, 46, 154, 0.28);
}

.support-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.support-status.error {
  color: var(--red);
}

.support-status.success {
  color: var(--lime);
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 56px auto 0;
  padding: 44px 0 0;
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
}

.footer-brand p {
  margin: 14px 0 0;
  max-width: 320px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.footer-col h4 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: 0.15s ease;
}

.footer-col a:hover {
  color: var(--cyan);
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.footer-status i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pulseDot 1.6s ease-in-out infinite;
}

.footer-status.muted {
  color: var(--dim);
}

.bc-widget {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: #111827;
  font-family: Arial, sans-serif;
  font-size: 13px;
  transition: 0.2s ease;
}

.bc-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.bc-widget img {
  height: 22px;
  width: auto;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 12px;
}

.admin-body {
  display: grid;
  min-height: 100vh;
}

.admin-shell {
  width: min(1040px, calc(100% - 32px));
  margin: auto;
  padding: 42px 0;
}

.admin-card,
.admin-panel {
  position: relative;
  padding: 28px;
  overflow: hidden;
}

.admin-card {
  max-width: 460px;
  margin: auto;
}

.admin-brand {
  margin-bottom: 34px;
}

.admin-title {
  margin-bottom: 22px;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-message {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
}

.admin-message.error {
  color: var(--red);
}

.admin-message.success {
  color: var(--lime);
}

.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.wallet-admin-grid {
  display: grid;
  gap: 12px;
}

.wallet-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) minmax(220px, 0.8fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  box-shadow: none;
}

.wallet-row b {
  color: var(--cyan);
  font-family: var(--font-mono);
}

.wallet-current {
  color: var(--muted);
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
}

.wallet-row input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 5, 12, 0.6);
  color: var(--text);
  font-family: var(--font-mono);
  padding: 0 12px;
  outline: none;
}

.wallet-row input:focus {
  border-color: var(--cyan);
}

@media (max-width: 1050px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero h1 {
    font-size: 58px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reserve-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .market-layout {
    grid-template-columns: 1fr;
  }

  .wallet-row {
    grid-template-columns: 70px 1fr;
  }

  .wallet-row input,
  .wallet-row button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-top: 6px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 13px 12px;
  }

  .hero {
    padding-top: 36px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .hero-stats,
  .form-grid.two,
  .order-actions,
  .support-band,
  .admin-panel-head {
    grid-template-columns: 1fr;
  }

  .support-band,
  .admin-panel-head {
    display: grid;
  }

  .feature-grid,
  .reserve-grid {
    grid-template-columns: 1fr;
  }

  .ticker-item {
    width: 150px;
  }

  .section-band {
    padding: 46px 0;
  }

  .section-head h2,
  .support-band h2 {
    font-size: 28px;
  }

  .exchange-panel,
  .support-band,
  .admin-card,
  .admin-panel {
    padding: 20px;
  }

  .rate-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .ghost-button,
  .support-link {
    width: 100%;
  }

  .support-actions {
    width: 100%;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .footer-top {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reserve-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 36px;
  }

  .rate-box strong {
    font-size: 21px;
  }

  .panel-head {
    flex-direction: column;
  }
}
