:root {
  --bg: #0b0f14;
  --panel: #111827;
  --surface: #161e29;
  --text: #ffffff;
  --secondary: #c7cdd7;
  --gold: #d4af37;
  --gold-soft: #ffd86a;
  --buy: #22c55e;
  --sell: #ef4444;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

.telegram-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 12, 0.84);
  backdrop-filter: blur(8px);
  animation: telegramPopupFadeIn 180ms ease-out both;
}

.telegram-popup-card {
  width: min(100%, 390px);
  padding: 32px 28px 26px;
  border: 1px solid rgba(255, 216, 106, 0.38);
  border-radius: 18px;
  background: linear-gradient(145deg, #18212d, #0d131b 70%);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.04);
  text-align: center;
}

.telegram-popup-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #229ed9;
  color: #fff;
  font-size: 1.7rem;
  transform: rotate(-12deg);
}

.telegram-popup-eyebrow {
  margin: 0 0 8px;
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telegram-popup-card h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.55rem, 5vw, 2rem);
}

.telegram-popup-message {
  margin: 12px auto 22px;
  max-width: 300px;
  color: var(--secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

.telegram-popup-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(132, 213, 255, 0.7);
  border-radius: 10px;
  background: linear-gradient(135deg, #2aa9e0, #128cc8);
  color: #f5fcff;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease;
}

.telegram-popup-button:hover,
.telegram-popup-button:focus-visible {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.telegram-popup-close {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #8995a5;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
}

.telegram-popup-close:hover,
.telegram-popup-close:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

@keyframes telegramPopupFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body {
  margin: 0;
  overflow: hidden;
  height: 100vh;
  max-height: 100vh;
  min-height: 100vh;
  padding: 0;
  color: var(--text);
  font-family: Inter, 'SF Pro Display', 'Manrope', system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.14), transparent 18%),
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.06), transparent 14%),
    linear-gradient(180deg, #050505 0%, #020202 100%);
}

@keyframes brandPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(212, 175, 55, 0), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
  50% { box-shadow: 0 0 16px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16); }
}

@keyframes disclaimerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes liveGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(248, 113, 113, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
  50% { box-shadow: 0 0 18px rgba(248, 113, 113, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.16); }
}

@keyframes liveDotPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { transform: scale(1.15); box-shadow: 0 0 10px rgba(239, 68, 68, 0.75); }
}

@keyframes activeSignalPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.34), 0 0 16px rgba(34, 197, 94, 0.22); }
  50% { box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.52), 0 0 28px rgba(74, 222, 128, 0.34); }
}

@keyframes disclaimerGlow {
  0%, 100% { border-color: rgba(255, 216, 106, 0.24); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
  50% { border-color: rgba(255, 216, 106, 0.46); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 14px rgba(212, 175, 55, 0.24); }
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

.dashboard-shell {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  min-height: 100vh;
  padding: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.96) 0%, rgba(2, 2, 2, 0.98) 100%),
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.06), transparent 18%);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 30px 80px rgba(0, 0, 0, 0.45);
  z-index: 10;
  overflow: hidden;
}

.dashboard-topbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(240px, 1fr);
  align-items: start;
  gap: 14px;
  width: 100vw;
  max-width: none;
  margin: 0 0 6px;
  margin-left: calc(50% - 50vw);
  padding: 14px 20px 12px;
  flex: 0 0 auto;
}

.brand-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  justify-self: start;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 215, 0, 0.14), rgba(212, 175, 55, 0.04));
  border: 1px solid rgba(212, 175, 55, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 24px rgba(0, 0, 0, 0.28);
}

.overlay-logo {
  max-width: 78%;
  height: auto;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-pill-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.26), rgba(127, 29, 29, 0.3));
  border: 1px solid rgba(248, 113, 113, 0.46);
  color: #ffe2e2;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: liveGlow 1.2s ease-in-out infinite;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: liveDotPulse 1s ease-in-out infinite;
}

.brand-home-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff8d6;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 216, 106, 0.32);
  background: linear-gradient(180deg, rgba(255, 216, 106, 0.28), rgba(112, 82, 0, 0.28));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: brandPulse 1.4s ease-in-out infinite;
}

