/* Plus Jakarta Sans font loaded via HTML link tags */

/* Updated: 2026-01-04 - WSJ medal colors + Amazon button dark mode fix + comment box border fix + WSJ voting */

/* =========================================================
   Sleek / Minimal Pass
   - softer shadows, consistent radii, fewer loud fills
   - accent used more intentionally
   - better dark mode surfaces + borders
========================================================= */

:root {
  --accent: #64748b;
  --accent-2: #475569;
  --accent-glow: rgba(100, 116, 139, 0.4);

  --bg-a: #f0f4f8;
  --bg-b: #e1e8f0;
  --bg-pattern: radial-gradient(circle at 20% 50%, rgba(100, 116, 139, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(100, 116, 139, 0.03) 0%, transparent 50%);

  --text: #0f172a;
  --muted: #64748b;

  --card: #ffffff;
  --card-hover: rgba(255, 255, 255, 0.95);
  --border: rgba(15, 23, 42, 0.12);
  --border-light: rgba(15, 23, 42, 0.06);

  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --pill: 0px;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04),
              0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08),
              0 8px 32px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.10),
              0 16px 48px rgba(15, 23, 42, 0.15);
  --shadow-xl: 0 12px 32px rgba(15, 23, 42, 0.12),
              0 24px 64px rgba(15, 23, 42, 0.18);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 160ms;
  --t-med: 220ms;

  --focus: 0 0 0 3px rgba(100, 116, 139, 0.25);
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  background:
    var(--bg-pattern),
    linear-gradient(135deg, var(--bg-a) 0%, var(--bg-b) 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 16px;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling optimization for mobile */
html {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  body {
    /* Disable complex gradients on mobile for performance */
    background: var(--bg-a);
  }
}

.container {
  width: 100%;
  max-width: 1100px;
  text-align: center;
}

/* Header with Logo */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.site-logo {
  height: 60px;
  width: auto;
}

.site-logo:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .site-logo {
    height: 50px;
  }
}

/* =========================================================
   Nav
========================================================= */

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0 18px;
  position: relative;
  z-index: 100001;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  box-shadow: var(--shadow-md);
  transition: background var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease),
    transform var(--t-med) var(--ease);
  width: 100%;
  max-width: 1200px;
  flex-wrap: wrap;
  min-height: 48px;
  backdrop-filter: blur(10px);
  position: relative;
}

.navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--pill);
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(100, 116, 139, 0.1) 0%,
    rgba(59, 130, 246, 0.05) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}

.navbar:hover::before {
  opacity: 1;
}

.nav-left ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-right::before {
  content: '';
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
}

.navbar li a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: var(--pill);
  transition: background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
  display: inline-block;
  white-space: nowrap;
}

/* Minimal active: subtle surface + accent text (instead of always orange fill) */
.navbar li a:hover {
  background: #FFB3D9;
  color: #1e293b;
  transform: translateY(-1px);
}

.navbar li a.active {
  background: #6FA01A;
  color: white;
  font-weight: 700;
}

/* Dark mode hover surface */

/* Dark Mode Toggle */
.dark-mode-toggle {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: var(--pill);
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  flex-shrink: 0;
}

.dark-mode-toggle:hover {
  transform: scale(1.08);
  opacity: 0.9;
  background: rgba(100, 116, 139, 0.10);
}

.dark-mode-toggle:focus {
  outline: none;
  border-color: var(--border);
}

.dark-mode-toggle:active {
  transform: translateY(0);
  background: rgba(100, 116, 139, 0.10);
  border-color: var(--border);
}

.toggle-icon {
  transition: transform 420ms var(--ease);
}


/* =========================================================
   Category Switch (less “pill overload”)
========================================================= */

.category-switch {
  margin: 18px 0 26px;
}

.category-btn {
  display: inline-block;
  padding: 10px 22px;
  font-size: 1.02rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
  margin: 0 8px;
  text-decoration: none;
  color: var(--text);
}

.category-btn:hover:not(.active) {
  border-color: rgba(59, 130, 246, 0.45);
  color: var(--accent);
  transform: translateY(-1px);
}

.category-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(147, 51, 234, 0.14) 100%);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--accent);
}

/* Remove hyperlink styling from category buttons */
.category-btn,
.category-btn:hover,
.category-btn:visited,
.category-btn:active {
  text-decoration: none !important;
}

/* =========================================================
   Week Info
========================================================= */

#week-info {
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  color: var(--accent);
  font-weight: 650;
  margin-bottom: 7px;
  position: relative;
  top: 3px;
  line-height: 1.15;
}

/* =========================================================
   Chart Section (clean card)
========================================================= */

.chart-section {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(22px, 5.5vw, 46px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: background var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease);
}

canvas {
  height: clamp(340px, 58vh, 540px) !important;
  width: 100% !important;
}

/* Hover note */
.hover-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: clamp(1rem, 3.6vw, 1.15rem);
  font-style: italic;
}

/* =========================================================
   Top 3 Spotlight (more minimal cards, less extreme hover)
========================================================= */

.top3-spotlight {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 34px auto 24px;
  max-width: 1200px;
  padding: 0 20px;
  align-items: stretch;
}

/* Ensure all children (including anchor tags) stretch to full height */
.top3-spotlight > * {
  display: flex;
  flex-direction: column;
}

.top3-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  will-change: auto;
}

@media (hover: hover) and (pointer: fine) {
  .top3-card {
    transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

.top3-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  opacity: 0;
  pointer-events: none;
}

/* subtle "rank glow" with enhanced borders */
.top3-card:nth-child(1) {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: var(--shadow-lg),
    0 0 0 1px rgba(255, 215, 0, 0.1) inset,
    0 4px 20px rgba(255, 215, 0, 0.15);
}

.top3-card:nth-child(2) {
  border-color: rgba(192, 192, 192, 0.4);
  box-shadow: var(--shadow-lg),
    0 0 0 1px rgba(192, 192, 192, 0.1) inset,
    0 4px 20px rgba(192, 192, 192, 0.12);
}

.top3-card:nth-child(3) {
  border-color: rgba(205, 127, 50, 0.4);
  box-shadow: var(--shadow-lg),
    0 0 0 1px rgba(205, 127, 50, 0.1) inset,
    0 4px 20px rgba(205, 127, 50, 0.12);
}

@media (hover: hover) and (pointer: fine) {
  .top3-card:hover {
    transform: translate3d(0, -4px, 0);
  }

  .top3-card:hover::before {
    opacity: 1;
  }
}

/* WSJ clickable cards (with VIZ links) */
.wsj-clickable {
  cursor: pointer;
}

.wsj-clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
}

