:root {
  color-scheme: dark;
  --bg: #0a0f1a;
  --panel: #111827;
  --panel-2: #172132;
  --text: #edf3ff;
  --muted: #9dafcf;
  --accent: #67e8f9;
  --line: rgba(157, 175, 207, 0.16);
  --danger: #ff7b7b;
}

* {
  box-sizing: border-box;
}

html[dir="rtl"] body,
body.rtl {
  direction: rtl;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.35;
  background: linear-gradient(180deg, #08111f 0%, #0d1526 100%);
  color: var(--text);
  padding-bottom: env(safe-area-inset-bottom, 0);
  overflow-x: hidden;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 15, 26, 0.94);
  backdrop-filter: blur(10px);
}

.topbar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex: 1;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  padding: 0.62rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(103, 232, 249, 0.1);
  background: rgba(23, 33, 50, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(103, 232, 249, 0.08);
  border-color: rgba(103, 232, 249, 0.18);
}

.nav-link.active {
  color: #07111d;
  background: var(--accent);
  border-color: rgba(103, 232, 249, 0.32);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-preview-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(23, 33, 50, 0.72);
  color: var(--muted);
  font-weight: 700;
}

.admin-preview-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-preview-label {
  white-space: nowrap;
}

.admin-preview-slider {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(157, 175, 207, 0.28);
  transition: background 0.2s ease;
}

.admin-preview-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #edf3ff;
  transition: transform 0.2s ease;
}

.admin-preview-toggle input:checked + .admin-preview-slider {
  background: rgba(103, 232, 249, 0.5);
}

.admin-preview-toggle input:checked + .admin-preview-slider::after {
  transform: translateX(16px);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(103, 232, 249, 0.18);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.brand-version {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.9;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.subtitle {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.lang-toggle,
.topbar-auth-link,
.primary-cta,
.secondary-cta,
.corner-login {
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.62rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.lang-toggle {
  background: var(--panel-2);
  cursor: pointer;
}

.topbar-auth-link,
.secondary-cta,
.corner-login {
  background: rgba(23, 33, 50, 0.86);
}

.primary-cta,
.search button,
.compact-kv button,
.service-test-btn {
  background: var(--accent);
  color: #07111d;
  border-color: rgba(103, 232, 249, 0.28);
  font-weight: 800;
}

.search-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.search {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.search-autocomplete {
  position: relative;
}

.search input,
.search button,
.auth-form input,
.auth-form button,
.compact-kv input,
.compact-kv select,
.compact-kv button,
.service-test-btn {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0.62rem 0.8rem;
  font-size: 0.86rem;
}

.search input {
  min-width: 210px;
}

.search-autocomplete .watchlist-suggestions {
  top: calc(100% + 0.3rem);
}

.search button,
.auth-form button,
.compact-kv button,
.service-test-btn,
.lang-toggle {
  cursor: pointer;
}

.search-error-inline {
  margin: 0;
  font-size: 0.74rem;
  text-align: right;
}

.compact-kv input,
.compact-kv select {
  width: 100%;
}

.auto-fetch-note {
  border: 1px dashed rgba(103, 232, 249, 0.22);
  background: rgba(18, 31, 48, 0.72);
}

.page {
  padding: 1rem 1.2rem 1.3rem;
}

.site-footer {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0.4rem 1.2rem 6rem;
  color: var(--muted);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.site-footer-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
}

.site-footer-links a:hover {
  color: var(--text);
}

.site-footer-copy {
  margin: 0;
  font-size: 0.78rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.home-hero-grid > * {
  flex: 1 1 0;
}

.user-meta-grid {
  min-width: 220px;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
}

.user-meta-card {
  min-height: 74px;
}

.user-meta-grid strong {
  font-size: 1.05rem;
  line-height: 1.42;
}

.user-days-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 208, 90, 0.26);
  background:
    radial-gradient(circle at top left, rgba(255, 208, 90, 0.18), transparent 48%),
    linear-gradient(135deg, rgba(54, 69, 96, 0.98), rgba(32, 42, 63, 0.98));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  align-items: center !important;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.user-days-card::after {
  content: '';
  position: absolute;
  inset: auto -18% -35% auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 208, 90, 0.2), transparent 68%);
  pointer-events: none;
}

.user-days-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 220, 120, 0.42);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.24);
  background:
    radial-gradient(circle at top left, rgba(255, 223, 128, 0.24), transparent 48%),
    linear-gradient(135deg, rgba(62, 79, 109, 0.99), rgba(34, 46, 70, 0.99));
}