.brand-home-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.2);
}

.header-disclaimer-bar {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255, 216, 106, 0.24);
  background: linear-gradient(90deg, rgba(8, 8, 8, 0.96), rgba(18, 18, 18, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 7px 12px;
  animation: disclaimerGlow 1.3s ease-in-out infinite;
}

.header-disclaimer-track {
  display: flex;
  align-items: center;
  gap: 52px;
  width: max-content;
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  padding-inline-start: 10px;
  animation: disclaimerScroll 20s linear infinite;
}

.header-disclaimer-track span {
  display: inline-block;
}

.top-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  align-self: start;
  margin-top: 2px;
}

.top-nav .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 216, 106, 0.24);
  background: rgba(255, 255, 255, 0.02);
  color: var(--secondary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.top-nav .nav-link.active {
  border-color: rgba(255, 216, 106, 0.44);
  background: linear-gradient(180deg, rgba(255, 216, 106, 0.24), rgba(112, 82, 0, 0.24));
  color: #fff0a6;
}

.top-right-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  justify-self: end;
  align-self: start;
  margin-top: 2px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--secondary);
  font-size: 0.82rem;
}

.status-chip.accent {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.18), rgba(112, 82, 0, 0.22));
  color: var(--gold-soft);
}

.admin-chip {
  background: linear-gradient(180deg, rgba(255, 216, 106, 0.26), rgba(112, 82, 0, 0.28));
  color: #fff0a6;
}

.chip-icon {
  width: 16px;
  height: 16px;
}

.icon-btn,
.profile-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-btn {
  gap: 6px;
  padding-inline: 9px;
}

.icon-btn i,
.profile-btn i {
  width: 16px;
  height: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(320px, 0.95fr);
  gap: 8px;
  align-items: start;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 0 2px;
  margin-top: 4px;
}

.main-panel,
.right-panel {
  min-width: 0;
}

.right-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.right-card,
.chart-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.98), rgba(2, 2, 2, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 48px rgba(0, 0, 0, 0.38);
}

.right-card {
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.chart-card {
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.chart-card {
  min-height: clamp(560px, 70vh, 780px);
}

.chart-body {
  flex: 1;
  min-height: clamp(460px, 60vh, 700px);
  border-radius: 16px;
  border: 1px solid rgba(255, 216, 106, 0.34);
  background: linear-gradient(180deg, rgba(6, 6, 6, 0.99), rgba(0, 0, 0, 1));
  position: relative;
  overflow: hidden;
}

.tradingview-widget {
  position: absolute;
  inset: 0;
}

.tradingview-widget iframe,
.tradingview-widget > div {
  width: 100% !important;
  height: 100% !important;
}

.card-heading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.signal-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 0 !important;
  outline: 0;
  box-shadow: none;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.74), rgba(0, 0, 0, 0.72));
}

.right-panel > .right-card {
  height: clamp(560px, 70vh, 780px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
}

.current-signal-panel,
.history-panel {
  min-height: 0;
}

.current-signal-panel {
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.current-signal-panel.has-active-signal {
  border-color: rgba(34, 197, 94, 0.56);
  animation: activeSignalPulse 1.5s ease-in-out infinite;
}

.current-signal-panel .signal-panel-content {
  flex: 1;
  overflow-y: auto;
}

.history-panel {
  overflow: hidden;
}

.signal-panel-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-panel-content {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.3;
}

.active-signal-empty {
  color: var(--secondary);
}

.active-signal-shell {
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 216, 106, 0.2);
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.98), rgba(0, 0, 0, 0.98));
}

.active-signal-shell.buy { border-color: rgba(34, 197, 94, 0.4); }
.active-signal-shell.sell { border-color: rgba(239, 68, 68, 0.4); }

.active-signal-lines { display: grid; gap: 3px; }

.active-signal-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.active-signal-line span {
  color: var(--secondary);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.active-signal-line strong {
  color: #f2f7ff;
  font-size: 0.84rem;
}

.active-signal-updates-title {
  font-size: 0.68rem;
  color: var(--secondary);
  text-transform: uppercase;
}

.active-signal-updates-list { display: grid; gap: 4px; }

.active-signal-update-item {
  display: flex;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.45);
}