/* VIZ link hover effect */
.viz-link:hover {
  background: rgb(37, 99, 235) !important;
}

.top3-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: auto;
}

.top3-info {
  padding: 18px 18px 20px;
}

/* Hover overlay for top 3 cards */
.top3-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.85));
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 18px 18px 20px;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .top3-card:hover .top3-hover-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

.top3-hover-content {
  width: 100%;
  color: white;
  text-align: center;
}

.top3-hover-overlay .top3-title {
  color: white;
  margin-bottom: 10px;
}

.top3-hover-overlay .top3-rank {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.top3-hover-overlay .top3-sales {
  color: rgba(255, 255, 255, 0.95);
}

.top3-hover-overlay .top3-amazon {
  background: white !important;
  color: var(--accent) !important;
  pointer-events: auto;
  text-decoration: none;
}

.top3-hover-overlay .top3-amazon:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--accent-2) !important;
  transform: translateY(-1px);
}

/* WSJ-specific hover overlay styles */
.top3-hover-overlay .wsj-top3-note {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.top3-rank {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
  margin-right: 6px;
}

.top3-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
}

.top3-author {
  font-size: 0.98rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.top3-sales {
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.top3-sales strong {
  color: var(--accent);
}

.top3-amazon {
  display: inline-block;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: white;
  border-radius: 0px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
}

.top3-amazon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent);
  transition: left var(--t-med) var(--ease);
}

.top3-amazon:hover {
  transform: translateY(-2px) scale(1.05);
}

.top3-amazon:hover::before {
  left: 100%;
}

/* =========================================================
   #4-10 (UPDATED ONLY)
   Goal: match Top 3 width (1200px) + stretch full width
========================================================= */

/* This is the container in index.html: <div class="nice-rankings-grid"></div> */
.nice-rankings-grid {
  max-width: 1200px;
  /* match top3-spotlight */
  margin: 16px auto 0px;
  padding: 0 20px;

  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* ✅ ensures children expand full width */
  gap: 14px;
}

/* If you still render old .nice-card rows anywhere */
.nice-card {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 14px 18px;
}

.nice-card-info {
  text-align: left;
  padding-left: 14px;
}

.nice-card-image {
  width: 56px;
  height: auto;
  border-radius: 8px;
}

.nice-card-rank {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.nice-card-title {
  font-size: 1.02rem;
  font-weight: 650;
  margin-bottom: 6px;
  line-height: 1.3;
}

.nice-card-author {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.nice-card-sales {
  font-size: 0.95rem;
  margin: 4px 0;
}

.nice-card-sales strong {
  color: var(--accent);
}

/* Shelf wrapper (if your JS uses it) */
.shelf-wrap {
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  /* nice-rankings-grid already provides side padding and max-width */
  display: grid;
  gap: 12px;
  justify-items: stretch;
  /* ✅ stretch items */
}

/* Each shelf item container */
.shelf-item {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow var(--t-med) var(--ease),
    transform var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease),
    background var(--t-med) var(--ease);
  position: relative;
}

.shelf-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg,
    rgba(100, 116, 139, 0.02) 0%,
    transparent 50%);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}

.shelf-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
  background: var(--card-hover);
}

.shelf-item:hover::after {
  opacity: 1;
}

/* Clickable row */
.shelf-row {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

/* cover image */
.shelf-cover {
  width: 64px;
  height: 88px;
  object-fit: cover;
  border-radius: 0px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.6);
}

/* main text */
.shelf-main {
  min-width: 0;
}

.shelf-topline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.shelf-rank {
  font-weight: 800;
  color: var(--accent);
  flex: 0 0 auto;
}

.shelf-title {
  font-weight: 700;
  color: var(--text);
}

.shelf-subline {
  margin-top: 2px;
  font-size: 0.85rem;
  color: var(--accent);
  opacity: 0.9;
  font-weight: 700;
}

/* caret */
.shelf-caret {
  font-size: 1.15rem;
  color: var(--muted);
  opacity: 0.9;
  transition: transform var(--t-med) var(--ease);
}

/* Open state */
.shelf-item.open {
  border-color: rgba(100, 116, 139, 0.35);
}

.shelf-item.open .shelf-caret {
  transform: rotate(180deg);
}

/* Expand panel */
.shelf-panel {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px 14px 14px;
  background: rgba(100, 116, 139, 0.05);
}

/* panel content layout */
.shelf-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.shelf-stat {
  font-size: 0.95rem;
  color: var(--text);
}

.shelf-stat strong {
  color: var(--accent);
}

/* Actions row */
.shelf-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

/* Make amazon button fit the shelf panel */
.shelf-actions .amazon-btn {
  margin-top: 0;
}

/* Dark mode refinements */


/* Mobile: stack a bit tighter */
@media (max-width: 520px) {
  .shelf-row {
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    padding: 10px 12px;
  }

  .shelf-cover {
    width: 56px;
    height: 78px;
  }
}

/* =========================================================
   Buttons / shared
========================================================= */

.amazon-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  background: rgba(100, 116, 139, 0.14);
  /* minimal */
  color: var(--accent);
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 0px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.amazon-btn:hover {
  background: rgba(100, 116, 139, 0.20);
  border-color: rgba(100, 116, 139, 0.35);
  transform: translateY(-1px);
}

/* =========================================================
   Footer bits
========================================================= */

.bottom-logo {
  margin-top: 64px;
  width: 92px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.10));
  opacity: 0.78;
}

.bottom-disclaimer {
  margin-top: 18px;
  font-size: 0.92rem;
  opacity: 0.85;
  color: var(--muted);
}

/* =========================================================
   About / Support pages (kept, made consistent)
========================================================= */

.about-content,
.support-content {
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.75;
  font-size: 1.08rem;
}

.about-content h2,
.support-content h2 {
  font-size: 2.2rem;
  margin-bottom: 32px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.intro-text {
  font-size: 1.22rem;
  margin-bottom: 30px;
  font-weight: 500;
  color: var(--text);
}

.about-content p,
.support-content p {
  margin-bottom: 22px;
  color: var(--text);
}

.feature-list {
  text-align: left;
  max-width: 640px;
  margin: 30px auto;
  padding-left: 22px;
  font-size: 1.08rem;
}

.feature-list li {
  margin-bottom: 14px;
}

.feature-list li::marker {
  color: var(--accent);
  font-weight: 800;
}

.closing-text {
  font-size: 1.15rem;
  font-style: italic;
  margin: 42px 0 34px;
  color: var(--muted);
}

.footer-note {
  font-size: 0.95rem;
  opacity: 0.75;
  margin-top: 46px;
  color: var(--muted);
}

/* Support buttons */
.support-buttons {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.support-btn {
  display: inline-block;
  padding: 14px 26px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: var(--pill);
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    filter var(--t-fast) var(--ease);
  box-shadow: var(--shadow-sm);
}

.support-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  filter: saturate(1.05);
}

.support-btn.kofi {
  background: #ff5e5b;
  color: white;
}

.support-btn.patreon {
  background: #f96854;
  color: white;
}

.support-btn.paypal {
  background: #0070ba;
  color: white;
}

/* Tier Cards */
.tier-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px auto 32px;
  max-width: 1000px;
}

