/* BidSpot — The Bidding House for Website Traffic */
/* Main Layout & Auction Catalog Aesthetics */
/* Relies on css/variables.css being linked before this file in <head> — not
   re-imported here on purpose, see PLAN.md note on the caching bug that caused. */

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

/* html also needs overflow-x:hidden — on mobile browsers the outer viewport can still
   be panned sideways even when body clips, if any descendant overflows (see the
   card-title flex bug this was paired with). Belt-and-suspenders against the next one. */
html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Warm Ambient Background Mesh */
body::before {
  content: '';
  position: fixed;
  top: -160px;
  left: -120px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(139, 30, 46, 0.05) 0%, rgba(250, 246, 239, 0) 70%);
  filter: blur(80px);
  animation: meshFloat1 22s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  bottom: -160px;
  right: -120px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(230, 223, 198, 0.15) 0%, rgba(250, 246, 239, 0) 70%);
  filter: blur(85px);
  animation: meshFloat2 26s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}

[data-theme="dark"] body::before {
  background: radial-gradient(circle, rgba(178, 58, 74, 0.08) 0%, rgba(20, 18, 16, 0) 70%);
}

[data-theme="dark"] body::after {
  background: radial-gradient(circle, rgba(46, 41, 36, 0.25) 0%, rgba(20, 18, 16, 0) 70%);
}

.bg-mesh-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.mesh-ball {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}

.mesh-ball-1 {
  top: -100px;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 30, 46, 0.06), transparent 70%);
  animation: meshFloat1 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.mesh-ball-2 {
  bottom: -100px;
  right: 5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(230, 223, 198, 0.2), transparent 70%);
  animation: meshFloat2 25s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.mesh-ball-3 {
  top: 40%;
  left: 45%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(139, 30, 46, 0.04), transparent 70%);
  animation: meshFloat1 30s infinite alternate-reverse cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes meshFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.05); }
  100% { transform: translate(-30px, 50px) scale(0.96); }
}

@keyframes meshFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -40px) scale(1.08); }
  100% { transform: translate(40px, -20px) scale(0.92); }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

/* Header Navigation Bar — same background as the page (no glass/blur separation),
   sits flush with the body like outbid.lol's, with more breathing room. */
.navbar {
  position: relative;
  z-index: 100;
  background: var(--bg-primary);
  padding: 22px 32px;
  transition: background-color var(--transition-normal);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  transition: opacity var(--transition-fast);
}

.brand-logo:hover {
  opacity: 0.9;
}

/* Two-tone wordmark: "Bid" in the base ink, "Spot" in the accent. Same idea as
   the reference where "BID" was called out in a different color, adapted to our
   own palette rather than switching the theme. Applied by wrapping the second
   half in <span class="brand-logo-accent"> in the markup. */
.brand-logo-accent {
  color: var(--accent-primary);
}

.brand-logo-svg {
  flex-shrink: 0;
  stroke: var(--accent-primary);
}

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

.stats-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.stats-pill:hover {
  border-color: var(--success-color);
  color: var(--success-color);
}

.stats-pill:hover .pulse-dot {
  background-color: var(--success-color);
  box-shadow: 0 0 0 0 var(--success-glow);
  animation-name: pulse-green;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 var(--success-glow); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(27, 122, 61, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(27, 122, 61, 0); }
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(139, 30, 46, 0.5);
  animation: pulse-maroon 2s infinite;
}

