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

:root {
  --bg: #12151b;
  --surface: #1b1f27;
  --surface-raised: #232833;
  --border: #2e3440;
  --text: #eae8e0;
  --text-secondary: #b8bcc4;
  --text-muted: #8b8f98;
  --lime: #c4f542;
  --lime-dim: #6d7d2a;
  --amber: #ffb238;
  --red: #ff6b5e;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}

.app { max-width: 640px; margin: 0 auto; padding: 0 0 4rem; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }

.brand-logo { width: 28px; height: 28px; display: block; }

.shell { display: block; min-height: 100vh; max-width: none; }

.sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.75rem;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 10;
}
.sidebar-brand { padding: 0 0.5rem; margin-bottom: 12px; }
.sidebar-brand .brand-logo { width: 32px; height: 32px; }
.sidebar-brand .brand-name { font-size: 20px; }

.profile-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0.5rem;
  margin: 0 0 1.25rem;
  cursor: pointer;
  border-radius: 10px;
}
.profile-strip:hover { background: var(--surface-raised); }

.subtab-panel { display: none; }
.subtab-panel.active { display: block; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--lime-dim);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: #12151b;
}
.profile-strip-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.profile-strip-name { font-size: 16px; font-weight: 700; color: var(--lime); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-strip-stats { display: flex; align-items: center; gap: 10px; }
.profile-strip-stat { display: flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text); }
.stat-icon { width: 15px; height: 15px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.stat-icon.balance { background: var(--lime); color: #12151b; }
.stat-icon.picks { background: var(--amber); color: #12151b; }

.nav-groups { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-group-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 10px 6px;
  cursor: pointer;
}
.nav-group-head .chevron { transition: transform 0.15s; font-size: 10px; }
.nav-group.collapsed .chevron { transform: rotate(-90deg); }
.nav-group.collapsed .nav-group-items { display: none; }
.nav-group-items { display: flex; flex-direction: column; gap: 1px; }
.nav-item {
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.nav-item:hover { background: var(--surface-raised); }
.nav-item.active { background: rgba(196,245,66,0.12); color: var(--lime); font-weight: 500; }

.sidebar-foot { padding-top: 1rem; border-top: 1px solid var(--border); }
.refill-timer {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
  padding: 6px 0.75rem; margin: -4px 0 12px;
}

.content { margin-left: 240px; width: calc(100% - 240px); display: flex; justify-content: flex-start; padding: 2rem 2.5rem; }
.tab-panel { width: 100%; max-width: 640px; }

.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.stat-card .stat-value { font-family: var(--font-mono); font-size: 20px; font-weight: 700; }

.profile-editor { display: flex; align-items: center; gap: 16px; margin-bottom: 1.5rem; }
.profile-avatar-large {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--lime-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: #12151b;
  overflow: hidden; flex-shrink: 0;
}
.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.field-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.bio-textarea {
  width: 100%; min-height: 70px; resize: vertical;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 10px 12px; font-family: var(--font-body); font-size: 13px;
}

.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.faq-item summary { cursor: pointer; font-size: 14px; font-weight: 500; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: '+ '; color: var(--lime); font-weight: 700; }
.faq-item[open] summary::before { content: '– '; }
.faq-item p { font-size: 13px; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }

.legal-text h3 { font-size: 14px; margin: 18px 0 6px; color: var(--lime); }
.legal-text p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 6px; }

.updates-list { display: flex; flex-direction: column; gap: 14px; }
.update-entry { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.update-date { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.update-title { font-size: 14px; font-weight: 600; margin: 4px 0 6px; }
.update-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shop-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; position: relative; }
.shop-card-vip { border-color: var(--lime); }
.vip-ribbon { position: absolute; top: 14px; right: 14px; background: var(--lime); color: #12151b; font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.shop-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.shop-price { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--lime); margin-bottom: 14px; }
.shop-price span { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.shop-perks { list-style: none; margin-bottom: 16px; }
.shop-perks li { font-size: 13px; color: var(--text-secondary); padding: 5px 0 5px 18px; position: relative; }
.shop-perks li::before { content: '✓'; position: absolute; left: 0; color: var(--lime); font-weight: 700; }

.vip-badge { color: var(--amber); margin-right: 3px; }

.site-footer {
  margin-left: 240px;
  background: #0c0e12;
  border-top: 1px solid var(--border);
  padding: 20px 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.footer-links, .footer-social { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-link {
  background: none; border: none; font-size: 11px; color: var(--text-muted);
  cursor: pointer; padding: 0; text-decoration: none; font-family: var(--font-body);
}
.footer-link:hover { color: var(--text-secondary); }
.footer-copy { font-size: 10px; color: var(--text-muted); opacity: 0.7; margin-top: 4px; }

@media (max-width: 720px) {
  .site-footer { margin-left: 0; padding: 16px 1.25rem; }
  .shop-grid { grid-template-columns: 1fr; }
}

.refer-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; max-width: 380px; }
.refer-code-row { display: flex; gap: 8px; align-items: center; }
.refer-code { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--lime); background: var(--surface-raised); border-radius: 8px; padding: 8px 14px; flex: 1; }

.refer-instructions { font-size: 14px; margin-bottom: 8px; }
.refer-code-label { display: inline-block; font-family: var(--font-mono); font-size: 10px; font-weight: 700; background: var(--lime); color: #12151b; padding: 3px 9px; border-radius: 6px; margin-top: 10px; }
.refer-code-big { font-family: var(--font-mono); font-size: 24px; font-weight: 700; margin: 6px 0 14px; }
.refer-btn-row { display: flex; gap: 8px; }
.refer-btn-row .btn { flex: 1; }

.home-hero { text-align: center; padding: 1rem 0 2rem; }
.home-logo { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 10px; }
.home-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 2rem; }
.home-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; cursor: pointer; transition: border-color 0.15s; }
.home-card:hover { border-color: var(--lime); }
.home-card-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.home-card-big { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--lime); }
.home-section-title { font-size: 15px; font-weight: 700; margin: 1.5rem 0 10px; }

.theme-list, .accent-list { display: flex; flex-direction: column; gap: 4px; }
.theme-row, .accent-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; font-family: var(--font-body); font-size: 14px; color: var(--text); cursor: pointer;
}
.theme-row.selected, .accent-row.selected { border-color: var(--lime); }
.theme-check, .accent-check { color: var(--lime); opacity: 0; }
.theme-row.selected .theme-check, .accent-row.selected .accent-check { opacity: 1; }
.accent-swatch { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
.custom-color-box { display: flex; align-items: center; gap: 10px; }
.custom-color-box input[type=color] { width: 44px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: none; padding: 0; }

.clash-row { display: flex; gap: 10px; flex-wrap: wrap; }
.clash-card {
  width: 140px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
}
.clash-card.win { border-color: var(--lime); }
.clash-card.loss { border-color: var(--red); opacity: 0.75; }
.clash-card-round { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.clash-card-rule { font-size: 12px; font-weight: 600; }
.clash-card-power { font-family: var(--font-mono); font-size: 22px; font-weight: 700; margin: 4px 0; }
.clash-card-result { font-size: 12px; font-weight: 700; }

/* ---- mobile off-canvas sidebar drawer ---- */
.mobile-menu-btn { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 720px) {

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    z-index: 120;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .sidebar-overlay.open { opacity: 1; pointer-events: auto; }

  .sidebar {
    width: min(82vw, 280px);
    max-width: 280px;
    height: 100vh;
    position: fixed;
    border-right: 1px solid var(--border);
    border-bottom: none;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    z-index: 200;
    box-shadow: 6px 0 24px rgba(0,0,0,0.45);
  }
  .sidebar.open { transform: translateX(0); }

  .content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
    padding-top: 4rem;
    display: block;
  }
  .site-footer { margin-left: 0; padding: 16px 1.25rem; }

  /* fit dashboard-style grids on narrow screens instead of squeezing 3-across */
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: repeat(2, 1fr); }

  .ach-layout, .sell-layout, .ah-layout { flex-direction: column; }
  .ach-category-list, .sell-card-list, .ah-sidebar {
    width: 100%;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ach-cat-btn, .ah-cat-btn { flex: 1 1 auto; }

  .gate-box { padding: 28px 20px; margin-top: 1.5rem; }
  .auth-box { padding: 22px; }

  .showcase-picker-box { width: 92vw; max-width: 92vw; padding: 18px; }

  .home-title { font-size: 24px; }
  .panel-head h1 { font-size: 20px; }
  .hypecall-hero { padding: 20px; }
  .hypecall-hero-title { font-size: 21px; }

  .beginner-guide { padding: 18px; }
  .guest-steps { gap: 10px; margin: 1rem 0; }
  .guest-step { min-width: 130px; padding: 12px; }

  .admin-table-wrap { overflow-x: auto; }
}

/* ---- On the Clock refresh button ---- */
.mine-refresh-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.mine-refresh-btn .refresh-icon { display: inline-block; transition: transform 0.5s ease; }
.mine-refresh-btn.spinning .refresh-icon { transform: rotate(360deg); }
.mine-refresh-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---- admin cards table ---- */
.admin-table-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { background: var(--surface-raised); color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--surface-raised); }
.admin-table td:first-child, .admin-table th:first-child { width: 32px; }

.calls-remaining {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
}
#calls-left { color: var(--lime); font-weight: 700; }
.calls-label { color: var(--text-muted); }

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--lime); }
.tab-btn:hover { color: var(--text); }

main { padding: 1.25rem; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-head { margin-bottom: 1.25rem; }
.panel-head h1 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.sub { color: var(--text-muted); font-size: 14px; }

.add-custom {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.add-custom input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 13px;
}
#custom-title { flex: 2; min-width: 160px; }
#custom-likes { flex: 1; min-width: 100px; }

.btn {
  border-radius: 8px;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--lime); color: #12151b; border-color: var(--lime); }
.btn-primary:hover { background: #d4ff5e; }
.btn-primary:disabled { background: var(--surface-raised); color: var(--text-muted); border-color: var(--border); cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); }

.card-list { display: flex; flex-direction: column; gap: 10px; }

.vid-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.vid-title { font-size: 14px; font-weight: 500; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid-title-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.vid-title-row .vid-title { margin-bottom: 0; flex: 1; }
.shorts-badge { font-family: var(--font-mono); font-size: 9px; font-weight: 700; background: var(--surface-raised); color: var(--text-muted); padding: 2px 6px; border-radius: 4px; flex-shrink: 0; text-transform: uppercase; }
.vid-btn-row { display: flex; gap: 8px; margin-top: 10px; }
.watch-btn { font-size: 12px; padding: 8px 12px; }
.vid-card { position: relative; }
.vid-remove-btn {
  position: absolute; bottom: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface-raised); border: 1px solid var(--border); color: var(--text-muted);
  font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.vid-remove-btn:hover { color: var(--red); border-color: var(--red); }

.gate-box { max-width: 400px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 40px 30px; margin: 3rem auto 0; }

.guest-hero { background: linear-gradient(160deg, var(--surface), var(--surface-raised)); border: 1px solid var(--border); border-radius: 16px; padding: 36px; text-align: center; margin-bottom: 1.5rem; }
.guest-hero h1 { font-family: var(--font-display); font-size: 30px; margin-bottom: 8px; }
.guest-steps { display: flex; gap: 14px; margin: 1.5rem 0; flex-wrap: wrap; }
.guest-step { flex: 1; min-width: 160px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.guest-step-num { font-family: var(--font-mono); color: var(--lime); font-weight: 700; font-size: 18px; }

.beginner-guide { background: linear-gradient(160deg, var(--surface), var(--surface-raised)); border: 1px solid var(--lime); border-radius: 16px; padding: 24px; margin-bottom: 1.5rem; }
.beginner-guide-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.vid-stats { display: flex; gap: 18px; margin-bottom: 10px; }
.stat-block { display: flex; flex-direction: column; }
.stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-family: var(--font-mono); font-size: 16px; font-weight: 700; }
.stat-value.growth-up { color: var(--lime); }

.tier-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  display: inline-block;
}
.t3 { background: rgba(196,245,66,0.15); color: var(--lime); }
.t2 { background: rgba(255,178,56,0.15); color: var(--amber); }
.t1 { background: rgba(139,143,152,0.15); color: var(--text-muted); }
.t0 { background: rgba(139,143,152,0.1); color: var(--text-muted); }

.add-custom select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13px;
}
.share-hint { font-size: 12px; color: var(--text-muted); margin: -8px 0 1rem; }

.gem-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(196,245,66,0.15);
  color: var(--lime);
  display: inline-block;
  margin-bottom: 8px;
}
.scout-count { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.sim-btn { margin-bottom: 1rem; }

.board-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.board-tab-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  border-radius: 20px; padding: 6px 14px; font-size: 12px; font-family: var(--font-body); cursor: pointer;
}
.board-tab-btn.active { background: var(--lime); color: #12151b; border-color: var(--lime); font-weight: 500; }

.board-list { display: flex; flex-direction: column; gap: 6px; }
.board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.board-rank { font-family: var(--font-mono); color: var(--text-muted); width: 20px; }
.board-name { flex: 1; font-size: 14px; }
.board-pts { font-family: var(--font-mono); font-weight: 700; color: var(--lime); }
.board-row.me { border-color: var(--lime); }

.chat-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1rem; max-height: 400px; overflow-y: auto; }
.chat-msg { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.chat-name-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.chat-badge { font-size: 13px; }
.chat-name { font-size: 13px; font-weight: 600; }
.chat-pts { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.chat-text { font-size: 13px; color: var(--text-secondary); }
.chat-input-row { display: flex; gap: 8px; }
#chat-input { flex: 1; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 10px 12px; font-family: var(--font-body); font-size: 13px; }

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 320px;
}
.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; background: var(--surface-raised); border-radius: 8px; padding: 4px; }
.auth-tab-btn { flex: 1; background: none; border: none; color: var(--text-muted); font-family: var(--font-body); font-size: 13px; padding: 8px 0; border-radius: 6px; cursor: pointer; }
.auth-tab-btn.active { background: var(--lime); color: #12151b; font-weight: 500; }
.auth-box input {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  margin-bottom: 10px;
}
.auth-error { color: var(--red); font-size: 12px; margin-top: 8px; min-height: 14px; }

.formula-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 1.25rem;
  text-align: center;
}
.formula-line { font-family: var(--font-mono); font-size: 16px; color: var(--lime); margin-bottom: 8px; }
.formula-sub { font-size: 12px; color: var(--text-muted); }