.tier-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  transition: all var(--t-med) var(--ease);
  box-shadow: var(--shadow-sm);
}

.tier-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(100, 116, 139, 0.3);
}

.tier-card.tier-popular {
  border-color: #64748b;
  border-width: 2px;
}

.tier-card.tier-premium {
  border-color: #f59e0b;
  border-width: 2px;
  background: linear-gradient(135deg, var(--card) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.tier-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: #64748b;
  color: white;
  padding: 4px 12px;
  border-radius: var(--pill);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

.tier-badge-premium {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.tier-header {
  margin-bottom: 20px;
  text-align: center;
}

.tier-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.tier-price {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent);
  margin: 0;
}

.tier-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.tier-benefits li {
  padding: 10px 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
}

.tier-benefits li:last-child {
  border-bottom: none;
}

/* Blurred tiers with Coming Soon overlay */
.tier-blur-container {
  position: relative;
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.coming-soon-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  pointer-events: none;
}

.coming-soon-overlay h3 {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

.coming-soon-overlay p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 8px 0 0;
  opacity: 0.9;
}

/* Social buttons */
.social-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

.social-btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 0px;
  text-decoration: none;
  transition: all var(--t-fast) var(--ease);
  border: 1px solid transparent;
}

.social-btn:hover {
  transform: translateY(-2px);
}

.social-btn.youtube {
  background: #ff0000;
  color: white;
}

.social-btn.youtube:hover {
  background: #cc0000;
}

.social-btn.x {
  background: #000000;
  color: white;
}

.social-btn.x:hover {
  background: #1a1a1a;
}

[data-theme="dark"] .social-btn.x {
  background: #1d9bf0;
}

/* Leaderboard tabs */
.leaderboard-tab {
  padding: 10px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  color: var(--text);
}

.leaderboard-tab:hover {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.25);
}

.leaderboard-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.leaderboard-list {
  margin-top: 24px;
}

/* =========================================================
   Enhanced Leaderboard Styles
========================================================= */

/* Podium card hover effects */
@media (hover: hover) and (pointer: fine) {
  .leaderboard-podium-card .podium-content {
    cursor: pointer;
  }

  .leaderboard-podium-card:hover .podium-content {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), var(--shadow-xl);
  }

  .leaderboard-podium-card[data-rank="1"]:hover .podium-content {
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.5), var(--shadow-xl);
  }

  .leaderboard-podium-card[data-rank="2"]:hover .podium-content {
    box-shadow: 0 12px 32px rgba(192, 192, 192, 0.5), var(--shadow-xl);
  }

  .leaderboard-podium-card[data-rank="3"]:hover .podium-content {
    box-shadow: 0 12px 32px rgba(205, 127, 50, 0.5), var(--shadow-xl);
  }
}

/* Leaderboard list item - no hover effects */
.leaderboard-list-item-no-hover {
  cursor: pointer;
}

/* Mobile responsive styles for leaderboard */
@media (max-width: 768px) {
  .leaderboard-podium {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .leaderboard-podium-card .podium-content {
    height: 280px !important;
  }

  .medal-badge {
    font-size: 1.8rem !important;
  }
}

[data-theme="dark"] .social-btn.x:hover {
  background: #1a8cd8;
}

/* Small logos above titles */
.support-logo-wrapper,
.about-logo-wrapper {
  text-align: center;
  margin-bottom: -6px;
}

.support-logo,
.about-logo {
  width: 92px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.10));
}

/* =========================================================
   Auth Bar + Modal (more minimal + better dark inputs)
========================================================= */

.auth-bar {
  display: none; /* Hidden - now integrated into navbar */
}

.auth-container {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* User dropdown */
.user-dropdown-container {
  position: relative;
  display: inline-block;
  z-index: 100000;
}

.user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  white-space: nowrap;
  height: 32px;
}

.user-dropdown-trigger:hover {
  background: rgba(100, 116, 139, 0.10);
  transform: translateY(-1px);
}

.user-dropdown-trigger.open {
  background: rgba(100, 116, 139, 0.10);
}

.username-text {
  font-weight: 600;
  font-size: 0.75rem;
}

.dropdown-arrow {
  transition: transform var(--t-fast) var(--ease);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.user-dropdown-trigger.open .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast);
  z-index: 99999;
  overflow: hidden;
}

.user-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease);
  white-space: nowrap;
  box-sizing: border-box;
  margin: 0;
  line-height: 1;
  font-family: inherit;
}

.user-dropdown-item:hover {
  background: rgba(100, 116, 139, 0.10);
}

.user-email {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-btn {
  padding: 6px 12px;
  background: var(--card);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
  position: relative;
}

.auth-btn:hover {
  background: rgba(100, 116, 139, 0.10);
  border-color: var(--border);
  transform: translateY(-1px);
}

.auth-btn:active {
  transform: translateY(0);
}

/* Modal */
.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
}

.auth-modal-content {
  background: var(--card);
  padding: 34px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.auth-modal input {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  transition: box-shadow var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.auth-modal input:focus {
  outline: none;
  box-shadow: var(--focus);
  border-color: rgba(100, 116, 139, 0.45);
}

/* Password toggle wrapper */
.password-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

.password-wrapper input {
  width: 100%;
  margin-bottom: 0;
  padding-right: 45px; /* Make room for eye icon */
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  transition: color var(--t-fast) var(--ease);
  user-select: none;
}

.password-toggle:hover {
  color: var(--text);
}

.password-toggle:focus {
  outline: none;
}

/* Close */
.close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: var(--pill);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.close-btn:hover {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text);
}

/* Tabs */
.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}

.tab-btn {
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  padding-bottom: 6px;
  color: var(--muted);
  transition: color var(--t-fast) var(--ease);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom: 2px solid rgba(59, 130, 246, 0.65);
}

