/*!*************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Backgrounds */
  --bg-primary:   #111318;
  --bg-surface:   #1C1F26;
  --bg-elevated:  #252932;

  /* Borders */
  --border:       #2D3139;

  /* Text */
  --text-primary:   #E8EAED;
  --text-secondary: #9AA0A6;

  /* Outcome colors */
  --yes-primary: #69FF47;
  --no-primary:  #FFAB00;

  /* Utility */
  --accent:  #00BCD4;
  --warning: #FF5252;

  /* Typography */
  --font: 'Inter', system-ui, sans-serif;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 100px;

  /* Spacing (8px grid) */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;

  /* Tap target minimum */
  --tap-min: 44px;

  /* Shadows */
  --shadow-surface: 0 1px 3px rgba(0,0,0,.4), 0 0 0 1px var(--border);
  --shadow-float:   0 8px 32px rgba(0,0,0,.6);
}

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

html {
  background: var(--bg-primary);
  min-height: 100vh;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── HEADER ─────────────────────────────────────────────────────────────── */
.header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s4);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  background: rgba(17,19,24,0.9);
}

.header-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.header-logo span { color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.header-balance {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,188,212,0.12);
  border: 1px solid rgba(0,188,212,0.25);
  border-radius: var(--radius-pill);
  padding: 4px 12px 4px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.header-icon-btn {
  width: var(--tap-min);
  height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 20px;
}
.header-icon-btn:active { background: var(--bg-elevated); }

/* ─── FILTER TABS ─────────────────────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 250;
  background: #111318;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
}
.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  border-width: 1px;
  color: #111318;
  font-weight: 600;
}

/* ─── FEED ────────────────────────────────────────────────────────────────── */
.feed {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4) var(--s4) 100px;
}

/* ─── SEARCH BAR ─────────────────────────────────────────────────────────── */
.search-bar-wrap {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  background: var(--bg-primary);
  position: -webkit-sticky;
  position: sticky;
  top: 0; /* inside .matrix-feed scroll container — header+tabs are outside */
  z-index: 80;
  border-bottom: 1px solid var(--border);
}
.search-input-wrap {
  flex: 1 1;
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-secondary);
  pointer-events: none;
  display: flex;
}
.search-input {
  width: 100%;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 0 12px 0 38px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input::placeholder { color: var(--text-secondary); }
.search-input:focus { border-color: var(--accent); }
.search-filter-btn {
  height: 40px;
  padding: 0 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.search-filter-btn:active,
.search-filter-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── MARKET CARD ─────────────────────────────────────────────────────────── */
.market-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;           /* clips cover image to rounded corners */
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.market-card:active {
  transform: scale(0.99);
  border-color: var(--accent);
}

/* Cover image – fixed height 126px (~35% shorter than the original ~192px 16:9 height).
   Full card width is preserved; image is cropped via object-fit: cover. */
.card-cover {
  isolation: isolate;
  position: relative;
  width: 100%;
  height: 126px;
  overflow: hidden;
  background: var(--bg-elevated);
}
.card-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.market-card:hover .card-cover-img { transform: scale(1.03); }
.card-cover-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.18);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.card-cover-urgent {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--warning);
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,82,82,0.35);
  animation: urgentPulse 1s ease-in-out infinite;
}

/* Card body */
.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s4) var(--s4) var(--s3);
}
.card-timer {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: -4px;
}

@keyframes urgentPulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }

.market-question {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.3px;
}