.active-signal-update-time {
  color: var(--gold);
  font-size: 0.64rem;
  font-weight: 700;
}

.active-signal-update-note {
  color: #f5f5f5;
  font-size: 0.78rem;
  line-height: 1.3;
  word-break: break-word;
}

.active-signal-update-empty {
  padding: 6px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  color: var(--secondary);
  font-size: 0.72rem;
}

.active-signal-update-more {
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 700;
}

.active-signal-update-note {
  min-height: 38px;
  font-size: 0.78rem;
}

.active-signal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.close-result-shell {
  display: grid;
  gap: 6px;
  padding: 7px;
  border-radius: 9px;
  border: 1px solid rgba(255, 216, 106, 0.24);
  background: rgba(0, 0, 0, 0.4);
}

.close-result-title {
  color: var(--gold-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.close-result-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.trade-button.result-profit {
  background: linear-gradient(180deg, rgba(8, 48, 24, 0.98), rgba(0, 0, 0, 0.98));
  color: #b9fbcf;
  border-color: rgba(34, 197, 94, 0.4);
}

.trade-button.result-loss {
  background: linear-gradient(180deg, rgba(62, 14, 14, 0.98), rgba(0, 0, 0, 0.98));
  color: #ffcbc4;
  border-color: rgba(239, 68, 68, 0.4);
}

.close-result-pips-input {
  flex: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.close-result-pips-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.close-result-pips-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 216, 106, 0.3);
  background: rgba(0, 0, 0, 0.9);
  color: #fff0a6;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.signal-history-list {
  display: grid;
  gap: 8px;
  max-height: none;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.signal-history-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.history-filter-btn {
  padding: 7px 8px;
  border-radius: 9px;
  border: 1px solid rgba(255, 216, 106, 0.24);
  background: rgba(0, 0, 0, 0.5);
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.history-filter-btn.active {
  border-color: rgba(255, 216, 106, 0.5);
  background: linear-gradient(180deg, rgba(255, 216, 106, 0.22), rgba(112, 82, 0, 0.22));
  color: #fff0a6;
}

.history-custom-wrap {
  display: grid;
  gap: 4px;
}

.history-custom-label {
  color: var(--secondary);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.history-custom-date {
  width: 100%;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 216, 106, 0.3);
  background: rgba(0, 0, 0, 0.9);
  color: #f5f5f5;
  font-size: 0.78rem;
}

.signal-history-item {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 216, 106, 0.2);
  background: linear-gradient(180deg, rgba(14, 14, 14, 0.99), rgba(2, 2, 2, 0.98));
}

.signal-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.signal-history-time { color: var(--gold); font-size: 0.76rem; font-weight: 700; }
.signal-history-entry { color: #e8d99a; font-size: 0.82rem; line-height: 1.3; }

.signal-history-status {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.signal-history-status.closed {
  color: #ffd966;
  background: rgba(255, 217, 102, 0.13);
}

.signal-history-status.profit {
  color: #b9fbcf;
  background: rgba(34, 197, 94, 0.2);
}

.signal-history-status.loss {
  color: #ffcbc4;
  background: rgba(239, 68, 68, 0.2);
}

.history-result-value {
  margin: 2px 0 6px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.history-result-value.profit {
  color: #4ade80;
}

.history-result-value.loss {
  color: #f87171;
}

.history-result-value.closed {
  color: #ffd966;
}

.history-updates-label {
  margin-top: 8px;
  color: var(--gold);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.history-updates-list { display: grid; gap: 4px; margin-top: 4px; }

.history-update-item {
  display: grid;
  gap: 2px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 216, 106, 0.16);
  background: rgba(0, 0, 0, 0.35);
}

.history-update-time { color: var(--gold); font-size: 0.66rem; font-weight: 700; }
.history-update-note { color: #f3e7b0; font-size: 0.76rem; line-height: 1.2; }

.trade-global-row {
  flex: 0 0 auto;
  width: 100%;
  margin-top: 7px;
  padding: 0 4px;
}

.trade-footer-card {
  width: 100%;
  border-radius: 14px;
  padding: 9px;
  height: 120px;
  min-height: 120px;
  max-height: 120px;
  border: 1px solid rgba(255, 216, 106, 0.2);
}

.trade-action-panel {
  display: grid;
  grid-template-columns: 180px minmax(300px, 1.3fr) minmax(180px, 1fr) minmax(260px, auto);
  align-items: start;
  gap: 8px;
  width: 100%;
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  padding: 9px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(180deg, rgba(14, 14, 14, 0.99), rgba(0, 0, 0, 0.98));
  overflow: hidden;
}

.trade-action-panel.step-visible {
  grid-template-columns: 180px minmax(300px, 1.3fr) minmax(180px, 1fr) minmax(260px, auto);
}

.trade-button-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  grid-column: 1;
  min-width: 0;
}

.trade-step-panel {
  grid-column: 2;
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 216, 106, 0.2);
  background: rgba(0, 0, 0, 0.35);
}

.trade-side-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 216, 106, 0.36);
  background: linear-gradient(180deg, rgba(255, 216, 106, 0.24), rgba(112, 82, 0, 0.24));
  color: #fff0a6;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.trade-side-chip.buy {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.28), rgba(7, 74, 35, 0.26));
  border-color: rgba(34, 197, 94, 0.44);
  color: #b9fbcf;
}

.trade-side-chip.sell {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.28), rgba(91, 12, 12, 0.26));
  border-color: rgba(239, 68, 68, 0.44);
  color: #ffcbc4;
}

