:root {
  --bg-0: #08080a;
  --bg-1: #101013;
  --bg-2: #16161a;
  --bg-3: #1d1d22;
  --gold-1: #f6d68a;
  --gold-2: #d4a94c;
  --gold-3: #8a6a1f;
  --gold-grad: linear-gradient(135deg, #f8e3ab 0%, #d4af37 45%, #9c7a2b 100%);
  --text-0: #f3f0ea;
  --text-1: #c9c4ba;
  --text-2: #8b877e;
  --danger: #ef4b4b;
  --success: #3ecf8e;
  --card-border: rgba(212, 175, 55, 0.20);
  --radius: 16px;
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  --nav-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* The [hidden] attribute must always win over any class-based display rule
   defined below, no matter the specificity/cascade order. Without this,
   any element that both has a component class setting `display` AND gets
   toggled via the `hidden` attribute (instead of a dedicated `.active` class)
   can end up permanently visible. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text-0);
  font-family: "Vazirmatn", sans-serif;
  min-height: 100vh;
  overscroll-behavior-y: none;
  touch-action: manipulation;
}

body {
  background:
    radial-gradient(circle at 15% 0%, rgba(212, 175, 55, 0.10), transparent 40%),
    radial-gradient(circle at 90% 5%, rgba(212, 175, 55, 0.07), transparent 45%),
    var(--bg-0);
}

img.icon-3d {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  flex-shrink: 0;
}
.icon-sm { width: 18px; height: 18px; vertical-align: -4px; margin-left: 4px; }
.icon-xl { width: 72px; height: 72px; margin-bottom: 8px; }
.icon-nav { width: 24px; height: 24px; margin-bottom: 2px; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(8, 8, 10, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}

.back-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--bg-2);
  color: var(--gold-1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transform: scaleX(-1);
}

.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { font-size: 20px; }
.brand-text {
  font-weight: 800; font-size: 16px;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: 0.5px;
}
.topbar-spacer { flex: 1; }

.admin-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #201703;
  font-weight: 800;
}

#views { padding: 12px 12px calc(var(--nav-h) + 22px); }

.view { display: none; animation: fadeIn 0.22s ease; }
.view.active { display: block; }

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

/* ---------- Profile card ---------- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-1));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.profile-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--gold-grad);
  color: #201703;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--gold-2);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-weight: 800; font-size: 15px; }
.profile-username { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pbadge {
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
  color: var(--text-1);
  white-space: nowrap;
}
.pbadge.on { color: #0d2a1c; background: var(--success); border-color: transparent; font-weight: 700; }
.pbadge.off { color: var(--text-2); }
.pbadge.admin { color: #201703; background: var(--gold-grad); border-color: transparent; font-weight: 800; }

/* ---------- Ticker ---------- */
.ticker-wrap {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--bg-2);
  margin-bottom: 16px;
  padding: 8px 0;
  direction: ltr;
}
.ticker-track {
  display: flex;
  gap: 22px;
  white-space: nowrap;
  width: max-content;
  padding: 0 14px;
  will-change: transform;
  transform: translateX(0);
}
.ticker-item { font-size: 12.5px; color: var(--text-1); display: flex; align-items: center; gap: 5px; flex-shrink: 0; direction: ltr; }
.ticker-item b { color: var(--gold-1); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 4px 4px 18px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  color: var(--gold-1);
  background: rgba(212, 175, 55, 0.08);
  margin-bottom: 12px;
}
.hero h1 { font-size: 21px; font-weight: 800; margin: 0 0 8px; line-height: 1.6; }
.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--text-1); font-size: 13px; margin: 0; line-height: 1.9; }

/* ---------- VIP Mammoth banner ---------- */
.vip-mammoth-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: right;
  padding: 20px 18px;
  margin: 4px 0 6px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: #201703;
  background: linear-gradient(120deg, #fdeeb0 0%, #f0cd6b 25%, #d4af37 50%, #f0cd6b 75%, #fdeeb0 100%);
  background-size: 250% 100%;
  animation: vipShift 5s ease-in-out infinite, vipGlow 2.4s ease-in-out infinite;
}
.vip-mammoth-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: vipShimmer 3.2s ease-in-out infinite;
}
@keyframes vipShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes vipShimmer { 0% { left: -60%; } 55% { left: 130%; } 100% { left: 130%; } }
@keyframes vipGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(212, 175, 55, 0.45), 0 8px 24px rgba(0,0,0,0.4); }
  50% { box-shadow: 0 0 34px rgba(212, 175, 55, 0.8), 0 8px 24px rgba(0,0,0,0.4); }
}
.vip-mammoth-btn:active { transform: scale(0.98); }
.icon-vip { width: 46px; height: 46px; flex-shrink: 0; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35)); }
.vip-mammoth-info { flex: 1; min-width: 0; }
.vip-mammoth-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  background: #201703;
  color: var(--gold-1);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}