.auth-hint {
  font-size: 0.82rem;
  opacity: 0.75;
  margin-top: 8px;
  text-align: center;
  color: var(--muted);
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 900px) {
  .top3-spotlight {
    grid-template-columns: 1fr;
  }

  .top3-image {
    height: 100%;
  }

  .top3-rank {
    font-size: 3.2rem;
  }

  .top3-title {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .top3-image {
    height: 100%;
  }

  .nice-card-image {
    height: 210px;
  }

  .bottom-logo {
    width: 78px;
  }

  /* Simplify shadows for mobile performance */
  .top3-card:nth-child(1),
  .top3-card:nth-child(2),
  .top3-card:nth-child(3) {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  /* Disable transforms on mobile to improve scrolling */
  .top3-card {
    transform: none !important;
    transition: none !important;
  }

  .top3-card::before {
    display: none;
  }

  /* Disable shelf item hover effects on mobile */
  .shelf-item {
    transition: none;
    transform: none !important;
  }

  .shelf-item::after {
    display: none;
  }

  /* Simplify shelf item shadows */
  .shelf-item {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  }
}

/* ===============================
   Comments UI
================================ */
#commentsSection h3 {
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

/* Old duplicate removed - see line 1128+ for active #commentComposer styles */

/* Old duplicate removed - see line 1153+ for active #commentBody styles */

/* ===============================
   Reddit-style comments
================================ */

/* ===============================
   Comments: force Reddit-style alignment
================================ */

.comments-wrap {
  /* Your content-box may be centered; keep the box but control text flow inside */
}

/* =========================================================
   Comments Section - Compact Reddit-style Design
========================================================= */

.comments-title {
  text-align: center;
  margin-bottom: 14px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

/* Force left aligned thread with better width for readability */
.comments-thread {
  text-align: left !important;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Composer - square style */
#commentComposer {
  display: grid !important;
  gap: 12px !important;
  margin-bottom: 24px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all var(--t-med) var(--ease);
}

#commentComposer:focus-within {
  border-color: rgba(100, 116, 139, 0.25);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Login hint styling */
#commentLoginHint {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

#commentLoginHint span {
  color: var(--accent) !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
}

#commentLoginHint:hover {
  opacity: 1 !important;
}

#commentComposer > * {
  margin: 0;
}

#commentBody {
  width: 100%;
  border-radius: 0px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  color: var(--text);
  font-family: inherit;
  min-height: 60px;
  margin: 0;
  display: block;
  vertical-align: top;
}

#commentBody:focus {
  box-shadow: var(--focus);
  border-color: rgba(100, 116, 139, 0.45);
}

/* Profile comment textarea styling */
#profileCommentBody {
  width: 100%;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  color: var(--text);
  font-family: inherit;
  min-height: 60px;
  margin: 0;
  display: block;
  vertical-align: top;
}

#profileCommentBody:focus {
  box-shadow: var(--focus);
  border-color: rgba(100, 116, 139, 0.45);
}

/* Each comment - Square box design */
.comment-item {
  padding: 0;
  margin-bottom: 10px;
  border-bottom: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04),
              0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
}

.comment-item.compact {
  border-radius: 0px;
}


/* No comments message */
.no-comments-msg {
  opacity: 0.6;
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
}

/* Highlight flash animation when clicking @mention */
.comment-item.highlight-flash {
  animation: highlightPulse 2s ease-out;
}

@keyframes highlightPulse {
  0% {
    background: rgba(100, 116, 139, 0.25);
    border-color: rgba(100, 116, 139, 0.60);
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.15);
  }
  50% {
    background: rgba(100, 116, 139, 0.18);
    border-color: rgba(100, 116, 139, 0.45);
  }
  100% {
    background: var(--card);
    border-color: var(--border);
    box-shadow: none;
  }
}

/* Header: username + timestamp only (compact) */
.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.comment-header-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.comment-user {
  font-weight: 700;
  color: var(--text);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.comment-timestamp {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

/* Meta chunk holds the separators + inline like + time (legacy) */
.comment-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Body - improved readability */
.comment-body {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 6px;
  white-space: pre-wrap;
  color: var(--text);
  word-wrap: break-word;
}

.comment-body-compact {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 8px;
  white-space: pre-wrap;
  color: var(--text);
  word-wrap: break-word;
}

/* Actions row (Reddit-style) - under comment body */
.comment-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.like-btn-compact {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: var(--pill);
  border: 1.5px solid transparent;
  background: rgba(100, 116, 139, 0.06);
  cursor: pointer;
  font-size: 0.65rem;
  line-height: 1;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.like-btn-compact .tako {
  font-size: 0.75rem;
  filter: grayscale(0.3);
  transition: all var(--t-fast) var(--ease);
}

.like-btn-compact .like-count {
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: 0.01em;
}

.like-btn-compact:hover {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.12) 0%, rgba(100, 116, 139, 0.08) 100%);
  border-color: rgba(100, 116, 139, 0.15);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.like-btn-compact:hover .tako {
  filter: grayscale(0);
  transform: scale(1.1) rotate(-5deg);
}

.like-btn-compact:active {
  transform: translateY(0) scale(0.98);
}

.like-btn-compact.liked {
  color: rgb(255, 105, 180);
  background: linear-gradient(135deg, rgba(255, 105, 180, 0.15) 0%, rgba(255, 105, 180, 0.10) 100%);
  border-color: rgba(255, 105, 180, 0.25);
  box-shadow: 0 2px 4px rgba(255, 105, 180, 0.12);
}

.like-btn-compact.liked .tako {
  filter: none;
  animation: takoyakiBounce 0.5s ease;
}

.like-btn-compact.liked:hover {
  background: linear-gradient(135deg, rgba(255, 105, 180, 0.22) 0%, rgba(255, 105, 180, 0.15) 100%);
  border-color: rgba(255, 105, 180, 0.35);
  box-shadow: 0 3px 6px rgba(255, 105, 180, 0.18);
}

@keyframes takoyakiBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(10deg); }
}

.reply-btn-compact {
  background: rgba(100, 116, 139, 0.06);
  border: 1.5px solid transparent;
  border-radius: 0px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.65rem;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: var(--pill);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.reply-btn-compact:hover {
  color: var(--text);
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.14) 0%, rgba(100, 116, 139, 0.10) 100%);
  border-color: rgba(100, 116, 139, 0.15);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.reply-btn-compact:active {
  transform: translateY(0) scale(0.98);
}

.delete-btn-compact {
  background: rgba(239, 68, 68, 0.06);
  border: 1.5px solid transparent;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.75rem;
  color: #ef4444;
  padding: 5px 10px;
  border-radius: var(--pill);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.08);
}

.delete-btn-compact:hover {
  color: #64748b;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(239, 68, 68, 0.10) 100%);
  border-color: rgba(239, 68, 68, 0.20);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.15);
}