.tier-table { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.tier-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.tier-row:last-child { border-bottom: none; }
.tier-head { background: var(--surface); color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }

.footnote { font-size: 13px; color: var(--text-muted); }

.empty-state { color: var(--text-muted); font-size: 14px; padding: 2rem 0; text-align: center; }

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--lime);
  color: #12151b;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.rarity-badge { font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; display: inline-block; text-transform: uppercase; }
.linklike { background: none; border: none; padding: 0; margin: 0; font: inherit; color: var(--lime); text-decoration: underline; cursor: pointer; }
.rarity-silver { background: rgba(180,185,195,0.18); color: #c8ccd4; }
.rarity-gold { background: rgba(212,160,23,0.18); color: #e0b23c; }
.rarity-diamond { background: rgba(120,200,240,0.18); color: #8fd8f5; }
.rarity-perfect { background: rgba(185,140,255,0.2); color: #c9a8ff; }

.trading-card {
  width: 168px; aspect-ratio: 5/7; border-radius: 14px; position: relative;
  display: flex; flex-direction: column; justify-content: space-between; padding: 12px;
  text-decoration: none; box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.25);
  isolation: isolate;
}
.trading-card.tier-silver { background: linear-gradient(160deg, #f1f2f4 0%, #b6bac1 45%, #7c8189 75%, #9aa0a8 100%); }
.trading-card.tier-gold { background: linear-gradient(160deg, #ffefc0 0%, #e0ab2e 45%, #96690a 75%, #c99420 100%); }
.trading-card.tier-diamond {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.55) 0%, transparent 22%),
    linear-gradient(315deg, rgba(255,255,255,0.35) 0%, transparent 25%),
    linear-gradient(160deg, #eaf8ff 0%, #a9def2 40%, #5fa8c9 70%, #cdeefb 100%);
}
.trading-card.tier-perfect {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.6) 0%, transparent 20%),
    linear-gradient(160deg, #ffffff 0%, #e8d9ff 25%, #b98cff 55%, #6a3fd9 85%, #4a1fa8 100%);
}
.trading-card.tier-perfect .trading-card-boost-uses { }

.trading-card.is-holo { position: relative; }
.trading-card.is-holo::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  border-radius: 14px;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.5) 35%, rgba(0,255,255,0.35) 45%, rgba(255,0,200,0.35) 55%, transparent 70%);
  background-size: 250% 250%;
  opacity: 0.7;
  animation: holo-shimmer 5s ease-in-out infinite;
}
@keyframes holo-shimmer {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}
.holo-badge { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 8px; font-weight: 700; background: rgba(255,255,255,0.85); color: #12151b; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.04em; }
.trading-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.trading-card-creator { font-size: 9px; font-weight: 700; color: #3a3d44; text-transform: uppercase; letter-spacing: 0.03em; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trading-card-play { width: 18px; height: 18px; border-radius: 50%; background: rgba(18,21,27,0.55); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 9px; flex-shrink: 0; }
.trading-card-title { font-size: 11px; font-weight: 600; color: rgba(18,21,27,0.85); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.trading-card-score-label { text-align: center; font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(18,21,27,0.55); margin-bottom: -2px; }
.trading-card-score { text-align: center; font-family: var(--font-mono); font-size: 34px; font-weight: 700; color: rgba(18,21,27,0.9); text-shadow: 0 1px 2px rgba(255,255,255,0.3); }
.trading-card-boost-uses { text-align: center; font-size: 9px; color: rgba(18,21,27,0.55); margin-top: -2px; }
.trading-card-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.trading-card-tier { font-size: 9px; font-weight: 700; text-transform: uppercase; color: rgba(18,21,27,0.6); }
.trading-card-serial { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: rgba(18,21,27,0.7); }
.trading-card-menu-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(0,0,0,0.55); position: absolute; top: 4px; right: 4px; z-index: 100;
  letter-spacing: -1px; font-size: 16px; line-height: 1; padding: 8px;
  pointer-events: auto;
}
.trading-card-menu { position: absolute; top: 32px; right: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 16px rgba(0,0,0,0.4); z-index: 51; display: none; min-width: 130px; }
.trading-card-menu.open { display: block; }
.trading-card-menu button { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text); font-size: 12px; padding: 9px 12px; cursor: pointer; }
.trading-card-menu button:hover { background: var(--surface-raised); }
.trading-card-grid { display: flex; flex-wrap: wrap; gap: 12px; position: relative; }

.ach-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; }
.ach-points-box { background: var(--surface); border: 1px solid var(--lime); border-radius: 10px; padding: 10px 18px; text-align: center; }
.ach-points-box .stat-value { color: var(--lime); font-size: 22px; }
.ach-layout { display: flex; gap: 16px; }
.ach-category-list { width: 170px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; }
.ach-cat-btn {
  text-align: left; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 13px; padding: 9px 12px; border-radius: 8px; cursor: pointer;
}
.ach-cat-btn.active { background: rgba(196,245,66,0.12); border-color: var(--lime); color: var(--lime); font-weight: 600; }
.ach-main { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ach-row {
  display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
}
.ach-row.done { border-color: var(--lime); }
.ach-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.ach-row-text { flex: 1; min-width: 0; }
.ach-row-title { font-size: 14px; font-weight: 600; }
.ach-row-desc { font-size: 12px; color: var(--text-muted); }
.ach-row-reward { text-align: right; flex-shrink: 0; }
.ach-row-pts { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--lime); }
.ach-row-give { font-size: 11px; color: var(--text-muted); }

.sell-layout { display: flex; gap: 16px; margin-bottom: 1.5rem; }
.sell-card-list { width: 260px; flex-shrink: 0; max-height: 480px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.sell-card-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; cursor: pointer; font-size: 12px;
}
.sell-card-row.selected { border-color: var(--lime); }
.sell-card-row.locked { opacity: 0.45; cursor: not-allowed; }
.sell-form-panel { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.sell-form-panel .field-label { margin-top: 12px; }
.sell-form-panel input, .sell-form-panel select {
  width: 100%; background: var(--surface-raised); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 12px; font-family: var(--font-body); font-size: 13px;
}

.hypecall-hero {
  background: linear-gradient(160deg, var(--surface), var(--surface-raised));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 1.5rem;
}
.hypecall-hero-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.hypecall-fetch-row { display: flex; gap: 8px; margin-top: 16px; }
.hypecall-fetch-row input { flex: 1; background: var(--surface-raised); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 12px 14px; font-family: var(--font-body); font-size: 14px; }
.btn-lg { padding: 12px 22px; font-size: 14px; }

#tab-hypecall.tab-panel { max-width: 1140px; }
.hypecall-columns { display: flex; gap: 24px; align-items: flex-start; }
.hypecall-col { flex: 1; min-width: 0; }
.hypecall-col-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.hypecall-col-header span { font-size: 18px; }
.hypecall-col-header h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; }

.trend-rank { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 12px; flex-shrink: 0; color: #12151b; }
.trend-rank.r1 { background: #ffd35c; }
.trend-rank.r2 { background: #c7ccd6; }
.trend-rank.r3 { background: #e0a25f; }
.trend-rank.rn { background: var(--surface-raised); color: var(--text-muted); }
.trend-callers { font-family: var(--font-mono); font-size: 11px; color: var(--lime); }

@media (max-width: 900px) {
  .hypecall-columns { flex-direction: column; }
}

.inv-filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.inv-filter-row input, .inv-filter-row select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 12px; font-family: var(--font-body); font-size: 13px;
}
.inv-filter-row input { flex: 2; min-width: 160px; }
.inv-filter-row select { flex: 1; min-width: 120px; }
#active-search {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 12px; font-family: var(--font-body); font-size: 13px; width: 100%;
}

.growth-tag { display: inline-flex; align-items: center; gap: 2px; font-family: var(--font-mono); font-weight: 700; }
.growth-0 { color: var(--text-muted); }
.growth-1 { color: #8fd48a; }
.growth-2 { color: #4fd15a; }
.growth-3 { color: #22c55e; }
.growth-4 { color: #0fe85a; text-shadow: 0 0 8px rgba(15,232,90,0.5); }

.boost-select, .salvage-selects select {
  background: var(--surface-raised); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-family: var(--font-body); font-size: 13px;
}
.boost-select { width: 100%; margin-bottom: 1.25rem; }
.salvage-box { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); max-width: 480px; }
.salvage-selects { display: flex; flex-wrap: wrap; gap: 8px; }
.salvage-selects select { flex: 1 1 140px; min-width: 0; max-width: 220px; }

.bid-row { display: flex; gap: 8px; margin-top: 8px; }
.bid-row input { flex: 1; background: var(--surface-raised); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font-family: var(--font-mono); font-size: 13px; }

.ah-layout { display: flex; gap: 16px; }
.ah-sidebar { width: 150px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; }
.ah-cat-btn { text-align: left; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 13px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.ah-cat-btn.active { background: rgba(196,245,66,0.12); border-color: var(--lime); color: var(--lime); font-weight: 600; }
.ah-main { flex: 1; min-width: 0; }
#ah-search { width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 12px; font-family: var(--font-body); font-size: 13px; margin-bottom: 10px; }
.ah-range-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ah-range-row input {
  flex: 1; min-width: 100px; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-family: var(--font-mono); font-size: 12px;
}
.bid-amount-lime { color: var(--lime); }
.seller-link { background: none; border: none; color: var(--lime); font-family: var(--font-body); font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline; }

.showcase-slot-empty {
  width: 168px; aspect-ratio: 5/7; border-radius: 14px; border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  font-size: 24px; cursor: pointer; background: var(--surface);
}
.showcase-slot-empty:hover { border-color: var(--lime); color: var(--lime); }
.showcase-picker-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 50;
}
.showcase-picker-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; max-width: 760px; max-height: 75vh; overflow-y: auto; position: relative; }
.showcase-picker-close-x {
  position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-raised); border: 1px solid var(--border); color: var(--text);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