.vip-mammoth-title { font-size: 16px; font-weight: 900; margin-bottom: 3px; }
.vip-mammoth-desc { font-size: 11.5px; font-weight: 600; opacity: 0.85; line-height: 1.6; }
.vip-mammoth-arrow { font-size: 22px; font-weight: 900; opacity: 0.7; flex-shrink: 0; }

.section-label {
  display: flex; align-items: center; gap: 4px;
  font-size: 12.5px;
  color: var(--gold-1);
  font-weight: 700;
  margin: 18px 4px 10px;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.feature-card {
  position: relative;
  background: linear-gradient(160deg, var(--bg-3), var(--bg-1));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: right;
  cursor: pointer;
  color: var(--text-0);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
  overflow: hidden;
}
.feature-card:active { transform: scale(0.96); }
.feature-card:hover { border-color: var(--gold-2); }
.feature-card img.icon-3d { margin-bottom: 8px; }
.feature-title { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.feature-desc { font-size: 11px; color: var(--text-2); line-height: 1.6; }

.premium-card { opacity: 0.55; }
.premium-card.unlocked { opacity: 1; }
.lock-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 13px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.premium-card.unlocked .lock-badge { display: none; }
.soon-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 9.5px;
  background: var(--gold-grad);
  color: #201703;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 8px;
}
.soon-card { opacity: 0.8; }

.admin-entry-btn {
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--gold-2);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-1);
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-header h2 { font-size: 16px; margin: 0; font-weight: 800; display: flex; align-items: center; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.usage-pill {
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  color: var(--gold-1);
  background: rgba(212, 175, 55, 0.08);
  white-space: nowrap;
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--gold-1);
  font-family: inherit;
  font-size: 11.5px;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

/* ---------- Chat ---------- */
.chat-view { flex-direction: column; height: calc(100vh - 130px); padding: 0 !important; }
.chat-view.active { display: flex; }

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(160deg, var(--bg-3), var(--bg-1));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 12px 12px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.chat-header-left { display: flex; align-items: center; gap: 10px; }
.chat-avatar-ring {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-grad);
  padding: 2px;
  flex-shrink: 0;
  animation: vipGlow 3s ease-in-out infinite;
}
.chat-avatar-ring img.icon-3d { width: 26px; height: 26px; margin: 0; }
.chat-header-title { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.chat-header-sub { font-size: 10.5px; color: var(--text-2); margin-top: 2px; }
.chat-online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(62,207,142,0.6);
  animation: dotPulse 1.8s ease-in-out infinite;
}
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(62,207,142,0.55); }
  70% { box-shadow: 0 0 0 6px rgba(62,207,142,0); }
  100% { box-shadow: 0 0 0 0 rgba(62,207,142,0); }
}
.chat-header-right { display: flex; align-items: center; gap: 8px; }
.new-chat-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--gold-2);
  background: rgba(212,175,55,0.08);
  color: var(--gold-1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 14px;
}

.chat-empty-state { text-align: center; padding: 14px 10px 6px; }
.chat-empty-state img.icon-3d { width: 58px; height: 58px; margin-bottom: 10px; }
.chat-empty-state h3 { font-size: 15px; margin: 0 0 6px; }
.chat-empty-state p { font-size: 12.5px; color: var(--text-2); margin: 0 0 16px; line-height: 1.8; }
.suggestion-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.suggestion-chip {
  font-family: inherit;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--bg-2);
  color: var(--gold-1);
  cursor: pointer;
}
.suggestion-chip:active { transform: scale(0.96); }

.msg-row { display: flex; align-items: flex-end; gap: 8px; animation: msgIn 0.22s ease; max-width: 100%; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.msg-row.user { justify-content: flex-start; }
.msg-row.bot { justify-content: flex-end; }
.msg-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold-grad); display: flex; align-items: center; justify-content: center; padding: 3px;
}
.msg-avatar img.icon-3d { width: 18px; height: 18px; margin: 0; }