.delete-btn-compact:active {
  transform: translateY(0) scale(0.98);
}

/* @mention tag for replies - modern pill design */
.replying-to {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 3px 8px;
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.12) 0%, rgba(100, 116, 139, 0.08) 100%);
  border: 1.5px solid rgba(100, 116, 139, 0.20);
  border-radius: 999px;
  margin-right: 6px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 1px 2px rgba(100, 116, 139, 0.08);
  letter-spacing: 0.01em;
}

.replying-to:hover {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.20) 0%, rgba(100, 116, 139, 0.15) 100%);
  border-color: rgba(100, 116, 139, 0.30);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.15);
}

.replying-to:active {
  transform: translateY(0) scale(0.98);
}

/* Custom tooltip for @mention - shows on hover */
.replying-to::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 400;
  white-space: normal;
  max-width: 300px;
  width: max-content;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  line-height: 1.4;
}

.replying-to:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-12px);
}

/* Dark mode tooltip */

/* Inline Takoyaki like button - bigger and more clickable */
.like-btn.inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  transition: background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
  color: var(--muted);
}

.like-btn.inline .tako {
  font-size: 1rem;
  transform: translateY(1px);
}

.like-btn.inline .like-count {
  font-weight: 700;
  font-size: 0.85rem;
}

/* hover */
.like-btn.inline:hover {
  background: rgba(100, 116, 139, 0.12);
  transform: translateY(-1px);
}

/* liked = pink highlight */
.like-btn.inline.liked {
  color: rgb(255, 105, 180);
  background: rgba(255, 105, 180, 0.08);
}

/* bounce */
@keyframes takoBounce {
  0% {
    transform: translateY(1px) scale(1);
  }

  30% {
    transform: translateY(-2px) scale(1.15);
  }

  60% {
    transform: translateY(1px) scale(0.95);
  }

  100% {
    transform: translateY(1px) scale(1);
  }
}

/* Floating takoyaki animation when upvoting */
@keyframes floatUpTakoyaki {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-40px) scale(1.3) rotate(10deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-80px) scale(0.8) rotate(-10deg);
    opacity: 0;
  }
}

.like-btn.bounce .tako {
  animation: takoBounce 300ms ease;
}

/* Dark mode support (your class is dark-mode) */





/* =========================================================
   Comments: Roles + Replies + Register popout
========================================================= */

/* Role badges - compact square design */
.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 14px;
  padding: 0 4px;
  border-radius: 2px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.04) 100%);
  color: rgba(15, 23, 42, 0.9);
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.role-badge.role-admin {
  border-color: #5A8315;
  background: #6FA01A;
  color: white;
  box-shadow: 0 2px 4px rgba(111, 160, 26, 0.3);
}

.role-badge.role-mod {
  border-color: #dc2626;
  background: #ef4444;
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.role-badge.role-donator {
  border-color: #FFB3D9;
  background: #FFB3D9;
  color: #1e293b;
  box-shadow: 0 2px 4px rgba(255, 179, 217, 0.3);
}

/* Reply link */
.reply-link {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0;
  margin: 0;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

.reply-link:hover {
  color: var(--text);
  text-decoration: underline;
}

/* One-level reply indentation */
.comment-item.comment-reply {
  position: relative;
  margin-left: 12px;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
  padding-top: 2px;
  border-radius: 0;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border-light);
  box-shadow: none;
}

/* Hide tail on reply comments */
.comment-item.comment-reply::before,
.comment-item.comment-reply::after {
  display: none;
}


/* Reply composer */
.reply-composer {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 6px;
  padding: 10px;
  background: rgba(100, 116, 139, 0.03);
  border: 1px solid var(--border);
  border-radius: 0px;
}

.reply-textarea {
  width: 100%;
  border-radius: 0px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  outline: none;
  font-size: 0.85rem;
  line-height: 1.4;
  resize: vertical;
  color: var(--text);
  font-family: inherit;
  min-height: 50px;
}

.reply-textarea:focus {
  box-shadow: var(--focus);
  border-color: rgba(100, 116, 139, 0.45);
}

.reply-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-actions .auth-btn {
  padding: 5px 12px;
  font-size: 0.8rem;
}

.reply-cancel {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0px;
  padding: 5px 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--muted);
  transition: background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.reply-cancel:hover {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.15);
}

/* Replies container spacing */
.replies {
  margin-top: 6px;
}

/* Show more / Hide replies buttons */
.show-more-replies-btn,
.hide-replies-btn {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 0px;
  border: none;
  background: rgba(100, 116, 139, 0.06);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.72rem;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all var(--t-fast) var(--ease);
}

.show-more-replies-btn:hover,
.hide-replies-btn:hover {
  background: rgba(100, 116, 139, 0.12);
}

/* =========================================================
   Register popout (logged out CTA)
========================================================= */
.register-popout {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.register-popout.show {
  opacity: 1;
  transform: translateY(0);
}

.register-popout-card {
  pointer-events: auto;
  width: min(360px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px 14px 12px;
}

.register-popout-title {
  font-weight: 900;
  font-size: 0.98rem;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.register-popout-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.register-popout-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.register-popout-close {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 0px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--muted);
  transition: transform var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.register-popout-close:hover {
  background: rgba(100, 116, 139, 0.10);
  border-color: rgba(100, 116, 139, 0.18);
  transform: translateY(-1px);
}

/* Dark mode compatibility */







.week-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.join-discussion-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 0px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--accent);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.join-discussion-btn:hover {
  background: rgba(100, 116, 139, 0.10);
  border-color: var(--border);
  transform: translateY(-1px);
}

/* View toggle buttons at the top */
.view-toggle-top {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 20px auto 24px;
  max-width: fit-content;
}

.view-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: 0px;
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.view-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.15);
}

.view-btn.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
  color: var(--accent);
}

.view-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.view-label {
  font-weight: 600;
}

/* Text-based view toggle buttons in footer */
.view-text-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  text-decoration: none;
}

.view-text-btn:hover {
  color: var(--text);
}

.view-text-btn.active {
  color: var(--accent);
  font-weight: 600;
}

/* View sections with smooth transitions */
.view-section {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.view-section[style*="display: block"],
.view-section:not([style*="display: none"]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#graphView .view-toggle {
  margin-top: 18px;
  margin-bottom: 8px;
}

/* Nested reply indentation - more spacious */
.comment-item.comment-reply {
  margin-left: 32px;
  margin-top: 12px;
}

/* Content wrapper - chat bubble style with rounded padding */
.comment-content {
  padding: 12px 16px;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 12px;
}

/* Profile picture in comments */
.comment-profile-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid rgba(100, 116, 139, 0.15);
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all var(--t-fast) var(--ease);
}


