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

:root {
  --bg-dark: hsl(220, 25%, 8%);
  --bg-card: hsla(220, 25%, 13%, 0.45);
  --bg-card-hover: hsla(220, 25%, 18%, 0.6);
  --bg-input: hsla(220, 25%, 6%, 0.85);
  --bg-header: hsla(220, 25%, 8%, 0.8);
  
  --primary: hsl(335, 85%, 55%);
  --primary-glow: hsla(335, 85%, 55%, 0.3);
  --secondary: hsl(260, 80%, 65%);
  --secondary-glow: hsla(260, 80%, 65%, 0.25);
  --accent: hsl(175, 85%, 45%);
  --accent-glow: hsla(175, 85%, 45%, 0.2);
  
  --text: hsl(220, 15%, 93%);
  --text-muted: hsl(220, 10%, 65%);
  --text-dim: hsl(220, 10%, 45%);
  
  --border: hsla(220, 20%, 30%, 0.25);
  --border-hover: hsla(220, 20%, 45%, 0.4);
  --border-focus: hsla(335, 85%, 55%, 0.5);
  
  --glass-blur: blur(20px);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --neon-glow: 0 0 15px hsla(335, 85%, 55%, 0.25);
  
  --font-title: 'Cinzel', serif;
  --font-header: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) var(--bg-dark);
}

body {
  background-color: var(--bg-dark);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Background Gradients */
.bg-gradient-orb-1 {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  z-index: -2;
  pointer-events: none;
  filter: blur(80px);
}
.bg-gradient-orb-2 {
  position: absolute;
  bottom: 10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
  z-index: -2;
  pointer-events: none;
  filter: blur(100px);
}

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-header);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.jdk-title {
  font-family: var(--font-title);
  background: linear-gradient(135deg, hsl(0, 0%, 100%) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: var(--neon-glow);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout Utilities */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 24px 40px;
}

/* Header & Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--bg-header);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--neon-glow);
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-header);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover {
  color: var(--text);
  background: hsla(220, 10%, 100%, 0.05);
}

.nav-link.active {
  color: var(--text);
  background: linear-gradient(135deg, var(--primary-glow) 0%, var(--secondary-glow) 100%);
  border: 1px solid hsla(335, 85%, 55%, 0.3);
}

/* Glassmorphism Card */
.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

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

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition-normal);
}

.card.highlight::before {
  opacity: 1;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-val {
  font-family: var(--font-header);
  font-size: 2.25rem;
  font-weight: 800;
  margin-top: 8px;
  background: linear-gradient(135deg, #ffffff 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

/* Search Hub styling */
.search-hub-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  color: var(--text);
  font-size: 1.1rem;
  font-family: var(--font-body);
  transition: var(--transition-fast);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-glow), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-icon-svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-header);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: var(--neon-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px hsla(335, 85%, 55%, 0.4);
}

.btn-secondary {
  background: hsla(220, 10%, 100%, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: hsla(220, 10%, 100%, 0.1);
  border-color: var(--border-hover);
}

/* Badge tags */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-era-retro {
  background: rgba(175, 85, 45, 0.2);
  color: var(--accent);
  border: 1px solid rgba(175, 85, 45, 0.4);
}

.badge-era-classic {
  background: rgba(260, 80, 65, 0.2);
  color: var(--secondary);
  border: 1px solid rgba(260, 80, 65, 0.4);
}

.badge-era-modern {
  background: rgba(335, 85, 55, 0.2);
  color: var(--primary);
  border: 1px solid rgba(335, 85, 55, 0.4);
}

.badge-confirmed {
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.badge-speculative {
  background: rgba(255, 165, 2, 0.15);
  color: #ffa502;
  border: 1px solid rgba(255, 165, 2, 0.3);
}

/* Game Grid view */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.game-card {
  cursor: pointer;
}

.game-card-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
  height: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.game-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Tracklist view layout */
.game-detail-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
}

.sidebar-panel {
  position: sticky;
  top: 90px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.track-table-container {
  overflow-x: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--glass-shadow);
}

.track-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.track-table th {
  background: hsla(220, 25%, 10%, 0.8);
  font-family: var(--font-header);
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 10;
}

.track-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.track-table tr {
  transition: var(--transition-fast);
}

.track-table tr:hover {
  background: hsla(220, 10%, 100%, 0.04);
}

.track-table tr.disc-header-row {
  background: hsla(260, 80%, 65%, 0.1) !important;
  font-weight: 700;
  font-family: var(--font-header);
}

.track-table tr.disc-header-row td {
  border-bottom: 2px solid rgba(260, 80, 65, 0.3);
  color: var(--secondary);
}

.track-table .cell-center {
  text-align: center;
}

.composer-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  background: hsla(220, 10%, 100%, 0.08);
  border: 1px solid var(--border);
  font-weight: 500;
}

.composer-chip.confirmed {
  background: rgba(46, 213, 115, 0.1);
  border-color: rgba(46, 213, 115, 0.3);
  color: #2ed573;
}

.composer-chip.speculative {
  background: rgba(255, 165, 2, 0.1);
  border-color: rgba(255, 165, 2, 0.3);
  color: #ffa502;
}

/* Tabs */
.tabs-container {
  display: flex;
  gap: 4px;
  background: hsla(220, 10%, 100%, 0.04);
  padding: 4px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-header);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text);
  background: hsla(220, 10%, 100%, 0.02);
}