/* ── Probability row with percentage labels ── */
.prob-row {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.prob-label {
  font-size: 13px;
  font-weight: 800;
  min-width: 34px;
  text-align: center;
  letter-spacing: -0.3px;
}
.prob-label.yes { color: var(--yes-primary); text-align: left; }
.prob-label.no  { color: var(--no-primary);  text-align: right; }

.prob-bar {
  flex: 1 1;
  display: flex;
  height: 8px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--bg-elevated);
}
.prob-bar-yes {
  background: var(--yes-primary);
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  transition: width 0.6s ease;
}
.prob-bar-no {
  flex: 1 1;
  background: var(--no-primary);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

/* ── Bet buttons – filled tinted backgrounds ── */
.card-actions {
  display: flex;
  gap: var(--s3);
}

.bet-btn {
  flex: 1 1;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: filter 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.bet-btn:active { transform: scale(0.96); filter: brightness(1.15); }

/* YES / SIM */
.bet-btn.yes {
  background: #1A3D12;
  color: #69FF47;
  border: 1.5px solid #69FF47;
}
.bet-btn.yes:hover { background: #224e17; }

/* NO / NÃO */
.bet-btn.no {
  background: #3D2A00;
  color: #FFAB00;
  border: 1.5px solid #FFAB00;
}
.bet-btn.no:hover { background: #4d3500; }

.bet-btn-icon  { font-size: 14px; opacity: 0.9; }
.bet-btn-label { font-size: 14px; font-weight: 700; }
.bet-btn-pct   { font-size: 18px; font-weight: 800; }

/* ── Card footer ── */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s1);
}

/* Bettor avatars */
.bettor-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bettor-avatars {
  display: flex;
  flex-direction: row-reverse;
}
.bettor-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-surface);
  background: var(--bg-elevated);
  margin-left: -6px;
  object-fit: cover;
  overflow: hidden;
}
.bettor-avatars .bettor-avatar:last-child { margin-left: 0; }
.bettor-label {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Right meta */
.card-meta-right {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.pool-info  { font-size: 12px; color: var(--text-secondary); }
.close-date { font-size: 12px; color: var(--text-secondary); }
.card-link  { font-size: 12px; color: var(--accent); }

/* ─── MATRIX PAGE WRAPPER ─────────────────────────────────────────────────── */
/* Used by /markets, /clubs, /profile to match the MATRIX theme */
.matrix-page {
  height: 100dvh;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.matrix-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s4);
  border-bottom: 1px solid var(--border);
  background: #111318;
}
.matrix-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.matrix-header-title span { color: var(--accent); }
.matrix-feed {
  padding-top: 116px;
  flex: 1 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 100px;
  scrollbar-width: none;
}
.matrix-feed::-webkit-scrollbar { display: none; }

/* ─── SKELETON ────────────────────────────────────────────────────────────── */
.skeleton {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.skel-line {
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    #2f3540 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── UTILITY: mobile-only / desktop-only ───────────────────────────────── */
.mobile-only  { display: block; }
.desktop-only { display: none; }

@media (min-width: 1024px) {
  .mobile-only  { display: none; }
  .desktop-only { display: block; }
  /* Hide page-level mobile headers on desktop — top-bar covers it */
  .header, .matrix-header { display: none; }
  .filter-tabs {
    padding: var(--s3) 24px;
  }
}

/* ─── SIDEBAR-BASED SHELL ────────────────────────────────────────────── */
/* Fixed left sidebar — desktop only */
.sidebar-left {
  display: none;
}
@media (min-width: 1024px) {
  .sidebar-left {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: none;
    padding-bottom: 16px;
  }
  .sidebar-left::-webkit-scrollbar { display: none; }
}

.sidebar-logo {
  display: flex;
  align-items: center;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  text-decoration: none;
  flex-shrink: 0;
}
.sidebar-logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.sidebar-logo-text span { color: var(--accent); }

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  margin: 1px 8px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font);
  width: calc(100% - 16px);
  text-align: left;
}
.sidebar-nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.sidebar-nav-item.active {
  background: rgba(0,188,212,0.12);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 14px 20px 4px;
}
.sidebar-topic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 12px;
  margin: 1px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font);
  width: calc(100% - 16px);
  text-align: left;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}
.sidebar-topic-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.sidebar-topic-item.active { color: var(--accent); }
.sidebar-topic-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-spacer { flex: 1 1; }
.sidebar-bottom {
  margin-top: auto;
  padding: 8px 8px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.sidebar-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
}
.sidebar-bottom-row:hover { background: var(--bg-elevated); }
.sidebar-bottom-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Main wrapper — offset from fixed sidebar on desktop */
.main-wrapper {
  min-height: 100vh;
  background: var(--bg-primary);
}
@media (min-width: 1024px) {
  .main-wrapper { margin-left: 200px; }
}