.comment-profile-pic-default {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.12) 0%, rgba(59, 130, 246, 0.12) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 2px solid rgba(100, 116, 139, 0.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all var(--t-fast) var(--ease);
}


/* Comment main content (text area next to profile pic) */
.comment-main {
  flex: 1;
  min-width: 0;
}

/* Collapse button - hidden in compact mode */
.comment-gutter {
  display: none;
}

/* Replies container */
.replies {
  margin-top: 6px;
}

/* Legacy "N replies hidden" button - hidden in compact mode */
.replies-hidden-line {
  display: none;
}

.replies-children {
  margin-top: 4px;
}

/* Dark mode improvements */




@keyframes highlightPulseDark {
  0% {
    background: rgba(100, 116, 139, 0.30);
    border-color: rgba(100, 116, 139, 0.70);
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.20);
  }
  50% {
    background: rgba(100, 116, 139, 0.20);
    border-color: rgba(100, 116, 139, 0.50);
  }
  100% {
    background: rgba(15, 23, 42, 0.50);
    border-color: rgba(226, 232, 240, 0.10);
    box-shadow: none;
  }
}





/* Mobile responsiveness */
@media (max-width: 600px) {
  .comments-thread {
    max-width: 100%;
    padding: 0 8px;
  }

  #commentComposer {
    padding: 10px;
  }

  .comment-item.comment-reply {
    margin-left: 12px;
    padding-left: 8px;
  }

  .comment-content {
    padding: 8px 10px;
  }

  .comment-header-compact {
    flex-wrap: wrap;
    gap: 4px;
  }

  .comment-body-compact {
    font-size: 0.95rem;
  }

  .comment-actions-row {
    gap: 8px;
  }
}
/* Bell button styling */
.notif-bell {
  height: 32px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  line-height: 1;
  padding: 0 8px;
  font-size: 0.9rem;
  transition: background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.notif-bell:hover {
  background: rgba(100, 116, 139, 0.10);
  border-color: var(--border);
  transform: translateY(-1px);
}

/* Mobile nav dropdown button */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: flex;
  }
}

.mobile-nav-toggle:hover {
  background: rgba(100, 116, 139, 0.06);
  border-color: rgba(100, 116, 139, 0.2);
}

.mobile-nav-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform var(--t-fast) var(--ease);
}

.mobile-nav-toggle.open svg {
  transform: rotate(180deg);
}

.mobile-nav-dropdown {
  display: none;
  position: fixed;
  top: auto;
  right: 10px;
  left: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 99999;
  padding: 8px;
  max-width: 300px;
  margin: 0 auto;
}

.mobile-nav-dropdown.open {
  display: block;
}

@media (max-width: 768px) {
  .mobile-nav-dropdown {
    position: fixed;
    top: 80px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
  }
}

.mobile-nav-dropdown a {
  display: block;
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.mobile-nav-dropdown a:hover {
  background: #FFB3D9;
  color: #1e293b;
}

.mobile-nav-dropdown a.active {
  background: #6FA01A;
  color: white;
  font-weight: 700;
}

/* Mobile nav backdrop */
.mobile-nav-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99998;
  backdrop-filter: blur(2px);
}

.mobile-nav-backdrop.open {
  display: block;
}

/* Responsive navbar for mobile */
@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 0px;
    position: relative;
  }

  .nav-left {
    display: none;
  }

  .mobile-nav-toggle {
    display: flex;
    order: -1;
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .nav-right::before {
    content: '';
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 4px;
    flex-shrink: 0;
    order: 0;
  }

  #notifMount {
    order: 1;
  }

  #authContainer {
    order: 2;
  }

  .search-btn {
    order: 3;
  }

  .navbar::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 8px 10px;
  }

  .mobile-nav-toggle {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .auth-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .notif-bell {
    height: 32px;
    min-width: 32px;
    font-size: 0.85rem;
  }

  .search-btn {
    font-size: 1rem !important;
    padding: 6px 8px !important;
  }
}

/* =========================================================
   Weekly Shonen Jump ToC Page
========================================================= */

/* Meta badges container */
.wsj-meta-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 auto 28px;
  max-width: 900px;
}

/* Individual badge styling */
.wsj-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.wsj-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.wsj-badge-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wsj-badge-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

/* Badge color variants */
.wsj-badge-primary {
  border-color: rgba(100, 116, 139, 0.25);
  background: linear-gradient(135deg,
    rgba(100, 116, 139, 0.08) 0%,
    rgba(100, 116, 139, 0.04) 100%);
}

.wsj-badge-primary .wsj-badge-value {
  color: var(--accent);
}

.wsj-badge-secondary {
  border-color: rgba(59, 130, 246, 0.25);
  background: linear-gradient(135deg,
    rgba(59, 130, 246, 0.08) 0%,
    rgba(59, 130, 246, 0.04) 100%);
}

.wsj-badge-secondary .wsj-badge-value {
  color: rgb(59, 130, 246);
}

.wsj-badge-accent {
  border-color: rgba(168, 85, 247, 0.25);
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.08) 0%,
    rgba(168, 85, 247, 0.04) 100%);
}

.wsj-badge-accent .wsj-badge-value {
  color: rgb(168, 85, 247);
}

/* ToC section container */
.wsj-toc-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* ToC list container */
.wsj-toc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0px;
}

/* Loading state */
.wsj-loading {
  text-align: center;
  padding: 40px 20px;
  font-size: 1.1rem;
  color: var(--muted);
  font-style: italic;
}

/* Disclaimer text */
.wsj-disclaimer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 24px 0 0;
  font-style: italic;
  opacity: 0.85;
}