.tab-btn.active {
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn var(--transition-normal);
}

/* Composers section */
.composers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.composer-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.composer-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.composer-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  color: white;
}

.composer-card-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 60px;
  margin-top: 8px;
}

/* Slide in drawer for details */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: -550px;
  width: 550px;
  height: 100vh;
  background: var(--bg-dark);
  border-left: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  z-index: 210;
  transition: right var(--transition-normal);
  display: flex;
  flex-direction: column;
  padding: 30px;
  overflow-y: auto;
}

@media(max-width: 600px) {
  .drawer {
    width: 100%;
    right: -100%;
  }
}

.drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.drawer-close-btn:hover {
  color: var(--primary);
}

/* Involvement Matrix styling */
.matrix-container {
  overflow: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  background: var(--bg-card);
  max-height: 70vh;
}

.matrix-table {
  border-collapse: collapse;
  text-align: center;
  font-size: 0.85rem;
  width: max-content;
}

.matrix-table th {
  background: hsla(220, 25%, 10%, 0.85);
  font-family: var(--font-header);
  font-weight: 600;
  padding: 12px 8px;
  border: 1px solid var(--border);
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 10;
}

.matrix-table th.game-header {
  position: sticky;
  left: 0;
  background: hsla(220, 25%, 10%, 0.95);
  z-index: 15;
  text-align: left;
  min-width: 250px;
}

.matrix-table td {
  padding: 10px 8px;
  border: 1px solid var(--border);
  min-width: 50px;
}

.matrix-table td.game-name {
  position: sticky;
  left: 0;
  background: hsla(220, 25%, 12%, 0.95);
  z-index: 5;
  text-align: left;
  font-weight: 600;
  box-shadow: 2px 0 5px rgba(0,0,0,0.3);
}

.matrix-table tr:hover td.game-name {
  background: hsla(220, 20%, 18%, 0.95);
}

.matrix-table tr:hover {
  background: hsla(220, 10%, 100%, 0.02);
}

.matrix-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: bold;
}

.matrix-indicator.composer {
  background: rgba(46, 213, 115, 0.2);
  color: #2ed573;
}

.matrix-indicator.arranger {
  background: rgba(255, 165, 2, 0.2);
  color: #ffa502;
}

.matrix-indicator.both {
  background: rgba(335, 85, 55, 0.2);
  color: var(--primary);
}