/* ─── TOP BAR (inside main-wrapper, sticky) ────────────────────────────── */
.top-bar { display: none; }
@media (min-width: 1024px) {
  .top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 50;
    height: 56px;
    padding: 0 24px;
    background: rgba(17,19,24,0.97);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    flex-shrink: 0;
  }
}
.top-bar-search {
  flex: 1 1;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}
.top-bar-search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-secondary);
  pointer-events: none;
  display: flex;
  z-index: 1;
}
.top-bar-search-input {
  width: 100%;
  height: 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 0 14px 0 38px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.top-bar-search-input::placeholder { color: var(--text-secondary); }
.top-bar-search-input:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.top-bar-balance {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,188,212,0.12);
  border: 1px solid rgba(0,188,212,0.25);
  border-radius: var(--radius-pill);
  padding: 5px 12px 5px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.top-bar-btn-ghost {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.top-bar-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.top-bar-btn-solid {
  height: 34px;
  padding: 0 14px;
  background: var(--accent);
  color: #111318;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: filter 0.15s;
  white-space: nowrap;
}
.top-bar-btn-solid:hover { filter: brightness(1.1); }
.top-bar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,188,212,0.15);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* ─── PAGE CONTENT ─────────────────────────────────────────────────────── */
.page-content {
  padding-bottom: 80px; /* mobile bottom-nav clearance */
}
@media (min-width: 1024px) {
  .page-content { padding-bottom: 48px; }
}

/* ─── HERO BANNER ─────────────────────────────────────────────────────── */
.hero-banner { display: none; }
@media (min-width: 1024px) {
  .hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 20px 24px 0;
    padding: 28px 32px;
    background: linear-gradient(135deg, #1a2535 0%, #1C1F26 60%, #111318 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
  }
  .hero-banner::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(0,188,212,0.12) 0%, transparent 70%);
    pointer-events: none;
  }
}
.hero-banner-body {}
.hero-banner-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.hero-banner-title span { color: var(--accent); }
.hero-banner-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}
.hero-banner-stats {
  display: flex;
  gap: 28px;
  margin-top: 18px;
}
.hero-banner-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
}
.hero-banner-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-top: 1px;
}
.hero-banner-ctas {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.hero-cta-primary {
  height: 40px;
  padding: 0 20px;
  background: var(--accent);
  color: #111318;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s;
  white-space: nowrap;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.hero-cta-primary:hover { filter: brightness(1.1); }
.hero-cta-ghost {
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.hero-cta-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ─── FILTER CHIPS ─────────────────────────────────────────────────────── */
.filter-chips {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg-primary);
}
.filter-chips::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) {
  .filter-chips { padding: 10px 24px; }
}
.chip {
  flex-shrink: 0;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  white-space: nowrap;
}
.chip.active {
  background: transparent;
  border-color: #00BCD4;
  border-width: 2px;
  color: #00BCD4;
  font-weight: 700;
}
.chip:hover:not(.active) {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ─── CARD GRID ──────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 12px;
  gap: 12px;
  padding: 12px 16px;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 12px 24px;
  }
}

/* ─── COMPACT MARKET CARD (desktop 4-col) ─────────────────────────────── */
/* Square cover + compressed body — desktop only; cancelled on mobile */
.market-card.compact .card-cover {
  isolation: isolate; aspect-ratio: 1 / 1; }