.user-days-card .field-label {
  color: rgba(255, 236, 176, 0.88);
  margin-inline: auto;
}

.user-days-card strong {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 0.015em;
  color: #fff2c4;
  text-shadow: 0 0 18px rgba(255, 211, 107, 0.18);
}

.user-days-card strong::after {
  content: '';
  display: block;
  width: 54px;
  height: 3px;
  margin: 0.42rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 208, 90, 0.18), rgba(255, 225, 145, 0.92), rgba(255, 208, 90, 0.18));
}

.user-live-card strong {
  font-size: 0.92rem;
}

.compact-hero h1,
.section-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.coin-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.coin-watch-btn {
  border-radius: 10px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  background: rgba(103, 232, 249, 0.12);
  color: var(--accent);
  padding: 0.42rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.compact-hero p,
.section-head span,
.section-subnote,
.hero-subnote {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

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

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

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

.dense-grid,
.tight-grid {
  align-items: start;
}

.meta-grid,
.kv-grid {
  display: grid;
  gap: 0.5rem;
}

.meta-grid {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

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

.meta-grid div,
.kv-grid div,
.stat-card,
.meta-link-card {
  background: var(--panel-2);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.meta-grid span,
.kv-grid span,
.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 0.24rem;
}

.field-label {
  display: block;
  width: fit-content;
}

.field-label.has-help-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.meta-grid strong,
.kv-grid strong,
.stat-card strong,
.meta-link-card strong {
  display: block;
  width: 100%;
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.35;
}

.meta-link-card {
  text-decoration: none;
  border: 1px solid rgba(38, 186, 255, 0.18);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.meta-link-card:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 186, 255, 0.38);
  background: rgba(34, 51, 78, 0.95);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.telegram-card {
  justify-content: center;
}

.meta-link-card strong {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.telegram-link-row {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: auto;
}

.telegram-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: 0 0 14px;
  border-radius: 999px;
  background-image: url('/static/telegram-icon.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.compact-stat {
  padding: 0.55rem 0.65rem;
}

.full {
  grid-column: 1 / -1;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
  margin-bottom: 0.55rem;
}

.label-text {
  display: inline;
}

.help-icon {
  margin: 0 0 0 0.1rem;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 999px;
  border: 1.5px solid #67e8f9;
  background: transparent;
  color: #67e8f9;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 0;
  line-height: 1;
  box-shadow: none;
  flex: 0 0 auto;
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.help-icon:hover {
  background: rgba(103, 232, 249, 0.12);
  border-color: #9ff4ff;
  color: #9ff4ff;
  transform: translateY(-1px);
}

.help-icon span {
  display: block;
  transform: translateY(-0.3px);
}

.table-wrap {
  overflow: auto;
}

.compact-table-wrap {
  max-height: 430px;
}

.dense-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  white-space: nowrap;
}

th,
td {
  text-align: left;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

html[dir="rtl"] th,
html[dir="rtl"] td,
body.rtl th,
body.rtl td {
  text-align: right;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255,255,255,0.015);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.state-long,
.text-long {
  color: #7ff7b0;
}

.state-short,
.text-short {
  color: #ff9f9f;
}

.state-neutral,
.text-neutral {
  color: #ffd27a;
}

.table-subvalue {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.pump-dump-signal {
  position: relative;
  isolation: isolate;
  min-width: 5.2rem;
  justify-content: center;
  border-width: 1px;
  text-transform: uppercase;
}

.pump-dump-signal::after {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.pump-dump-signal.signal-pump {
  color: #b7ffd1;
  background: linear-gradient(180deg, rgba(24, 211, 108, 0.22), rgba(24, 211, 108, 0.08));
  border-color: rgba(74, 255, 144, 0.42);
}

.pump-dump-signal.signal-dump {
  color: #ffc1c1;
  background: linear-gradient(180deg, rgba(255, 86, 86, 0.22), rgba(255, 86, 86, 0.08));
  border-color: rgba(255, 122, 122, 0.46);
}

.pump-dump-signal.signal-pump::after {
  background: radial-gradient(circle, rgba(74, 255, 144, 0.45), transparent 68%);
}

.pump-dump-signal.signal-dump::after {
  background: radial-gradient(circle, rgba(255, 104, 104, 0.50), transparent 68%);
}

.pump-dump-signal.signal-strong {
  animation: pump-dump-strong-flash 1.1s ease-in-out infinite;
  font-weight: 900;
}

.pump-dump-signal.signal-strong::after {
  animation: pump-dump-strong-halo 1.1s ease-in-out infinite;
}

.pump-dump-signal.signal-mini {
  animation: pump-dump-mini-flash 1.8s ease-in-out infinite;
}

.pump-dump-signal.signal-mini::after {
  animation: pump-dump-mini-halo 1.8s ease-in-out infinite;
}

@keyframes pump-dump-strong-flash {
  0%, 100% { transform: translateZ(0) scale(1); filter: brightness(1); }
  50% { transform: translateZ(0) scale(1.04); filter: brightness(1.38); }
}

@keyframes pump-dump-strong-halo {
  0%, 100% { opacity: 0.18; }
  50% { opacity: 0.88; }
}

@keyframes pump-dump-mini-flash {
  0%, 100% { transform: translateZ(0) scale(1); filter: brightness(1); }
  50% { transform: translateZ(0) scale(1.018); filter: brightness(1.18); }
}

@keyframes pump-dump-mini-halo {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.42; }
}

@media (prefers-reduced-motion: reduce) {
  .pump-dump-signal,
  .pump-dump-signal::after {
    animation: none;
  }
}

.deriv-context-box {
  border: 1px solid rgba(255, 210, 122, 0.28);
  background: linear-gradient(180deg, rgba(255, 210, 122, 0.10), rgba(255, 210, 122, 0.05));
}

.context-note-text {
  color: #ffd27a;
  font-weight: 700;
}
.momentum-card {
  border: 1px solid rgba(103, 232, 249, 0.10);
  background: linear-gradient(180deg, rgba(23, 33, 50, 0.88), rgba(20, 29, 45, 0.82));
}

.momentum-card .field-label {
  color: #8fb4da;
}

.momentum-card strong {
  font-size: 0.83rem;
  opacity: 0.94;
}

.technical-structure-card {
  border: 1px solid rgba(255, 210, 122, 0.24);
  background: linear-gradient(180deg, rgba(255, 210, 122, 0.10), rgba(255, 210, 122, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.technical-structure-card .field-label,
.technical-structure-note .field-label {
  color: #ffd27a;
}

.technical-structure-card strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.technical-structure-note {
  border: 1px dashed rgba(255, 210, 122, 0.28);
  background: linear-gradient(180deg, rgba(255, 210, 122, 0.08), rgba(255, 210, 122, 0.03));
}

.technical-structure-note strong {
  color: #ffe39f;
}


.venue-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.venue-badge {
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.home-visual-section {
  position: relative;
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  padding-top: 0.2rem;
}

.home-section-titlebar {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(103, 232, 249, 0.12), rgba(255, 210, 122, 0.06)),
    rgba(17, 24, 39, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 10px 24px rgba(0,0,0,0.16);
  overflow: hidden;
  text-align: center;
}

.home-section-titlebar::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.62);
}

.section-watchlist .home-section-titlebar::before {
  background: #67e8f9;
}

.section-compatible .home-section-titlebar::before {
  background: #a7f3d0;
}

.section-strong-moves .home-section-titlebar::before {
  background: #ffd27a;
}

.section-timeframes .home-section-titlebar::before {
  background: #c4b5fd;
}

.home-section-titlebar h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.home-section-titlebar p {
  margin: 0.22rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.plain-list {
  margin: 0;
  padding-left: 1rem;
}

html[dir="rtl"] .plain-list,
body.rtl .plain-list {
  padding-left: 0;
  padding-right: 1rem;
}

.watchlist-actions,
.watchlist-input-group,
.auth-links,
.member-search-form,
.member-admin-form {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.watchlist-actions {
  justify-content: space-between;
  margin-top: 0.8rem;
}

.watchlist-input-group input {
  min-width: 180px;
}

.watchlist-autocomplete {
  position: relative;
  min-width: 180px;
  flex: 1 1 220px;
}

.watchlist-autocomplete input {
  width: 100%;
}

.watchlist-suggestions {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
}

.watchlist-suggestion {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(157, 175, 207, 0.1);
  background: transparent;
  color: var(--text);
  padding: 0.72rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.watchlist-suggestion:last-child {
  border-bottom: 0;
}

.watchlist-suggestion:hover,
.watchlist-suggestion:focus {
  background: rgba(103, 232, 249, 0.1);
  outline: none;
}

.watchlist-suggestion-empty {
  color: var(--muted);
  cursor: default;
}

html[dir="rtl"] .watchlist-suggestion,
body.rtl .watchlist-suggestion {
  text-align: right;
}

.watchlist-note {
  color: var(--muted);
}

#live-connection-status,
#live-age {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.settings-shell {
  display: grid;
  gap: 1rem;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.settings-tab-btn {
  border: 1px solid rgba(103, 232, 249, 0.14);
  background: rgba(17, 24, 39, 0.76);
  color: var(--muted);
  padding: 0.72rem 1rem;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.18s ease;
}

.settings-tab-btn:hover {
  color: var(--text);
  border-color: rgba(103, 232, 249, 0.28);
  background: rgba(103, 232, 249, 0.08);
}

.settings-tab-btn.active {
  color: #07111d;
  background: var(--accent);
  border-color: rgba(103, 232, 249, 0.3);
}

.settings-panels {
  display: grid;
  gap: 1rem;
}

.settings-panel[hidden] {
  display: none !important;
}

.settings-stack-gap {
  margin-top: 16px;
}

.member-search-form {
  margin-bottom: 0.8rem;
}

.member-search-form input,
.member-search-form button,
.member-admin-form select,
.member-admin-form button {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
}

.member-search-form button,
.member-admin-form button {
  background: var(--accent);
  color: #07111d;
  font-weight: 800;
}

.table-remove-btn,
.mini-watch-btn {
  border: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(103, 232, 249, 0.08);
  color: var(--accent);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  padding: 0.15rem 0.42rem;
}

.service-detail-cell {
  max-width: 420px;
  white-space: normal;
}

.service-detail-meta {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.exchange-error,
.auth-error {
  color: #ffd3d3;
  background: rgba(255, 123, 123, 0.12);
  border: 1px solid rgba(255, 123, 123, 0.24);
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
}

.landing-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.16), transparent 28%),
    radial-gradient(circle at left center, rgba(65, 105, 225, 0.14), transparent 25%),
    linear-gradient(180deg, #07111d 0%, #0d1526 100%);
}

.landing-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 1.5rem 0;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(17, 24, 39, 0.72);
  font-weight: 800;
}

.landing-brand .brand-line {
  gap: 0.45rem;
}

.landing-brand .brand-version {
  font-size: 0.66rem;
}

.landing-logo {
  width: 34px;
  height: 34px;
}

.corner-login {
  position: absolute;
  top: 1.1rem;
}

.corner-login-left {
  left: 1.5rem;
}

.corner-login-right {
  right: 1.5rem;
}

.landing-lang-toggle {
  position: absolute;
  top: 1.1rem;
  right: 10.2rem;
}

.landing-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.2rem 1.5rem 2rem;
}

.landing-footer {
  max-width: 1180px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 1.1rem;
  align-items: stretch;
  margin-bottom: 1.2rem;
}

.landing-copy,
.landing-panel,
.landing-card,
.auth-card {
  background: rgba(17, 24, 39, 0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.landing-copy {
  padding: 1.45rem;
  animation: landing-fade-up 0.6s ease both;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.1);
  border: 1px solid rgba(103, 232, 249, 0.18);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.landing-copy h1 {
  margin: 0.95rem 0 0.7rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
}

.landing-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 680px;
}

.landing-trial-highlight {
  display: inline-block;
  padding: 0.16rem 0.52rem;
  margin-inline: 0.18rem;
  border-radius: 999px;
  color: #07111d;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a 0%, #67e8f9 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 10px 24px rgba(103, 232, 249, 0.18);
  animation: landing-trial-glow 2.8s ease-in-out infinite;
}

.landing-cta-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.landing-primary-cta {
  padding-inline: 1.2rem;
  box-shadow: 0 12px 30px rgba(103, 232, 249, 0.18);
}

.landing-trust-note {
  margin: 0.9rem 0 0;
  color: #dce9ff;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0.94;
}

.landing-panel {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  animation: landing-fade-up 0.75s ease both;
  animation-delay: 0.08s;
}

.landing-stat {
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.landing-link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  text-decoration: none;
}

.telegram-mini-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(103, 232, 249, 0.14);
  color: #67e8f9;
  flex: 0 0 auto;
}

.telegram-mini-icon svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.landing-stat-trial {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(253, 230, 138, 0.2), rgba(103, 232, 249, 0.14)),
    rgba(255,255,255,0.05);
  border-color: rgba(253, 230, 138, 0.28);
  box-shadow: 0 0 0 1px rgba(253, 230, 138, 0.08), 0 16px 34px rgba(103, 232, 249, 0.12);
  animation: landing-trial-card-pulse 3.2s ease-in-out infinite;
}

.landing-stat-trial::before {
  content: "";
  position: absolute;
  inset: -120% auto auto -30%;
  width: 60%;
  height: 280%;
  transform: rotate(24deg);
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.08) 48%, transparent 100%);
  animation: landing-trial-shimmer 4.6s linear infinite;
}

.landing-stat-trial strong,
.landing-stat-trial a {
  position: relative;
  z-index: 1;
}

.landing-stat-trial a {
  text-decoration: none;
}

.landing-stat-trial a:hover {
  color: #fff7cf;
}

.landing-stat span {
  display: block;
  color: var(--muted);
  margin-bottom: 0.22rem;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.landing-card {
  padding: 1.05rem;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  animation: landing-fade-up 0.72s ease both;
}

.landing-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.landing-card p {
  margin: 0;
  color: var(--muted);
}

.landing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.16);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.26);
}

.landing-grid .landing-card:nth-child(1) {
  animation-delay: 0.1s;
}

.landing-grid .landing-card:nth-child(2) {
  animation-delay: 0.16s;
}

.landing-grid .landing-card:nth-child(3) {
  animation-delay: 0.22s;
}

.landing-convert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.05rem;
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  background:
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.12), transparent 32%),
    rgba(17, 24, 39, 0.84);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
  animation: landing-fade-up 0.84s ease both;
  animation-delay: 0.28s;
}