.trade-inline-fields {
  display: grid;
  grid-template-columns: minmax(120px, 2fr) minmax(70px, 1fr) minmax(70px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.trade-input,
.trade-textarea {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 216, 106, 0.3);
  background: rgba(0, 0, 0, 0.96);
  color: var(--text);
  font-size: 0.84rem;
  outline: none;
}

.trade-textarea:focus,
.trade-input:focus {
  border-color: rgba(255, 216, 106, 0.58);
  box-shadow: 0 0 0 3px rgba(255, 216, 106, 0.14);
}

.trade-button {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 216, 106, 0.34);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.trade-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: saturate(0.5);
  box-shadow: none !important;
}

.trade-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.trade-button.buy {
  background: linear-gradient(135deg, #16a34a, #4ade80);
  color: #f3fff7;
}

.trade-button.sell {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #fff7f7;
}

.trade-button.confirm,
.trade-button.update {
  background: linear-gradient(135deg, #d4af37, #fff0a6);
  color: #050505;
}

.trade-button.close {
  background: linear-gradient(180deg, rgba(37, 10, 10, 0.98), rgba(0, 0, 0, 0.98));
  color: #ffad9d;
}

.trade-button.active.buy { box-shadow: 0 0 14px rgba(34, 197, 94, 0.36); }
.trade-button.active.sell { box-shadow: 0 0 14px rgba(239, 68, 68, 0.36); }

.trade-done-mini {
  min-width: 74px;
  border-radius: 999px;
}

.trade-action-result {
  grid-column: 2;
  min-width: 0;
  color: #e8d99a;
  font-size: 0.8rem;
}

.trade-action-panel.step-visible .trade-action-result {
  grid-column: 3;
}

.trade-action-panel > .telegram-button {
  grid-column: 3;
}

.trade-action-panel.step-visible > .telegram-button {
  grid-column: 4;
}

.trade-social-links {
  grid-column: 4;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.trade-social-links > a {
  width: 102px;
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 0.74rem;
  gap: 6px;
}

.trade-action-panel.step-visible .trade-social-links {
  grid-column: 4;
}

.trade-action-result.warning {
  color: #ffad69;
}

.telegram-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 12px;
  border: 1px solid rgba(132, 213, 255, 0.6);
  background: linear-gradient(135deg, #2aa9e0, #128cc8);
  color: #f5fcff;
  text-decoration: none;
  font-weight: 700;
  gap: 8px;
  min-height: 34px;
}

.social-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f5fcff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 6px;
}

.social-link-icon,
.social-link-icon-svg {
  width: 14px;
  height: 14px;
  display: block;
}

.youtube-link {
  border-color: rgba(255, 120, 120, 0.55);
  background: linear-gradient(135deg, #d72f2f, #ff4f4f);
}

.instagram-link {
  border-color: rgba(255, 159, 229, 0.55);
  background: linear-gradient(135deg, #c13584, #fd1d1d 45%, #fcb045);
}

.telegram-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.telegram-brand-icon {
  opacity: 0.92;
}

.telegram-icon-svg {
  width: 16px;
  height: 16px;
  display: block;
}

.telegram-button.telegram-mini {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.button-icon,
.trade-button svg {
  width: 16px;
  height: 16px;
}

.page-shell {
  min-height: 100vh;
  padding: 6px 4px 18px;
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.12), transparent 20%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 16%),
    linear-gradient(180deg, #050505 0%, #020202 100%);
}

.page-content {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page-hero {
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.98), rgba(3, 3, 3, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 46px rgba(0, 0, 0, 0.35);
}

.page-hero h1,
.page-hero h2 {
  margin: 0 0 8px;
  color: #fff2b8;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.2;
}

.page-hero p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.96rem;
  line-height: 1.6;
  max-width: 760px;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.page-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.98), rgba(2, 2, 2, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 30px rgba(0, 0, 0, 0.28);
}

.page-card h3 {
  margin: 0 0 8px;
  color: var(--gold-soft);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-card p,
.page-card li {
  color: var(--secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.page-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.page-card .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.24);
  color: var(--gold-soft);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-highlight {
  color: #fff2b8;
  font-weight: 700;
}

.page-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.page-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.2), rgba(112, 82, 0, 0.2));
  color: #fff0a6;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}

.page-link-btn.secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  color: var(--secondary);
}

.hero-shell {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-top: 12px;
}

.hero-card,
.hero-side-card,
.section-card,
.footer-card {
  border-radius: 24px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.98), rgba(3, 3, 3, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 46px rgba(0, 0, 0, 0.34);
}

.hero-card {
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent 70%);
  pointer-events: none;
}

.hero-card h1 {
  margin: 10px 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.1;
  color: #fff2b8;
  max-width: 700px;
}

.hero-card p {
  margin: 0;
  color: var(--secondary);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 700px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

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

.hero-mini-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 216, 106, 0.18);
  background: rgba(0, 0, 0, 0.42);
}

.hero-mini-card strong {
  display: block;
  color: #fff4c5;
  font-size: 1rem;
  margin-bottom: 4px;
}

.hero-mini-card span {
  color: var(--secondary);
  font-size: 0.82rem;
}

.hero-side-card {
  padding: 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
}

.glow-ring {
  position: absolute;
  inset: auto auto 8% -10%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.18);
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.12);
  pointer-events: none;
}