.market-card.compact .card-body  { padding: 10px 10px 8px; gap: 8px; }
.market-card.compact .market-question {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.2px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.market-card.compact .prob-bar    { height: 5px; }
.market-card.compact .prob-row    { gap: 6px; }
.market-card.compact .prob-label  { font-size: 11px; min-width: 26px; }
.market-card.compact .bet-btn     { height: 34px; border-radius: var(--radius-pill); }
.market-card.compact .bet-btn-label { font-size: 11px; }
.market-card.compact .bet-btn-pct   { font-size: 13px; }
.market-card.compact .bettor-avatar { width: 18px; height: 18px; }
.market-card.compact .pool-info,
.market-card.compact .close-date    { font-size: 10px; }
.market-card.compact .card-timer    { font-size: 10px; }

/* Cancel compact on mobile (<=640px): restore full card appearance */
@media (max-width: 1023px) {
  .market-card.compact .card-cover   { height: 126px; }
  .market-card.compact .card-body    { padding: var(--s4) var(--s4) var(--s3); gap: var(--s4); }
  .market-card.compact .market-question {
    font-size: 18px;
    font-weight: 700;
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
  }
  .market-card.compact .prob-bar    { height: 8px; }
  .market-card.compact .prob-row    { gap: var(--s2); }
  .market-card.compact .prob-label  { font-size: 13px; min-width: 34px; }
  .market-card.compact .bet-btn     { height: 52px; border-radius: var(--radius-md); }
  .market-card.compact .bet-btn-label { font-size: 14px; }
  .market-card.compact .bet-btn-pct   { font-size: 18px; }
  .market-card.compact .bettor-avatar { width: 24px; height: 24px; }
  .market-card.compact .pool-info,
  .market-card.compact .close-date  { font-size: 12px; }
  .market-card.compact .card-timer  { font-size: 12px; }
}

/* ─── DESKTOP TOP NAVBAR ─────────────────────────────────────────────────── */
.desktop-topnav {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-topnav {
    display: flex;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
    height: 64px;
    background: rgba(17,19,24,0.97);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    align-items: center;
    padding: 0 32px;
    gap: 20px;
    flex-shrink: 0;
  }
}

.desktop-topnav-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}
.desktop-topnav-logo span { color: var(--accent); }

.desktop-topnav-search {
  flex: 1 1;
  max-width: 480px;
  position: relative;
  display: flex;
  align-items: center;
}
.desktop-topnav-search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  pointer-events: none;
  display: flex;
  z-index: 1;
}
.desktop-topnav-search-input {
  width: 100%;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 0 16px 0 42px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.desktop-topnav-search-input::placeholder { color: var(--text-secondary); }
.desktop-topnav-search-input:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
}

.desktop-topnav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.desktop-topnav-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,188,212,0.12);
  border: 1px solid rgba(0,188,212,0.25);
  border-radius: var(--radius-pill);
  padding: 6px 14px 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.desktop-topnav-btn-ghost {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.desktop-topnav-btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.desktop-topnav-btn-solid {
  height: 36px;
  padding: 0 16px;
  background: var(--accent);
  color: #111318;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: filter 0.15s;
  white-space: nowrap;
}
.desktop-topnav-btn-solid:hover { filter: brightness(1.1); }
.desktop-topnav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,188,212,0.15);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* ─── DESKTOP CATEGORY BAR ───────────────────────────────────────────────── */
.desktop-category-bar {
  display: none;
}
@media (min-width: 1024px) {
  .desktop-category-bar {
    display: flex;
    gap: var(--s1);
    padding: 10px 32px;
    background: rgba(17,19,24,0.95);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    position: -webkit-sticky;
    position: sticky;
    top: 64px;
    z-index: 90;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .desktop-category-bar::-webkit-scrollbar { display: none; }
}

/* ─── DESKTOP 2-COLUMN LAYOUT ────────────────────────────────────────────── */
.desktop-layout {
  display: flex;
  flex-direction: column;
  padding: var(--s4);
  gap: var(--s4);
}
@media (min-width: 1024px) {
  .desktop-layout {
    flex-direction: row;
    gap: 24px;
    padding: 24px 32px;
    max-width: 1600px;
    margin: 0 auto;
    align-items: flex-start;
    width: 100%;
  }
}

.desktop-feed {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.desktop-sidebar-widgets {
  display: none;
}
@media (min-width: 1024px) {
  .desktop-sidebar-widgets {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 0 0 320px;
    width: 320px;
    position: -webkit-sticky;
    position: sticky;
    top: 124px;  /* 64px topnav + 56px catbar + 4px gap */
    max-height: calc(100vh - 128px);
    overflow-y: auto;
    scrollbar-width: none;
    padding-bottom: 24px;
  }
  .desktop-sidebar-widgets::-webkit-scrollbar { display: none; }
}

/* ─── DESKTOP WIDGET ─────────────────────────────────────────────────────── */
.desktop-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.desktop-widget-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.desktop-widget-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.desktop-widget-list { list-style: none; padding: 6px 0; }
.desktop-widget-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.12s;
}
.desktop-widget-item:hover { background: var(--bg-elevated); }
.desktop-widget-item-emoji  { font-size: 18px; flex-shrink: 0; }
.desktop-widget-item-body   { flex: 1 1; min-width: 0; }
.desktop-widget-item-question {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.desktop-widget-item-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.desktop-widget-item-pct {
  font-size: 13px;
  font-weight: 800;
  color: var(--yes-primary);
  flex-shrink: 0;
  min-width: 36px;
  text-align: right;
}
.desktop-widget-item-vol {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 40px;
  text-align: right;
}

/* ─── HERO MARKET (desktop first/featured card) ──────────────────────────── */
.hero-market .market-question { font-size: 22px; }
.hero-market .bet-btn          { height: 56px; }
.hero-market .bet-btn-pct      { font-size: 22px; }

/* ─── FEED GRID (desktop 3-col) ──────────────────────────────────────────── */
.feed-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
@media (min-width: 1024px) {
  .feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 12px;
    gap: 12px;
  }
}

/* ─── BOTTOM NAV ──────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(17,19,24,0.95);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  padding-top: var(--s2);
  z-index: 50;
}

/* Hide bottom nav on desktop — topnav takes over */
@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }
}

