:root {
  --bg: #0e1d24;
  --panel: #122733;
  --text: #e6f1f5;
  --muted: #9fb5c1;
  --brand: #38a1db;
  --brand-2: #00c2ff;
  --card: #0f2531;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f9fafb;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --brand: #0073e6;
    --brand-2: #00aaff;
    --card: #f3f4f6;
    --border: rgba(0, 0, 0, 0.08);
  }
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background: linear-gradient(180deg, var(--bg) 0%, #0b1a21 100%);
  color: var(--text);
}

a {
  color: var(--brand)
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(8px);
  background: rgba(15, 30, 38, 0.7);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.logo img {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

.logo span {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.3px;
}

.menu-btn {
  display: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  margin-right: 8px;
}

.nav>nav {
  flex: 0 0 auto;
}

.nav-links {
  flex: 0 0 auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 14px;
  padding: 0;
  margin: 0
}

nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px
}

nav a:hover,
nav a.active {
  background: rgba(255, 255, 255, 0.06)
}

.search {
  margin-left: auto;
  /* push search to far right */
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  max-width: 320px;
  /* keeps it tidy on wide screens */
  flex: 1 1 auto;
}

.search input {
  flex: 1 1 auto;
  min-width: 160px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 999px 0 0 999px;
  /* pill left */
  padding: 10px 14px;
  outline: none;
}

.search button {
  border: 0;
  border-radius: 0 999px 999px 0;
  /* pill right */
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: saturate(1.2) blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  z-index: 2147483645;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: min(84vw, 320px);
  background: var(--panel);
  border-right: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .4);
  transform: translateX(-100%);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  z-index: 2147483647;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}

#click-shield {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: none;
  pointer-events: auto;
  background: transparent;
}

.drawer.open {
  transform: none;
}

.drawer-open #click-shield {
  display: block;
}

.drawer-open iframe[src*="tradingview.com"],
.drawer-open .tradingview-widget-container,
.drawer-open .tradingview-widget-container * {
  pointer-events: none !important;
}

.drawer-open {
  overflow: hidden;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer[aria-hidden="true"] {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .drawer {
    transition: none;
  }

  .drawer-backdrop {
    transition: none;
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.drawer-title img {
  width: 22px;
  height: 22px;
}

.drawer-close {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 12px 6px;
  gap: 6px;
}

.drawer-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  position: relative;
}

.drawer-nav a:hover {
  background: rgba(255, 255, 255, .06);
}

.drawer-search {
  display: flex;
  gap: 0;
  padding: 12px 12px 6px;
}

.drawer-search input {
  flex: 1 1 auto;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 999px 0 0 999px;
  padding: 10px 12px;
}

.drawer-search button {
  border: 0;
  border-radius: 0 999px 999px 0;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.drawer-footer {
  margin-top: auto;
  padding: 12px 16px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 980px) {
  .nav {
    flex-wrap: wrap;
  }

  .menu-btn {
    display: block;
    order: 1;
  }

  .logo {
    order: 2;
    margin-right: 0;
  }

  .search {
    order: 3;
    width: 100%;
    max-width: none;
    margin-left: 0;
    justify-content: stretch;
  }

  .search input {
    width: 100%;
  }

  .search button {
    padding: 12px 18px;
  }

  .nav-links {
    order: 4;
    width: 100%;
    display: none;
  }

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 56px
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, 1fr);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}

.card h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 8px 10px 12px;
  color: #bfe9ff
}

.col-12 {
  grid-column: span 12
}

.col-8 {
  grid-column: span 8
}

.col-6 {
  grid-column: span 6
}

.col-4 {
  grid-column: span 4
}

.col-3 {
  grid-column: span 3
}

@media (max-width:960px) {

  .col-8,
  .col-6,
  .col-4,
  .col-3 {
    grid-column: span 12
  }
}

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  padding: 18px 0;
  text-align: center;
  background: #0c202a;
}

.badge {
  font-size: 12px;
  color: var(--muted)
}

.tv-wrap {
  min-height: 380px;
}

.tv-tape {
  min-height: auto !important;
  margin-bottom: 18px;
}

.hero {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 14px;
}

.hero h1 {
  margin: 0;
  font-size: 26px
}

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

.note {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 10px
}

.small {
  font-size: 12px
}

.widget-desc {
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0 16px;
  color: var(--muted);
}