.landing-convert-kicker {
  display: inline-flex;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(103, 232, 249, 0.08);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
}

.landing-convert-copy h2 {
  margin: 0.85rem 0 0.45rem;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  line-height: 1.08;
}

.landing-convert-copy p,
.landing-convert-note {
  margin: 0;
  color: var(--muted);
}

.landing-convert-points {
  display: grid;
  gap: 0.7rem;
  align-content: center;
}

.landing-convert-point {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.04);
  color: #e7f1ff;
  font-weight: 700;
}

.landing-convert-cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.2rem;
}

.landing-convert-note {
  font-size: 0.9rem;
}

@keyframes landing-trial-glow {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 10px 24px rgba(103, 232, 249, 0.18);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.24), 0 14px 28px rgba(253, 230, 138, 0.24);
  }
}

@keyframes landing-trial-card-pulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 0 1px rgba(253, 230, 138, 0.08), 0 16px 34px rgba(103, 232, 249, 0.12);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(253, 230, 138, 0.18), 0 22px 42px rgba(253, 230, 138, 0.18);
  }
}

@keyframes landing-trial-shimmer {
  0% {
    transform: translateX(-180%) rotate(24deg);
  }
  100% {
    transform: translateX(360%) rotate(24deg);
  }
}

@keyframes landing-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-shell {
  min-height: calc(100vh - 110px);
  display: grid;
  place-items: center;
}