/* WSJ Top 3 cards - with image support */
.wsj-top3-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.wsj-top3-card .top3-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.wsj-top3-card .top3-info {
  padding: 32px 24px;
  text-align: center;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* WSJ-specific medal border colors - target containers via parent nth-child */
.top3-spotlight > :nth-child(1) .wsj-top3-card {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: var(--shadow-lg),
    0 0 0 1px rgba(255, 215, 0, 0.1) inset,
    0 4px 20px rgba(255, 215, 0, 0.15);
}

.top3-spotlight > :nth-child(2) .wsj-top3-card {
  border-color: rgba(192, 192, 192, 0.4);
  box-shadow: var(--shadow-lg),
    0 0 0 1px rgba(192, 192, 192, 0.1) inset,
    0 4px 20px rgba(192, 192, 192, 0.12);
}

.top3-spotlight > :nth-child(3) .wsj-top3-card {
  border-color: rgba(205, 127, 50, 0.4);
  box-shadow: var(--shadow-lg),
    0 0 0 1px rgba(205, 127, 50, 0.1) inset,
    0 4px 20px rgba(205, 127, 50, 0.12);
}

/* Leaderboard top 3 medal styling */
.top3-spotlight > :nth-child(1) .top3-card {
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: var(--shadow-lg),
    0 0 0 1px rgba(255, 215, 0, 0.15) inset,
    0 4px 20px rgba(255, 215, 0, 0.2);
}

.top3-spotlight > :nth-child(2) .top3-card {
  border-color: rgba(192, 192, 192, 0.5);
  box-shadow: var(--shadow-lg),
    0 0 0 1px rgba(192, 192, 192, 0.15) inset,
    0 4px 20px rgba(192, 192, 192, 0.18);
}

.top3-spotlight > :nth-child(3) .top3-card {
  border-color: rgba(205, 127, 50, 0.5);
  box-shadow: var(--shadow-lg),
    0 0 0 1px rgba(205, 127, 50, 0.15) inset,
    0 4px 20px rgba(205, 127, 50, 0.18);
}

.wsj-top3-note {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(100, 116, 139, 0.06);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

/* WSJ shelf images for #4+ items */
.wsj-shelf-image {
  width: 64px;
  height: 88px;
  object-fit: cover;
  border-radius: 0px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.6);
}

.wsj-shelf-row {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: default;
}


/* Dark mode enhancements */





/* Mobile responsiveness */
@media (max-width: 768px) {
  .wsj-meta-badges {
    gap: 10px;
    margin-bottom: 20px;
  }

  .wsj-badge {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  .wsj-badge-label {
    font-size: 0.75rem;
  }

  .wsj-badge-value {
    font-size: 0.85rem;
  }

  .wsj-top3-card {
    min-height: 240px;
  }

  .wsj-top3-card .top3-info {
    padding: 24px 18px;
  }
}

@media (max-width: 480px) {
  .wsj-meta-badges {
    flex-direction: column;
    width: 100%;
  }

  .wsj-badge {
    width: 100%;
    justify-content: center;
  }

  .wsj-top3-card {
    min-height: 220px;
  }

  .wsj-top3-note {
    font-size: 0.88rem;
    padding: 10px 12px;
  }
}

/* =========================================================
   DARK MODE OVERRIDES
========================================================= */

body.dark-mode {
  /* Ensure text inputs and textareas are visible in dark mode */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea,
  select {
    background: var(--bg-b);
    color: var(--text);
    border-color: var(--border);
  }

  input[type="text"]:focus,
  input[type="email"]:focus,
  input[type="password"]:focus,
  textarea:focus,
  select:focus {
    border-color: var(--accent);
    background: var(--card);
  }

  /* Comment composer */
  #commentBody,
  .reply-textarea {
    background: var(--bg-b);
    color: var(--text);
    border-color: var(--border);
  }

  #commentBody:focus,
  .reply-textarea:focus {
    background: var(--card);
    border-color: var(--accent);
  }

  /* Charts and graphs */
  .chart-container,
  .bar-chart {
    background: var(--card);
  }

  /* Bar chart bars */
  .bar {
    opacity: 0.9;
  }

  /* Tooltips */
  .tooltip {
    background: var(--card);
    color: var(--text);
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  /* Role badges in dark mode */
  .role-badge {
    border-color: rgba(241, 245, 249, 0.15);
    background: rgba(241, 245, 249, 0.08);
    color: rgba(241, 245, 249, 0.9);
  }

  .role-badge.role-admin {
    border-color: rgba(139, 195, 139, 0.35);
    background: rgba(139, 195, 139, 0.15);
    color: rgba(157, 210, 157, 1);
  }

  .role-badge.role-mod {
    border-color: rgba(177, 156, 217, 0.35);
    background: rgba(177, 156, 217, 0.15);
    color: rgba(195, 177, 225, 1);
  }

  .role-badge.role-donator {
    border-color: rgba(255, 179, 217, 0.35);
    background: rgba(255, 179, 217, 0.15);
    color: #FFB3D9;
  }

  /* Auth modal */
  .auth-modal-content {
    background: var(--card);
    border-color: var(--border);
  }

  /* Buttons */
  .auth-btn {
    background: var(--accent);
    color: white;
  }

  .auth-btn:hover {
    background: var(--accent-2);
  }

  /* Tables */
  table {
    border-color: var(--border);
  }

  th,
  td {
    border-color: var(--border);
  }

  thead {
    background: var(--bg-b);
  }

  tbody tr:hover {
    background: rgba(241, 245, 249, 0.03);
  }

  /* Cards and sections */
  .content-box,
  .chart-section {
    background: var(--card);
  }

  /* Links */
  a {
    color: var(--accent);
  }

  a:hover {
    color: var(--accent-2);
  }

  /* Code blocks */
  code {
    background: var(--bg-b);
    color: var(--accent);
    border-color: var(--border);
  }

  /* Shelf items */
  .shelf-item {
    border-color: var(--border);
  }

  .shelf-row:hover {
    background: rgba(241, 245, 249, 0.03);
  }

  /* Top 3 cards */
  .top3-card {
    background: var(--card);
    border-color: var(--border);
  }

  /* Comment items */
  .comment-item {
    border-color: var(--border-light);
  }

  /* Chat bubble tail in dark mode */
  .comment-item::before {
    border-color: transparent var(--card) transparent transparent;
  }

  .comment-item::after {
    border-color: transparent var(--border-light) transparent transparent;
  }

  .comment-item:hover {
    background: rgba(241, 245, 249, 0.02);
  }

  /* Reply composer */
  .reply-composer {
    background: rgba(96, 165, 250, 0.04);
    border-color: var(--border);
  }

  /* Navbar */
  .navbar {
    background: var(--card);
    border-color: var(--border);
  }

  .navbar a:hover {
    background: rgba(241, 245, 249, 0.05);
  }

  /* Bottom disclaimer - brighter text for visibility */
  .bottom-disclaimer {
    color: rgba(241, 245, 249, 0.7);
    border-color: var(--border);
  }

  /* Placeholder text */
  ::placeholder {
    color: var(--muted);
    opacity: 0.6;
  }

  /* Selection */
  ::selection {
    background: var(--accent);
    color: white;
  }

  /* Scrollbar */
  ::-webkit-scrollbar-track {
    background: var(--bg-a);
  }

  ::-webkit-scrollbar-thumb {
    background: var(--border);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
  }

  /* Amazon buttons - ensure visibility in dark mode */
  .amazon-btn {
    color: white;
    background: rgba(100, 116, 139, 0.20);
    border-color: rgba(100, 116, 139, 0.35);
  }

  .amazon-btn:hover {
    background: rgba(100, 116, 139, 0.30);
    border-color: rgba(100, 116, 139, 0.45);
  }

  /* Top 3 Amazon buttons - ensure white text */
  .top3-amazon {
    color: white !important;
  }

  /* Top 3 hover overlay Amazon buttons - use accent color */
  .top3-hover-overlay .top3-amazon {
    background: white !important;
    color: var(--accent) !important;
  }

  .top3-hover-overlay .top3-amazon:hover {
    color: var(--accent-2) !important;
  }
}

/* =========================================================
   WSJ Voting System
========================================================= */

.vote-favorites-btn {
  padding: 10px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 0px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}

.vote-favorites-btn:hover {
  background: var(--accent-2);
}

.show-results-btn {
  padding: 10px 24px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.show-results-btn:hover {
  background: var(--accent);
  color: white;
}

.vote-series-list {
  display: grid;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}

.vote-series-item {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.vote-series-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.vote-series-item.selected {
  border-color: var(--accent);
  background: rgba(100, 116, 139, 0.08);
  box-shadow: var(--shadow-md);
}

.vote-series-item .vote-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--t-fast) var(--ease);
  background: var(--card);
}

.vote-series-item.selected .vote-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}

.vote-series-item.selected .vote-checkbox::after {
  content: '✓';
  color: white;
  font-weight: 900;
  font-size: 14px;
}

.vote-series-item .vote-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  flex: 1;
  line-height: 1.3;
}

/* Community Favorites Results - Compact box layout */
.community-favorites-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.rank-number {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--muted);
  min-width: 24px;
  text-align: center;
}