.nav-item {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  height: var(--tap-min);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: var(--radius-sm);
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
}
.nav-item:active { background: var(--bg-elevated); }

.nav-icon  { font-size: 20px; line-height: 1; }
.nav-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
}
.nav-item.active .nav-label { color: var(--accent); font-weight: 700; }
.nav-item.active .nav-icon  { filter: drop-shadow(0 0 6px var(--accent)); }

/* ─── COIN BURST ──────────────────────────────────────────────────────────── */
.coin-burst {
  position: fixed;
  bottom: 200px;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 999;
}
.coin-particle {
  position: absolute;
  font-size: 24px;
  animation: coinFly 0.9s ease-out forwards;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes coinFly {
  0%   { transform: translate(0,0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--rot)); opacity: 0; }
}

/* ─── MODAL BACKDROP + SHEET ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 300;
  padding: 0 0 env(safe-area-inset-bottom);
}

.modal-sheet {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--s6) var(--s5) calc(var(--s6) + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 430px;
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}

/* ─── CLUB CARD ───────────────────────────────────────────────────────────── */
.club-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.club-card:active {
  transform: scale(0.99);
  border-color: var(--accent);
}

/* ─── JOIN BUTTON ─────────────────────────────────────────────────────────── */
.join-btn {
  width: 100%;
  height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--accent);
  background: rgba(0,188,212,0.08);
  color: var(--accent);
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: 0.3px;
}
.join-btn:hover  { background: rgba(0,188,212,0.16); }
.join-btn:active { transform: scale(0.97); }
.join-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── MORE SHEET ─────────────────────────────────────────────────────────── */
.more-sheet {
  padding-bottom: calc(var(--s6) + env(safe-area-inset-bottom) + 60px);
}
.more-sheet-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 var(--s4);
}
.more-sheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.more-sheet-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s3);
  height: 48px;
  padding: 0 var(--s3);
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
  text-align: left;
}
.more-sheet-item:active,
.more-sheet-item:hover {
  background: var(--bg-elevated);
}
.more-sheet-row {
  justify-content: space-between;
}
.more-sheet-row-left {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.more-sheet-divider {
  height: 1px;
  background: var(--border);
  margin: var(--s2) 0;
}
/* Locale buttons */
.more-sheet-locale-group {
  display: flex;
  gap: 4px;
}
.locale-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
}
.locale-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,188,212,0.1);
}
/* Theme toggle pill */
.theme-toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  position: relative;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.theme-toggle .theme-toggle-thumb {
  position: absolute;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: left 0.2s, background 0.2s;
}
.theme-toggle .theme-toggle-thumb.on {
  left: 19px;
  background: var(--accent);
}

/* ─── LIGHT THEME OVERRIDES ───────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-primary:     #F0F2F5;
  --bg-surface:     #FFFFFF;
  --bg-elevated:    #E8EAED;
  --border:         #D1D5DB;
  --text-primary:   #111318;
  --text-secondary: #6B7280;
  --shadow-surface: 0 1px 3px rgba(0,0,0,.1), 0 0 0 1px var(--border);
}