.hero-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-side-label {
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.hero-side-item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 216, 106, 0.16);
  background: rgba(0, 0, 0, 0.42);
}

.hero-side-item span {
  display: block;
  color: var(--secondary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.hero-side-item strong {
  color: #fff8d0;
  font-size: 0.95rem;
  line-height: 1.35;
}

.section-card {
  padding: 22px;
  margin-top: 14px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  color: #fff2b8;
  max-width: 760px;
}

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

.feature-card,
.stat-card,
.community-panel {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 216, 106, 0.16);
  background: linear-gradient(180deg, rgba(14, 14, 14, 0.98), rgba(2, 2, 2, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: fadeUp 0.7s ease both;
}

.feature-card:nth-child(2) { animation-delay: 0.08s; }
.feature-card:nth-child(3) { animation-delay: 0.16s; }
.feature-card:nth-child(4) { animation-delay: 0.24s; }

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.2), rgba(112, 82, 0, 0.2));
  color: var(--gold-soft);
}

.feature-icon svg,
.status-chip svg,
.community-panel h3 svg {
  width: 16px;
  height: 16px;
  display: block;
}

.community-panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-card h3,
.community-panel h3 {
  margin: 0 0 6px;
  color: #fff4c5;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feature-card p,
.community-panel p,
.philosophy-card p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.philosophy-card p {
  max-width: 900px;
}

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

.stat-card {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: auto auto -35px -10px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.14), transparent 70%);
  pointer-events: none;
}