.msg { max-width: 78%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.9; white-space: pre-wrap; }
.msg img.msg-image { display: block; max-width: 220px; border-radius: 12px; margin-bottom: 6px; }
.msg.user { background: var(--gold-grad); color: #201703; border-bottom-right-radius: 4px; }
.msg.bot { background: var(--bg-2); border: 1px solid var(--card-border); border-bottom-left-radius: 4px; }
.msg.limited { background: rgba(239, 75, 75, 0.12); border: 1px solid rgba(239, 75, 75, 0.4); color: #ffb3b3; }

.typing-bubble { display: flex; gap: 4px; padding: 14px 16px; }
.typing-bubble span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-1);
  animation: typingBounce 1.1s infinite ease-in-out;
}
.typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }

.chat-input-row {
  display: flex; align-items: flex-end; gap: 8px;
  margin: 0 12px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 12px);
  flex-shrink: 0;
}
.attach-btn {
  position: relative;
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--bg-2);
  color: var(--gold-1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.attach-btn.active { border-color: var(--gold-2); background: rgba(212,175,55,0.15); }
.attach-badge {
  display: none;
  position: absolute; top: -2px; left: -2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold-grad);
  border: 2px solid var(--bg-1);
}
.attach-btn.active .attach-badge { display: block; }
.chat-input-row textarea {
  flex: 1;
  resize: none;
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 11px 16px;
  color: var(--text-0);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  max-height: 110px;
  transition: border-color 0.15s ease;
}
.chat-input-row textarea:focus { border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(212,175,55,0.12); }
.send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--gold-grad);
  color: #201703;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transform: scaleX(-1);
  flex-shrink: 0;
}
.send-btn:active { transform: scaleX(-1) scale(0.92); }

