/* ===========================================
   GLOBAL STYLES - BeatByte Website
   This file contains site-wide styling rules
   =========================================== */

/* CSS Custom Properties (Variables)
   These are reusable values used throughout the site.
   Change a variable here and it updates everywhere. */
:root {
  --bg: #000000;              /* Main background color (black) */
  --panel: #000000;           /* Panel/card background color */
  --muted: #9a9a9a;           /* Gray color for secondary text */
  --accent1: #7b2ff7;         /* Primary accent - purple */
  --accent2: #ff6b6b;         /* Secondary accent - coral/red */
  --glow: 0 0 12px rgba(123, 47, 247, 0.6);  /* Purple glow effect for hover states */
  --sidebar-width: 80px;      /* Width of the left sidebar - changes on mobile */
}

/* CSS Reset
   Removes default browser styling so all browsers look the same.
   box-sizing: border-box makes width/height include padding and border. */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base body styling */
html,
body {
  height: 100%;
  background: var(--bg);
  font-family: 'Inter', sans-serif;  /* Google Font loaded in head.php */
  color: #eee;                        /* Light text for dark theme */
}

/* Main Grid Layout
   The page is divided into a CSS Grid with:
   - 2 columns: sidebar (80px) + main content (rest of space)
   - 3 rows: topbar (80px) + content (flexible) + player (80px)
   This creates the app-like layout with fixed header/footer. */
.grid-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;  /* Sidebar + remaining space */
  grid-template-rows: 80px 1fr 80px;                /* Topbar + content + player */
  height: 100vh;                                     /* Full viewport height */
  transition: grid-template-columns 0.3s ease;       /* Smooth sidebar expand/collapse */
}

/* Hidden checkbox used for sidebar toggle (hamburger menu)
   The actual toggle logic is in sidebar.css using :checked selector */
#menuToggle {
  display: none;
}

/* Main content area (right side of sidebar) */
.body-right {
  padding: 30px;
  overflow-y: auto;  /* Scroll if content is too tall */
}

/* Section headers (e.g., "New Releases", "Popular") */
.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

/* ===========================================
   RESPONSIVE BREAKPOINTS - Global Layout
   
   Breakpoints:
   - Desktop: 769px+ (full layout)
   - Tablet: 481px - 768px (compact)
   - Mobile: ≤480px (single column)
   =========================================== */

/* TABLET STYLES (screens ≤768px wide)
   Slightly smaller sidebar, reduced padding */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 60px;  /* Narrower sidebar on tablets */
  }
  
  .body-right {
    padding: 20px 15px;     /* Less padding to save space */
  }
  
  .section-title {
    font-size: 1.2rem;      /* Smaller headings */
  }
}

/* MOBILE STYLES (screens ≤480px wide)
   On phones, we show a compact icon-only sidebar.
   The sidebar width is narrower to maximize content space. */
@media (max-width: 480px) {
  :root {
    --sidebar-width: 50px;   /* Compact icon-only sidebar on mobile */
  }
  
  /* Two-column layout with narrow sidebar */
  .grid-container {
    grid-template-columns: var(--sidebar-width) 1fr;  /* Sidebar + content */
    grid-template-rows: 60px 1fr 80px;                /* Shorter topbar on mobile */
  }
  
  .body-right {
    padding: 15px 10px;
    padding-bottom: 100px;  /* Extra space at bottom so content isn't hidden by player */
  }
  
  .section-title {
    font-size: 1.1rem;
  }
}

/* Bottom left corner of grid (below sidebar)
   Usually empty or shows minimal info */
.bottom-left {
  background: #0b0b0b;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Musician modal backdrop */
#musician-modal .modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg, #070707);
  backdrop-filter: blur(4px);
  z-index: 600;
}