.stat-value {
  color: #fff1b0;
  font-size: 1.4rem;
  font-weight: 800;
}

.stat-label {
  color: var(--secondary);
  font-size: 0.85rem;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.community-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-card {
  padding: 16px 20px;
  margin-top: 14px;
  text-align: center;
}

.footer-card p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.9rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .hero-stats,
  .hero-side-grid,
  .community-grid,
  .feature-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .hero-side-card,
  .section-card,
  .footer-card {
    padding: 18px;
  }

  .hero-card h1 {
    font-size: 1.7rem;
  }
}

.home-grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  margin-top: 14px;
}

.home-stack {
  display: grid;
  gap: 12px;
}

.home-community-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 216, 106, 0.16);
  background: rgba(0, 0, 0, 0.35);
}

.home-community-item strong {
  color: #fff4c5;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-community-item p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.home-cta-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 860px) {
  .home-grid-2 {
    grid-template-columns: 1fr;
  }
}

body.home-page {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  max-height: none;
  min-height: 100vh;
}

.home-main {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.home-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background: linear-gradient(145deg, rgba(12, 12, 12, 0.98), rgba(4, 4, 4, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 46px rgba(0, 0, 0, 0.34);
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent 70%);
  pointer-events: none;
}

.home-hero-content h1 {
  margin: 10px 0 12px;
  color: #fff2b8;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.home-hero-content p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 680px;
}

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

.mini-stat {
  padding: 12px 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.14);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}

.mini-stat strong {
  display: block;
  color: #fff2b8;
  font-size: 1rem;
  margin-bottom: 4px;
}

.mini-stat span {
  color: var(--secondary);
  font-size: 0.82rem;
}

.home-hero-media {
  min-height: 320px;
}

.hero-media-card {
  position: relative;
  height: 100%;
  min-height: 320px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.7)),
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.16), transparent 30%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 36px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-media-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.hero-media-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 216, 106, 0.2);
  border-radius: 16px;
  pointer-events: none;
}

.hero-media-illustration {
  position: absolute;
  inset: 18px 18px 88px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

.hero-media-illustration svg {
  width: 100%;
  height: 100%;
  max-height: 220px;
}

.media-overlay {
  position: relative;
  z-index: 1;
  max-width: 330px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(5, 5, 5, 0.56);
  border: 1px solid rgba(255, 216, 106, 0.18);
  backdrop-filter: blur(10px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-overlay h3 {
  margin: 0 0 8px;
  color: #fff2b8;
  font-size: 1rem;
  line-height: 1.3;
}

.media-overlay p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.home-section {
  display: grid;
  gap: 12px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-heading h2 {
  margin: 0;
  color: #fff2b8;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
}

.feature-grid,
.stat-grid,
.community-grid {
  display: grid;
  gap: 12px;
}

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

.feature-card,
.stat-card,
.community-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.98), rgba(4, 4, 4, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover,
.stat-card:hover,
.community-card:hover,
.page-link-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 216, 106, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 36px rgba(0, 0, 0, 0.32);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 216, 106, 0.2), rgba(112, 82, 0, 0.28));
  color: #fff0a6;
  font-size: 0.95rem;
}

.feature-icon svg,
.community-icon svg,
.footer-socials svg {
  width: 16px;
  height: 16px;
  display: block;
}

.community-icon svg {
  width: 18px;
  height: 18px;
}

.footer-socials svg {
  width: 14px;
  height: 14px;
}

.feature-card h3,
.community-card h3 {
  margin: 0 0 8px;
  color: var(--gold-soft);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-card p,
.community-card p,
.stat-card span {
  margin: 0;
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.stat-card {
  text-align: center;
}

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  color: #fff2b8;
  font-size: 1.35rem;
}

.home-visual-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.visual-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.98), rgba(4, 4, 4, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 26px rgba(0, 0, 0, 0.18);
}

.visual-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 216, 106, 0.16), rgba(112, 82, 0, 0.24));
  color: #fff0a6;
  flex-shrink: 0;
}

.visual-icon svg {
  width: 20px;
  height: 20px;
}

.visual-card h3 {
  margin: 0 0 4px;
  color: var(--gold-soft);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-card p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.84rem;
  line-height: 1.5;
}

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