.matrix-indicator.uncredited {
  background: rgba(220, 10%, 100%, 0.1);
  color: var(--text-muted);
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  background: var(--bg-card);
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-question {
  padding: 16px 20px;
  font-family: var(--font-header);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out, padding var(--transition-normal);
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid transparent;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 16px 20px;
  border-top-color: var(--border);
}

/* Chart SVG design */
.chart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.donut-segment {
  transition: var(--transition-normal);
  cursor: pointer;
}

.donut-segment:hover {
  stroke-width: 5;
}

.chart-tooltip {
  position: absolute;
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 50;
  box-shadow: var(--glass-shadow);
}

/* Animation utilities */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.anim-fade {
  animation: fadeIn 0.4s ease-out;
}

.anim-slide-up {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive grid changes */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-panels {
    grid-template-columns: 1fr;
  }
}

/* By default, hamburger and mobile drawer are hidden (desktop-first) */
.hamburger-btn {
  display: none;
}

.mobile-nav-drawer {
  display: none;
}


/* =============================================
   MOBILE NAVIGATION (≤ 768px)
   ============================================= */
@media (max-width: 768px) {
  .game-detail-container {
    grid-template-columns: 1fr;
  }
  .sidebar-panel {
    position: static;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .navbar {
    padding: 0 16px;
    height: 60px;
  }

  /* Hide desktop nav links on mobile */
  .nav-links {
    display: none;
  }

  /* --- Hamburger button --- */
  .hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition-fast);
    flex-shrink: 0;
  }

  .hamburger-btn:hover {
    background: hsla(220, 10%, 100%, 0.06);
    border-color: var(--primary);
  }

  .hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    transform-origin: center;
  }

  /* Animate to X when open */
  .hamburger-btn.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--primary);
  }
  .hamburger-btn.open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .hamburger-btn.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--primary);
  }

  /* --- Mobile slide-down drawer --- */
  .mobile-nav-drawer {
    display: block;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    z-index: 99;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  }

  .mobile-nav-drawer.open {
    max-height: 420px;
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 12px 16px 20px;
    gap: 4px;
  }

  .mobile-nav-link {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--border-radius-sm);
    border-bottom: 1px solid hsla(220, 10%, 100%, 0.04);
  }

  .mobile-nav-link:last-child {
    border-bottom: none;
  }

  /* Push main content down to account for shorter navbar */
  .main-content {
    padding-top: 60px;
  }

  /* Shrink logo text on small screens */
  .logo-text {
    font-size: 1rem;
  }

  /* Cards full width on mobile */
  .card {
    padding: 16px;
  }

  /* Games grid: 1 col on mobile */
  .games-grid {
    grid-template-columns: 1fr;
  }

  /* Composer cards: 1 col */
  .composers-grid {
    grid-template-columns: 1fr;
  }

  /* Stat grid: 2 cols still ok on mobile */
  .stats-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Track table horizontal scroll */
  .track-table-wrapper {
    overflow-x: auto;
  }

  /* Composer drawer: full-width on mobile */
  .composer-drawer {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0;
  }

  /* Matrix table scroll */
  #matrix-view .table-scroll-wrapper {
    overflow-x: auto;
  }

  /* Welcome contributors: 1 col */
  .welcome-contributors-grid {
    grid-template-columns: 1fr;
  }
}

/* Extra small (≤ 480px) */
@media (max-width: 480px) {
  .logo-text {
    display: none; /* Only show icon on tiny screens */
  }

  .main-content {
    padding: 60px 8px 20px;
  }

  .stats-summary-grid {
    grid-template-columns: 1fr;
  }

  .tabs-container {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1;
    min-width: 80px;
    text-align: center;
  }
}

/* New welcome and card styling */
.welcome-section-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 24px;
}

/* Callout container */
.welcome-callout {
  background: rgba(255, 165, 2, 0.08) !important;
  border-left: 4px solid #ffa502 !important;
  border-radius: var(--border-radius-sm);
  padding: 20px;
  margin-top: 15px;
}

/* Dynamic columns grid for Complete Sheets */
.welcome-sheets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 15px;
}
.welcome-sheets-column {
  background: hsla(220, 10%, 100%, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  padding: 16px;
}
.welcome-sheets-column h4 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.welcome-sheets-column ul {
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.welcome-sheets-column li {
  padding-left: 10px;
  position: relative;
}
.welcome-sheets-column li::before {
  content: '•';
  color: var(--primary);
  position: absolute;
  left: 0;
}

/* Contributors grid on welcome page */
.welcome-contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 15px;
}

.contributor-card {
  background: hsla(220, 10%, 100%, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Blog Article view styling */
.blog-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  line-height: 1.8;
}

.blog-paragraph {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: justify;
}

.blog-header {
  font-family: var(--font-header);
  font-size: 1.6rem;
  color: var(--text);
  margin-top: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.blog-image-wrapper {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.blog-image {
  max-width: 100%;
  max-height: 450px;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--border);
}

.blog-caption {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
  max-width: 80%;
}

/* Composers Breakdown Tab Layout */
.composer-breakdown-container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.stats-summary-grid div {
  background: hsla(220, 10%, 100%, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: bold;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 4px;
  background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Play button next to track titles */
.track-play-btn {
  opacity: 0.6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.track-play-btn:hover {
  opacity: 1 !important;
  color: var(--primary) !important;
  transform: scale(1.2);
}

/* Spreadsheet Link Button */
.spreadsheet-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 124, 65, 0.4) !important;
  color: white !important;
}

/* Contributor Links */
.contributor-name-link:hover {
  color: var(--accent) !important;
}



