@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #06090e;
  --bg-secondary: #0d121d;
  --bg-card: rgba(16, 23, 38, 0.75);
  --bg-card-hover: rgba(22, 32, 54, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 240, 255, 0.35);
  --primary-cyan: #00f0ff;
  --primary-emerald: #00e676;
  --primary-rose: #ff1744;
  --primary-amber: #ffab00;
  --primary-purple: #7c4dff;
  --text-main: #f0f4fc;
  --text-muted: #8b9bb4;
  --text-dim: #5a6a82;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.15);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(0, 240, 255, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(124, 77, 255, 0.04) 0%, transparent 45%);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Glassmorphism container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(124, 77, 255, 0.3));
  border: 1px solid var(--border-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-glow);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff 40%, var(--primary-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-chain {
  background: rgba(0, 230, 118, 0.12);
  color: var(--primary-emerald);
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-refresh {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-refresh:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.btn-telegram {
  background: linear-gradient(135deg, #0088cc, #00aced);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.btn-telegram:hover {
  opacity: 0.9;
}

/* Top KPI Metrics Bar */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 6px;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--primary-cyan);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-cyan);
  box-shadow: 0 0 10px var(--primary-cyan);
}

/* Trade Setup Cards */
.setups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.trade-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: all 0.25s ease;
}

.trade-card:hover {
  border-color: var(--primary-cyan);
  box-shadow: var(--shadow-glow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.token-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.conviction-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.conviction-A-plus {
  background: rgba(0, 230, 118, 0.15);
  color: var(--primary-emerald);
  border: 1px solid var(--primary-emerald);
}

.conviction-A {
  background: rgba(0, 240, 255, 0.15);
  color: var(--primary-cyan);
  border: 1px solid var(--primary-cyan);
}

.card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.current-price-label {
  font-size: 12px;
  color: var(--text-muted);
}

.current-price-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-cyan);
}

/* Levels Row */
.levels-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.level-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.level-item.buy-zone {
  border-left: 3px solid var(--primary-emerald);
}

.level-item.stop-loss {
  border-left: 3px solid var(--primary-rose);
}

.level-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.level-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* Take Profit Steps */
.tp-ladder {
  background: rgba(0, 240, 255, 0.02);
  border: 1px dashed rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 16px;
}

.tp-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-cyan);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tp-step {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
  font-family: var(--font-mono);
}

.tp-step span:first-child {
  color: var(--text-muted);
}

.tp-step span:last-child {
  color: var(--primary-emerald);
  font-weight: 600;
}

/* Trajectory note */
.card-outlook {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
  background: rgba(255, 171, 0, 0.05);
  border-left: 2px solid var(--primary-amber);
  padding: 8px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Action Links */
.card-actions {
  display: flex;
  gap: 10px;
}

.action-link {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.action-link.dex {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.action-link.dex:hover {
  background: rgba(255, 255, 255, 0.1);
}

.action-link.gmgn {
  background: rgba(0, 240, 255, 0.1);
  color: var(--primary-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.action-link.gmgn:hover {
  background: rgba(0, 240, 255, 0.2);
}

/* Scanner Table */
.table-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: 32px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

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

.positive {
  color: var(--primary-emerald);
}

.negative {
  color: var(--primary-rose);
}

/* Memory & Rules Section */
.memory-box {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text-muted);
}

.rule-num {
  background: rgba(0, 240, 255, 0.1);
  color: var(--primary-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Footer */
footer {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 12px;
}

@media (max-width: 768px) {
  .setups-grid {
    grid-template-columns: 1fr;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
  }
}