.community-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

.community-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.telegram-card {
  background:
    linear-gradient(135deg, rgba(5, 5, 5, 0.25), rgba(0, 0, 0, 0.75)),
    url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?auto=format&fit=crop&w=1400&q=80') center/cover;
}

.youtube-card {
  background:
    linear-gradient(135deg, rgba(5, 5, 5, 0.25), rgba(0, 0, 0, 0.75)),
    url('https://images.unsplash.com/photo-1516321497487-e288fb19713f?auto=format&fit=crop&w=1400&q=80') center/cover;
}

.community-icon {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 216, 106, 0.16);
  color: #fff0a6;
  font-size: 1rem;
}

.community-card h3,
.community-card p,
.community-card a {
  position: relative;
  z-index: 1;
}

.cta-banner {
  position: relative;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.75)),
    url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?auto=format&fit=crop&w=1800&q=80') center/cover;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 46px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.cta-content h2 {
  margin: 10px 0 8px;
  color: #fff2b8;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.cta-content p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.home-footer {
  display: grid;
  grid-template-columns: 1.15fr 0.7fr 0.45fr;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand p {
  margin: 4px 0 0;
  color: var(--secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.footer-links a,
.footer-socials a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-socials a:hover {
  color: var(--gold-soft);
}

.footer-socials {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: var(--secondary);
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

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

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

  .footer-socials {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .hero-metrics,
  .home-visual-strip,
  .community-grid,
  .feature-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .cta-banner,
  .home-footer {
    padding: 18px;
  }

  .home-hero-content h1 {
    font-size: 1.7rem;
  }
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
  z-index: 40;
}

.auth-card {
  width: min(100%, 440px);
  position: relative;
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(255, 216, 106, 0.22);
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.98), rgba(2, 2, 2, 0.98));
}

.auth-close-btn {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 216, 106, 0.24);
  background: rgba(0, 0, 0, 0.9);
  color: var(--gold-soft);
  font-size: 1.1rem;
  cursor: pointer;
}

.auth-header { display: grid; gap: 6px; margin-bottom: 14px; }
.auth-title { font-size: 1.15rem; font-weight: 800; color: #fff0a6; }
.auth-subtitle { color: var(--secondary); font-size: 0.9rem; line-height: 1.4; }

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 216, 106, 0.2);
  background: rgba(0, 0, 0, 0.92);
  color: var(--secondary);
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.active {
  background: linear-gradient(180deg, rgba(255, 216, 106, 0.24), rgba(112, 82, 0, 0.24));
  border-color: rgba(255, 216, 106, 0.4);
  color: #fff0a6;
}

.auth-form { display: grid; gap: 8px; }
.auth-label { color: var(--secondary); font-size: 0.78rem; text-transform: uppercase; }

.auth-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 216, 106, 0.3);
  background: rgba(0, 0, 0, 0.98);
  color: var(--text);
  font: inherit;
}

.auth-submit {
  margin-top: 6px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 216, 106, 0.34);
  background: linear-gradient(135deg, #d4af37, #fff0a6);
  color: #050505;
  font-weight: 800;
  cursor: pointer;
}

.auth-message {
  min-height: 18px;
  margin-top: 10px;
  color: #ffd86a;
  font-size: 0.88rem;
}

.auth-message.error { color: #ff9f8a; }

@media (max-width: 1180px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    max-height: none;
    min-height: 100vh;
  }

  canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
  }

  .dashboard-shell {
    position: relative;
    inset: auto;
    height: auto;
    max-height: none;
    min-height: 100vh;
    overflow: visible;
    padding-bottom: 12px;
  }

  .dashboard-topbar,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-topbar {
    gap: 10px;
    width: 100%;
    margin: 0;
    margin-left: 0;
    padding: 12px 8px 10px;
  }

  .brand-panel,
  .brand-copy,
  .header-disclaimer-bar {
    min-width: 0;
    max-width: 100%;
  }

  .header-disclaimer-track {
    width: 200%;
  }

  .top-nav {
    justify-self: start;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .right-panel,
  .main-panel {
    gap: 12px;
  }

  .chart-card {
    min-height: clamp(420px, 62vh, 640px);
  }

  .chart-body {
    min-height: clamp(360px, 56vh, 580px);
  }

  .right-panel > .right-card {
    height: auto;
    display: flex;
  }

  .trade-action-panel {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
  }

  .trade-footer-card {
    height: auto;
  }

  .trade-button-row,
  .trade-step-panel,
  .trade-action-result,
  .trade-social-links,
  .telegram-button,
  .social-link-button {
    width: 100%;
    min-width: 0;
  }

  .trade-social-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .telegram-button.telegram-mini {
    width: 100%;
    border-radius: 10px;
  }
}