.auth-shell-register {
  width: min(1120px, 100%);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  align-items: stretch;
  place-items: stretch;
}

.auth-spotlight,
.auth-card {
  width: 100%;
  padding: 1.2rem;
}

.auth-spotlight {
  display: grid;
  gap: 1rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(12, 19, 34, 0.9));
  border: 1px solid rgba(103, 232, 249, 0.12);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.24);
  animation: landing-fade-up 0.66s ease both;
}

.auth-card-register {
  max-width: 560px;
  justify-self: end;
  animation: landing-fade-up 0.78s ease both;
}

.auth-spotlight-copy h1 {
  margin: 0.9rem 0 0.5rem;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.04;
}

.auth-spotlight-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.auth-spotlight-points {
  display: grid;
  gap: 0.72rem;
}

.auth-spotlight-point {
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  color: #e7f1ff;
  font-weight: 700;
}

.auth-spotlight-note {
  display: grid;
  gap: 0.38rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(253, 230, 138, 0.16);
  background:
    linear-gradient(135deg, rgba(253, 230, 138, 0.14), rgba(103, 232, 249, 0.1)),
    rgba(255,255,255,0.03);
}

.auth-spotlight-note strong {
  color: #fff3bf;
  font-size: 0.95rem;
}

.auth-spotlight-note p {
  margin: 0;
  color: #d7e6ff;
  line-height: 1.65;
}