@keyframes pulse-maroon {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(139, 30, 46, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(139, 30, 46, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(139, 30, 46, 0); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

.nav-link-text {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 6px 2px;
  margin: 0 8px;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

/* Underline that grows out from the middle to sit under the active tab and to
   preview under a hover. Same maroon as the rest of the accent palette (kept in
   the site's theme rather than the reference's orange), animated width/opacity so
   the current tab reads instantly and hover confirms which one you'd land on. */
.nav-link-text::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
  opacity: 0;
  transform: translateX(-50%);
  transition: width var(--transition-normal), opacity var(--transition-fast);
}

.nav-link-text:hover::after {
  width: 60%;
  opacity: 0.6;
}

.nav-link-text.active::after {
  width: 100%;
  opacity: 1;
}

.nav-link-text:hover, .nav-link-text.active {
  color: var(--accent-primary);
}

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

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.nav-text-btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-text-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}


.currency-toggle {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3px;
  border-radius: var(--radius-full);
}

.currency-option {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.currency-option.active {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Category Filter Bar */
.category-wrapper {
  max-width: 1240px;
  margin: 24px auto 0;
  padding: 0 28px;
  /* body is a column flex container; auto side-margins on a flex item disable
     the default stretch sizing entirely (that's separate from, and not fixed by,
     min-width:0 — the leaderboard overflow fix elsewhere doesn't apply here for
     that reason). Without a definite width, this shrinks to fit its non-wrapping
     category-bar row (whose min-content equals its max-content, since chips can't
     wrap) instead of the viewport. width:100% gives it a definite size so
     max-width/margin:auto can still center it on wide screens as intended. */
  width: 100%;
  min-width: 0;
}

/* The "SELECT CATEGORY" label and the "Open 24/7" status pill that used to sit
   above this row are gone — the chips are self-evidently a category filter, and the
   pill was a leftover of the removed trading-session countdown. */

.category-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 2px 10px;
}

.pinned-chip {
  flex-shrink: 0;
}

/* Everything except "All" lives in here and scrolls/auto-rolls; min-width:0 is
   required because this is a flex item next to .pinned-chip — without it, it
   defaults to min-width:auto and grows to fit its own non-wrapping chips instead
   of the space actually left over (same class of bug fixed on .category-wrapper). */
.category-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.category-chip.explore-chip {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent-primary);
  font-weight: 700;
}

.category-chip.explore-chip:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* The generic .chip-icon rule paints every chip icon muted grey; on Explore the
   arrow should follow the chip's own accent (and turn white with it on hover). */
.category-chip.explore-chip .chip-icon {
  stroke: currentColor;
}

.chip-icon {
  width: 15px;
  height: 15px;
  stroke: var(--text-muted);
  flex-shrink: 0;
  transition: stroke var(--transition-fast);
}

.category-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.category-chip:hover .chip-icon {
  stroke: var(--accent-primary);
}

.category-chip.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.category-chip.active .chip-icon {
  stroke: #ffffff;
}

.chip-icon-emoji {
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

/* Search Bar Dropdown */
.header-search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 300px;
}

/* Time Toggle (All-time vs Today) */
.time-toggle-container {
  display: flex;
  justify-content: center;
  margin: 16px 0 12px;
}

.time-toggle-pill {
  display: inline-flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3px;
  border-radius: var(--radius-full);
}

.time-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.time-option.active {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Hero Section — Auction Catalog Headline */
.hero-section {
  text-align: center;
  padding: 12px 28px 12px;
  max-width: 900px;
  margin: 0 auto;
}

.hero-subtitle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  color: var(--accent-primary);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.hero-rank-num {
  transition: color var(--transition-fast);
  cursor: default;
}

.hero-rank-num:hover {
  color: var(--accent-primary);
}

/* The category name in "Claim Spot #2 in Fintech" — sized down from the headline
   so a long name like "Social & Creator Tools" doesn't dominate the hero line. */
.hero-category-name {
  color: var(--accent-primary);
  font-size: 0.78em;
  font-weight: 700;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  line-height: 1.25;
}

.hero-price-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.hero-price {
  font-family: var(--font-serif);
  color: var(--accent-primary);
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition-fast);
}

.adjust-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.adjust-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-primary);
}

/* Claim / Place Bid Form Bar — the primary conversion control on the page, so it
   reads as a solid, high-contrast composite field rather than the washed-out pale
   bar it used to be. Three visually distinct segments (URL · category · action)
   separated by a hairline, instead of three low-contrast items floating in a pill. */