@media (max-width: 860px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* iOS Safari auto-zooms focused inputs under 16px. Keep controls at 16px on mobile. */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .dashboard-shell {
    padding: 10px 0;
  }

  .dashboard-topbar,
  .dashboard-grid,
  .trade-global-row {
    padding-inline: 6px;
  }

  .brand-title {
    font-size: 1rem;
  }

  .brand-panel {
    align-items: flex-start;
  }

  .header-disclaimer-track {
    width: 100%;
    display: block;
    animation: none;
    font-size: 0.68rem;
    line-height: 1.4;
    white-space: normal;
  }

  .header-disclaimer-track span + span {
    display: none;
  }

  .top-nav .nav-link {
    flex: 1 1 calc(50% - 6px);
    min-width: 130px;
  }

  .home-hero,
  .cta-banner,
  .home-footer,
  .section-card,
  .page-hero {
    border-radius: 18px;
  }

  .home-hero-media,
  .hero-media-card {
    min-height: 260px;
  }

  .status-chip {
    padding: 8px 10px;
    font-size: 0.76rem;
  }

  .top-right-panel {
    width: 100%;
    justify-content: flex-start;
  }

  .trade-inline-fields {
    grid-template-columns: 1fr 1fr;
  }

  .trade-global-row {
    position: sticky;
    bottom: 8px;
    z-index: 15;
    margin-top: 10px;
  }

  .trade-footer-card {
    height: auto;
    min-height: 0;
    max-height: none;
    border: 1px solid rgba(255, 216, 106, 0.22);
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.98), rgba(2, 2, 2, 0.98));
    backdrop-filter: blur(10px);
  }

  .trade-action-panel {
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 8px;
    gap: 7px;
  }

  .trade-done-mini {
    grid-column: span 2;
    width: 100%;
  }

  .active-signal-actions {
    grid-template-columns: 1fr;
  }

  .trade-footer-card {
    min-height: 0;
    max-height: none;
  }

  .trade-action-panel {
    min-height: 0;
    max-height: none;
    height: auto;
    overflow: visible;
  }

  .trade-social-links > a {
    width: 100%;
  }
}

@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .dashboard-topbar,
  .dashboard-grid,
  .trade-global-row,
  .page-shell {
    padding-inline: 4px;
  }

  .dashboard-shell {
    padding: 8px 0 12px;
  }

  .dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .main-panel,
  .right-panel,
  .trade-global-row {
    width: 100%;
    min-width: 0;
  }

  .right-panel {
    gap: 10px;
  }

  .right-panel > .right-card {
    height: auto;
    display: flex;
  }

  .chart-card {
    min-height: 420px;
    padding: 12px;
  }

  .chart-body {
    min-height: 340px;
  }

  .trade-global-row {
    position: static;
    bottom: auto;
    z-index: auto;
    margin-top: 0;
    padding-bottom: 6px;
  }

  .trade-footer-card {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .trade-action-panel {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .trade-button-row,
  .trade-step-panel,
  .trade-action-result,
  .trade-social-links {
    width: 100%;
  }

  .trade-inline-fields {
    grid-template-columns: 1fr;
  }

  .trade-done-mini {
    grid-column: auto;
    width: 100%;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .home-hero-content h1 {
    font-size: 1.48rem;
    line-height: 1.2;
  }

  .hero-metrics,
  .home-visual-strip,
  .community-grid,
  .feature-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-media-illustration {
    inset: 14px 14px 80px 14px;
  }

  .media-overlay {
    max-width: none;
    width: 100%;
  }
}