/* ---------- News ---------- */
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-card {
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.news-card img.banner { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.news-card-body { padding: 14px 16px 16px; font-size: 13.5px; line-height: 2; color: var(--text-1); white-space: pre-wrap; }
.news-source-link {
  display: inline-block; margin-top: 8px;
  color: var(--gold-1); text-decoration: none; font-size: 12.5px;
  border-bottom: 1px dashed var(--gold-3);
}
.skeleton { height: 150px; border-radius: var(--radius); background: linear-gradient(90deg, var(--bg-1) 25%, var(--bg-2) 37%, var(--bg-1) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- Mammoth ---------- */
.services-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.service-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(160deg, var(--bg-3), var(--bg-1));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.service-item img.icon-3d { width: 36px; height: 36px; margin-top: 2px; }
.service-item-title { font-size: 13.5px; font-weight: 800; color: var(--gold-1); margin-bottom: 4px; }
.service-item-desc { font-size: 12px; color: var(--text-1); line-height: 1.8; }

.form-box {
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.referral-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-1);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0;
}
.referral-row a { color: var(--gold-1); font-size: 13px; word-break: break-all; flex: 1; text-decoration: none; }
.copy-btn {
  border: 1px solid var(--gold-2);
  background: transparent;
  color: var(--gold-1);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.warning-text { color: var(--danger); font-size: 13px; font-weight: 700; margin: 6px 0 16px; }

.check-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--text-1); line-height: 1.9; }
.check-row input { margin-top: 4px; accent-color: var(--gold-2); width: 18px; height: 18px; }

.field-label { display: block; font-size: 13px; color: var(--text-1); margin-bottom: 8px; }
.field-input {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-0);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  margin-bottom: 14px;
}
.field-input:focus { border-color: var(--gold-2); }

.gold-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: var(--gold-grad);
  color: #201703;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.gold-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.danger-btn {
  border: 1px solid rgba(239,75,75,0.5);
  background: rgba(239,75,75,0.1);
  color: #ffb3b3;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.alert-box { border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-top: 12px; line-height: 1.8; }
.alert-box.error { background: rgba(239, 75, 75, 0.12); border: 1px solid rgba(239, 75, 75, 0.4); color: #ffb3b3; }
.alert-box.success { background: rgba(62, 207, 142, 0.12); border: 1px solid rgba(62, 207, 142, 0.4); color: #a9f0d1; }

.status-card { text-align: center; padding: 26px 16px; }
.status-card .icon-3d.icon-xl { margin: 0 auto 10px; display: block; }

.locked-panel { text-align: center; padding: 40px 18px; }
.locked-panel p { color: var(--text-2); font-size: 13px; line-height: 1.9; margin: 10px 0 18px; }

/* ---------- Screener / Signals / Alerts ---------- */
.screener-list { display: flex; flex-direction: column; gap: 8px; }
.screener-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 12px;
  padding: 12px 14px; font-size: 13px;
}
.screener-row .sym { font-weight: 800; color: var(--gold-1); }
.screener-row .price { color: var(--text-0); }
.rsi-tag { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--card-border); }
.rsi-tag.high { color: #ffb3b3; border-color: rgba(239,75,75,0.4); }
.rsi-tag.low { color: #a9f0d1; border-color: rgba(62,207,142,0.4); }
.rsi-tag.mid { color: var(--text-1); }

.signals-list { display: flex; flex-direction: column; gap: 10px; }
.signal-card {
  background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; line-height: 1.9; white-space: pre-wrap;
}

.alerts-list { display: flex; flex-direction: column; gap: 8px; }
.alert-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 12px;
  padding: 10px 14px; font-size: 12.5px;
}

/* ---------- Instant Signal ---------- */
.instant-signal-banner { margin-bottom: 18px; }
.full-width { width: 100%; }

.symbol-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 2px;
}
.symbol-grid-item {
  padding: 10px 4px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.symbol-grid-item.active { background: var(--gold-grad); color: #201703; border-color: transparent; }

.timeframe-row { display: flex; gap: 10px; }
.timeframe-chip {
  flex: 1;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.timeframe-chip.active { background: var(--gold-grad); color: #201703; border-color: transparent; }

.instant-signal-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: var(--gold-grad);
  color: #201703;
  font-weight: 800;
  font-size: 14.5px;
  cursor: pointer;
  font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
}
.instant-signal-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.signal-progress-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
}
.signal-progress-ring { position: relative; width: 130px; height: 130px; }
.progress-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--bg-2); stroke-width: 8; }
.ring-fg {
  fill: none;
  stroke: var(--gold-2);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.7));
}
.progress-percent {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: var(--gold-1);
}
.progress-stage {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-1);
  text-align: center;
  animation: pulseOpacity 1.6s ease-in-out infinite;
}
@keyframes pulseOpacity { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

.signal-chart-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.icon-tiny { width: 22px; height: 22px; margin: 0; }

/* ---------- Signal result card ---------- */
.sig-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--bg-2);
  box-shadow: var(--shadow);
}

.sig-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
}
.sig-card.side-long .sig-header { background: linear-gradient(135deg, rgba(62,207,142,0.18), rgba(62,207,142,0.02)); }
.sig-card.side-short .sig-header { background: linear-gradient(135deg, rgba(239,75,75,0.18), rgba(239,75,75,0.02)); }

.sig-symbol-row { display: flex; align-items: center; gap: 8px; }
.sig-symbol { font-size: 19px; font-weight: 900; color: var(--text-0); letter-spacing: 0.3px; }
.sig-tf-badge {
  font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--card-border);
  color: var(--gold-1);
}

.sig-side-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
}
.sig-side-long { background: rgba(62,207,142,0.16); color: var(--success); border: 1px solid rgba(62,207,142,0.4); }
.sig-side-short { background: rgba(239,75,75,0.16); color: var(--danger); border: 1px solid rgba(239,75,75,0.4); }
.sig-side-fa { font-size: 11px; font-weight: 700; opacity: 0.85; }

.sig-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}
.sig-stat {
  background: var(--bg-1);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}
.sig-stat img.icon-3d { width: 30px; height: 30px; margin: 0 auto 6px; }
.sig-stat-label { font-size: 11px; color: var(--text-2); margin-bottom: 4px; }
.sig-stat-value { font-size: 14.5px; font-weight: 800; color: var(--text-0); }

.sig-section-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800; color: var(--gold-1);
  padding: 0 16px; margin-bottom: 8px;
}
.sig-section-label img.icon-tiny { width: 16px; height: 16px; }