.claim-bar-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  padding: 7px 7px 7px 18px;
  border-radius: var(--radius-full);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.claim-bar-form:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.input-icon-svg {
  stroke: var(--accent-primary);
  flex-shrink: 0;
  margin-right: 10px;
}

.claim-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  /* min-width:0 (not the default auto) so a long value shrinks inside the bar
     instead of pushing the select and button past the form's own edge. */
  min-width: 0;
  padding: 10px 12px 10px 0;
}

.claim-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
  /* A placeholder that gets clipped mid-word reads as broken; ellipsize it. */
  text-overflow: ellipsis;
}

/* Hairline divider between the typed URL and the category picker, so the bar
   reads as two separate inputs rather than one long ambiguous text field. */
.claim-select {
  flex-shrink: 0;
  max-width: 190px;
  border: none;
  border-left: 1px solid var(--border-color);
  background: transparent;
  padding: 10px 12px;
  margin-right: 6px;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  text-overflow: ellipsis;
  transition: color var(--transition-fast);
}

.claim-select:hover { color: var(--accent-primary); }
.claim-select:focus-visible { color: var(--accent-primary); }

/* The unselected "Select Category" prompt is a placeholder, not a value — mute it
   so a real chosen category is visibly different from having chosen nothing. */
.claim-select:invalid { color: var(--text-muted); font-weight: 500; }

.claim-bar-form .btn-primary {
  padding: 11px 26px;
  font-size: 0.92rem;
  font-weight: 700;
}

/* Maroon Place Bid Button */
.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  transition: background-color var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
}

.btn-primary:active {
  transform: scale(0.99);
}

/* Category Showcase Section */
.most-active-categories-section {
  max-width: 1240px;
  margin: 24px auto 16px;
  padding: 0 28px;
}

.section-header {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.categories-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .categories-showcase-grid {
    grid-template-columns: 1fr;
  }
}

.category-showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition-fast);
  position: relative;
}

.category-showcase-card:hover {
  border-color: var(--accent-primary);
}

.category-badge-hottest, .category-badge-active, .category-badge-popular {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-light);
  color: var(--accent-primary);
  border: 1px solid var(--accent-border);
  font-family: var(--font-serif);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  align-self: flex-start;
}

.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-card-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.category-card-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.category-rank-previews {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.preview-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
}

.preview-rank-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-num {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 0.8rem;
}

.preview-title {
  font-weight: 500;
  color: var(--text-primary);
}

.preview-price {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 0.84rem;
}

.btn-explore-category {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  transition: color var(--transition-fast);
}

.btn-explore-category:hover {
  color: var(--accent-primary-hover);
}

/* Layout Grid Container */
.main-content {
  max-width: 1240px;
  margin: 20px auto 60px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  width: 100%;
  flex: 1;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.sidebar-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
}

/* Top 5 Traders Today Sidebar Styling */
.top-traders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.top-trader-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.top-trader-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.trader-rank-num {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-primary);
  width: 24px;
  flex-shrink: 0;
}

.trader-logo {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.82rem;
  color: #ffffff;
  flex-shrink: 0;
}

.trader-info {
  flex: 1;
  min-width: 0;
}