.series-info {
  flex: 1;
  min-width: 0;
}

.series-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vote-bar {
  height: 6px;
  background: var(--bg-b);
  border-radius: 0px;
  overflow: hidden;
}

.vote-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.6s ease;
}

.vote-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.vote-count {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

.vote-percent {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--muted);
}

.community-favorites-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-style: italic;
}

/* Dark mode adjustments */
body.dark-mode .vote-series-item {
  background: var(--card);
  border-color: var(--border);
}

body.dark-mode .vote-series-item.selected {
  background: rgba(100, 116, 139, 0.15);
}

body.dark-mode .vote-checkbox {
  background: var(--bg-b);
}

body.dark-mode .vote-series-item.selected .vote-checkbox {
  background: var(--accent);
}

/* =========================================================
   Seasonal Anime Page
========================================================= */

.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.anime-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

@media (hover: hover) and (pointer: fine) {
  .anime-card {
    transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media (hover: hover) and (pointer: fine) {
  .anime-card:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: var(--shadow-lg);
    border-color: rgba(100, 116, 139, 0.3);
  }
}

.anime-card-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.anime-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.anime-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  padding: 12px;
}

@media (hover: hover) and (pointer: fine) {
  .anime-card-overlay {
    transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media (hover: hover) and (pointer: fine) {
  .anime-card:hover .anime-card-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

.anime-rate-btn {
  padding: 6px 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 0px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .anime-rate-btn {
    transition: background 150ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media (hover: hover) and (pointer: fine) {
  .anime-rate-btn:hover {
    background: var(--accent-2);
  }
}

.anime-card-content {
  padding: 12px;
}

.anime-card-title {
  font-size: 0.92rem;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.anime-card-studio {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.anime-card-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.anime-external-link {
  display: block;
  width: 100%;
  padding: 6px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0px;
  transition: all 150ms ease;
  text-align: center;
  color: white !important;
  line-height: 1.3;
  box-sizing: border-box;
}

.mal-link {
  background: #2e51a2;
  border: 1px solid #2e51a2;
}

.anilist-link {
  background: #02a9ff;
  border: 1px solid #02a9ff;
}

@media (hover: hover) and (pointer: fine) {
  .mal-link:hover {
    background: #1e3a7a;
    border-color: #1e3a7a;
  }

  .anilist-link:hover {
    background: #0189d1;
    border-color: #0189d1;
  }
}

.anime-card-genres {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.genre-tag {
  padding: 2px 6px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0px;
  font-size: 0.7rem;
  font-weight: 600;
}

.anime-card-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.rating-stars {
  display: flex;
  gap: 1px;
  font-size: 0.82rem;
}

.rating-stars .star {
  color: #FFD700;
}

.rating-stars .star:not(.filled) {
  color: var(--border);
}

.rating-value {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text);
}

.user-rating-indicator {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 3px;
}

.user-rating-indicator .rating-stars {
  font-size: 0.72rem;
}

.mal-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  transition: color var(--t-fast) var(--ease);
}

.mal-link:hover {
  color: var(--accent-2);
}

/* List View */
.anime-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.anime-list-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 20px;
  transition: all var(--t-fast) var(--ease);
  box-shadow: var(--shadow-sm);
}

.anime-list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.anime-list-image {
  width: 160px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.anime-list-content {
  flex: 1;
  min-width: 0;
}

.anime-list-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
}

.anime-list-studio {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.anime-list-synopsis {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 12px;
}

.anime-list-genres {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.anime-list-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-left: 1px solid var(--border);
  min-width: 140px;
}

/* Rating Modal */
.rating-stars-interactive {
  display: flex;
  gap: 8px;
  font-size: 2.5rem;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.rating-stars-interactive .star {
  position: relative;
  transition: all 0.2s var(--ease);
  opacity: 0.4;
  filter: grayscale(1) brightness(1.2);
  cursor: pointer;
}

.rating-stars-interactive .star:hover {
  transform: scale(1.2);
  filter: grayscale(0);
  opacity: 1;
}

.rating-stars-interactive .star.selected {
  opacity: 1;
  filter: grayscale(0) drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

.rating-stars-interactive .star.hover-preview {
  opacity: 0.8;
  filter: grayscale(0);
  transform: scale(1.1);
}

/* Dark mode */
body.dark-mode .genre-tag {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

body.dark-mode .rating-stars .star:not(.filled) {
  color: rgba(241, 245, 249, 0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .anime-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 12px 0;
  }

  .anime-card-image {
    height: 180px;
  }

  .anime-card-content {
    padding: 10px;
  }

  .anime-card-title {
    font-size: 0.85rem;
  }

  .anime-card-studio {
    font-size: 0.72rem;
    margin: 0 0 6px;
  }

  .rating-stars {
    font-size: 0.75rem;
  }

  .rating-value {
    font-size: 0.75rem;
  }

  .anime-list-item {
    flex-direction: column;
  }

  .anime-list-image {
    width: 100%;
    height: 280px;
  }

  .anime-list-rating {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
  }
}