.sig-tp-list { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; margin-bottom: 14px; }
.sig-tp-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(62, 207, 142, 0.08);
  border: 1px solid rgba(62, 207, 142, 0.3);
  border-radius: 12px;
  padding: 9px 12px;
}
.sig-tp-label { font-size: 12.5px; font-weight: 800; color: var(--success); }
.sig-tp-price { font-size: 13.5px; font-weight: 800; color: var(--text-0); margin-inline-start: auto; }
.sig-rr-badge {
  font-size: 10.5px; font-weight: 700;
  color: var(--success);
  background: rgba(62,207,142,0.15);
  border-radius: 999px;
  padding: 2px 8px;
}

.sig-stop-row {
  display: flex; align-items: center; gap: 8px;
  margin: 0 16px 14px;
  background: rgba(239, 75, 75, 0.1);
  border: 1px solid rgba(239, 75, 75, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
}
.sig-stop-label { font-size: 12.5px; font-weight: 800; color: var(--danger); }
.sig-stop-price { font-size: 14px; font-weight: 900; color: var(--danger); margin-inline-start: auto; }

.sig-riskfree-note {
  display: flex; align-items: center; gap: 8px;
  margin: 0 16px 16px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed var(--gold-2);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--gold-1);
  line-height: 1.7;
}
.sig-riskfree-note img { flex-shrink: 0; }

.sig-reasoning {
  margin: 0 16px 16px;
  background: var(--bg-1);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px;
}
.sig-reasoning-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 800; color: var(--text-0);
  margin-bottom: 8px;
}
.sig-reasoning p { font-size: 12.5px; color: var(--text-1); line-height: 1.9; margin: 0 0 8px; }
.sig-reasoning p:last-child { margin-bottom: 0; }

/* ---------- Admin ---------- */
.admin-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.admin-stat-card {
  background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 14px;
  padding: 14px; text-align: center;
}
.admin-stat-value { font-size: 19px; font-weight: 800; color: var(--gold-1); }
.admin-stat-label { font-size: 11px; color: var(--text-2); margin-top: 4px; }

.admin-section { margin-bottom: 22px; }
.admin-section-title { font-size: 13.5px; font-weight: 800; margin-bottom: 10px; color: var(--text-0); }

.admin-list-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; font-size: 12.5px;
}

/* ---------- Gate screen ---------- */
.gate-view {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.gate-view.active { display: flex; }
.gate-box {
  max-width: 400px;
  text-align: center;
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: var(--shadow);
}
.gate-box h2 { margin: 0 0 8px; font-size: 18px; }
.gate-box p { color: var(--text-1); font-size: 13px; line-height: 1.9; margin-bottom: 16px; }
.gate-channels { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.gate-channel-link {
  display: block; padding: 11px; border-radius: 10px;
  border: 1px solid var(--gold-2); color: var(--gold-1); text-decoration: none; font-size: 13px; font-weight: 700;
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 560px;
  margin: 0 auto;
  height: var(--nav-h);
  background: rgba(10, 10, 13, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--card-border);
  display: flex;
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
  transition: transform 0.2s ease;
}
.bottom-nav.nav-hidden { transform: translateY(100%); }
.nav-item {
  flex: 1;
  background: none; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--text-2);
  font-family: inherit;
  font-size: 10.5px;
  cursor: pointer;
}
.nav-item.active { color: var(--gold-1); }
.nav-item.active img.icon-nav { filter: drop-shadow(0 0 6px rgba(212,175,55,0.6)); }

/* ---------- Fullscreen chart ---------- */
.chart-fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg-0);
  flex-direction: column;
}
.chart-fullscreen.active { display: flex; }
.chart-topbar {
  flex-shrink: 0;
  padding-top: max(env(safe-area-inset-top), 20px);
  padding-bottom: 10px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--card-border);
}
.chart-topbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 10px;
}
.chart-topbar-title { font-size: 14px; font-weight: 800; color: var(--gold-1); }
.chart-close-btn {
  display: flex; align-items: center; gap: 5px;
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--gold-2);
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-1);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.symbol-scroll {
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
  padding: 0 12px;
}
.symbol-scroll::-webkit-scrollbar { display: none; }
.symbol-chip {
  flex-shrink: 0;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.symbol-chip.active { background: var(--gold-grad); color: #201703; border-color: transparent; font-weight: 700; }

.tv-chart-container { flex: 1; min-height: 0; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--gold-3); border-radius: 4px; }

@media (max-width: 360px) {
  .card-grid { gap: 8px; }
  .feature-title { font-size: 12.5px; }
}