.auth-head h1 {
  margin: 0.8rem 0 0.35rem;
}

.auth-head p {
  margin: 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.auth-form input {
  min-height: 46px;
}

.auth-card-register .primary-cta {
  width: 100%;
  min-height: 48px;
  box-shadow: 0 14px 34px rgba(103, 232, 249, 0.16);
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

.auth-legal-note {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.08);
}

.auth-legal-note strong {
  font-size: 0.92rem;
}

.auth-legal-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.9rem;
}

.auth-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 0.7rem;
  row-gap: 0.25rem;
  font-weight: 600;
}

.auth-check input {
  margin-top: 0.2rem;
}

.auth-check span:last-child {
  grid-column: 2;
  font-weight: 500;
  font-size: 0.9rem;
}

.telegram-login-card {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(103, 232, 249, 0.14);
  background: rgba(23, 33, 50, 0.62);
}

.telegram-login-card h2 {
  margin: 0;
  font-size: 0.96rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-links {
  margin-top: 1rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .topbar,
  .landing-hero,
  .landing-convert,
  .auth-shell-register,
  .landing-grid,
  .two-col,
  .three-col,
  .four-col {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions,
  .topbar-nav {
    justify-content: flex-start;
  }

  .auth-card-register {
    max-width: none;
    justify-self: stretch;
  }
}

.mobile-tabbar {
  display: none;
}

.mobile-tab {
  text-decoration: none;
}

@media (max-width: 720px) {
  .page,
  .landing-shell {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .page,
  .landing-shell {
    padding-bottom: calc(6.2rem + env(safe-area-inset-bottom, 0px));
  }

  .landing-convert-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-topbar {
    padding-top: 1rem;
  }

  .corner-login-left {
    left: 0.9rem;
  }

  .corner-login-right {
    right: 0.9rem;
  }

  .landing-lang-toggle {
    right: 8.8rem;
  }

  .search input {
    min-width: 0;
    width: 100%;
  }

  .search {
    width: 100%;
  }

  .topbar {
    padding-bottom: 0.9rem;
  }

  .topbar-nav {
    display: none;
  }

  .topbar-actions {
    width: 100%;
  }

  .hero,
  .landing-hero,
  .section-head,
  .watchlist-actions,
  .watchlist-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .home-hero-grid > * {
    min-width: 0;
  }

  .meta-grid,
  .kv-grid,
  .landing-grid {
    grid-template-columns: 1fr;
  }

  .user-meta-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .dense-card,
  .watchlist-card,
  .grid > *,
  .table-wrap,
  .compact-table-wrap {
    min-width: 0;
    max-width: 100%;
  }

  .table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    direction: rtl;
    padding-bottom: 0.2rem;
  }

  .table-wrap > * {
    direction: inherit;
  }

  .compact-table-wrap {
    max-height: none;
  }

  .dense-table {
    min-width: max-content;
    width: max-content;
    white-space: nowrap;
    font-size: 0.68rem;
    table-layout: auto;
  }

  #watchlist-table,
  #compatible-symbols-table,
  #minute-movers-table,
  #hour-movers-table,
  #four-hour-movers-table,
  #top-volatility-24h-table,
  .exchange-table,
  #exchange-flow-table {
    width: max-content;
    min-width: max-content;
  }

  #watchlist-table {
    min-width: 100%;
  }

  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(64px, 1fr);
    gap: 0.38rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: rgba(8, 17, 31, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 50;
    align-items: stretch;
  }

  .mobile-tabbar::-webkit-scrollbar {
    display: none;
  }

  .mobile-tab {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    padding: 0.3rem 0.42rem;
    border-radius: 11px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  }

  .mobile-tab.active {
    background: rgba(103, 232, 249, 0.14);
    color: var(--text);
    border-color: rgba(103, 232, 249, 0.24);
  }

  .mobile-tab-icon {
    font-size: 0.74rem;
    line-height: 1;
    flex: 0 0 auto;
    opacity: 0.92;
  }

  th,
  td {
    padding: 0.38rem 0.34rem;
  }

  #compatible-symbols-table th,
  #compatible-symbols-table td,
  #minute-movers-table th,
  #minute-movers-table td,
  #hour-movers-table th,
  #hour-movers-table td,
  #four-hour-movers-table th,
  #four-hour-movers-table td,
  #top-volatility-24h-table th,
  #top-volatility-24h-table td,
  .exchange-table th,
  .exchange-table td,
  #exchange-flow-table th,
  #exchange-flow-table td {
    white-space: nowrap;
  }

  .pill,
  .venue-badge,
  .table-remove-btn,
  .mini-watch-btn {
    font-size: 0.64rem;
  }

  .coin-title-row,
  .section-head {
    gap: 0.45rem;
  }
}