.trader-title {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trader-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.trader-price {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sidebar-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.category-grid-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.category-grid-card:hover {
  border-color: var(--accent-primary);
}

.category-grid-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.category-grid-stat {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.highlight-num {
  color: var(--accent-primary);
  font-weight: 700;
}

.today-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.today-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 0.84rem;
}

.today-item:last-child {
  border-bottom: none;
}

.today-rank {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 0.78rem;
  width: 28px;
}

.today-title {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.today-amount {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.82rem;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-item {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 8px 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-primary);
}

.form-input, .form-select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-primary);
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInToast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Nav Icon Buttons */
.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-icon-btn svg {
  stroke: var(--text-primary);
  transition: stroke var(--transition-fast);
}

.nav-icon-btn:hover svg {
  stroke: var(--accent-primary);
}

/* Search & theme toggle: icon-only at every width (not just mobile), and sized
   up now that they no longer need to fit a text label next to the icon. */
.nav-icon-btn-only {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero Rank Target Badge Pill */
.hero-rank-target-pill {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-primary);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Sidebar Featured Categories List */
.sidebar-categories-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.sidebar-category-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--transition-fast);
}

.sidebar-category-card:hover {
  border-color: var(--accent-primary);
}

.sidebar-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-cat-name {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-cat-count {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.sidebar-cat-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.sidebar-cat-preview strong {
  font-family: var(--font-serif);
  color: var(--accent-primary);
}

.btn-explore-category-small {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-primary);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  transition: color var(--transition-fast);
}

.btn-explore-category-small:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

/* ============================================================
   RESPONSIVE — TABLET (≤900px): compact the nav into two rows
   instead of letting it overflow horizontally.
   ============================================================ */
@media (max-width: 900px) {
  .navbar { padding: 14px 20px; }

  .nav-container {
    flex-wrap: wrap;
    row-gap: 12px;
  }

  .nav-center {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
  }

  .stats-pill {
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .stats-pill::-webkit-scrollbar { display: none; }

  .nav-links {
    order: 4;
    flex-basis: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }

  .header-search-dropdown {
    width: min(300px, calc(100vw - 40px));
    right: -8px;
  }

  .category-wrapper,
  .most-active-categories-section,
  .main-content {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤640px): stack the hero, drop button text
   labels to save width, full-width claim form.
   ============================================================ */
@media (max-width: 640px) {
  .brand-logo { font-size: 1.2rem; }

  .nav-text-btn span,
  .nav-icon-btn span {
    display: none;
  }
  .nav-text-btn.nav-icon-btn {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .hero-section { padding: 20px 16px 12px; }

  .hero-headline {
    flex-direction: column;
    gap: 12px;
  }

  .hero-price-controls {
    justify-content: center;
    width: 100%;
  }

  /* Below 640px the three segments can't share a row without the placeholder and
     the category name both truncating — stack them as full-width rows instead. */
  .claim-bar-form {
    flex-wrap: wrap;
    gap: 8px;
    border-radius: var(--radius-lg);
    padding: 12px;
  }

  .claim-input {
    flex-basis: 100%;
    padding: 6px 0;
    order: 1;
  }

  .input-icon-svg {
    display: none;
  }

  .claim-select {
    flex: 1 1 auto;
    max-width: none;
    order: 2;
    border-left: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    margin-right: 0;
    padding: 10px 14px;
  }

  .claim-bar-form .btn-primary {
    order: 3;
    padding: 11px 20px;
  }

  .btn-primary {
    flex: 1;
    justify-content: center;
  }

  .most-active-categories-section .section-header {
    text-align: center;
  }

  /* Category bar: the two fixed chips share the top line (Explore pushed to the
     far edge, mirroring desktop), and the rolling strip drops to its own full-width
     line underneath. Sharing one line with them left the strip ~100px wide, which
     clipped every category mid-word. */
  .category-bar {
    flex-wrap: wrap;
    row-gap: 10px;
    padding-bottom: 8px;
  }

  .category-bar .pinned-chip {
    order: 1;
  }

  .category-bar .explore-chip {
    order: 2;
    margin-left: auto;
  }

  .category-scroll {
    order: 3;
    flex-basis: 100%;
    /* Bleed to the screen edges so the strip visibly runs off both sides — the cue
       that it scrolls — while the chips still start flush with the page gutter. */
    margin: 0 -16px;
    padding: 2px 16px;
    scroll-padding-left: 16px;
  }

  /* A tap target that also has to be legible one-handed. */
  .category-chip {
    padding: 9px 15px;
    font-size: 0.86rem;
  }
}

@media (max-width: 420px) {
  .currency-toggle { display: none; }
}

