/* ===== 1. YOUR DESIGN DECISIONS (Session 3) ===== */
:root {
  --bg: #0A0A0D;        /* black background */
  --surface: #16161B;   /* slightly lighter black for cards */
  --line: #2A2A30;      /* thin borders, empty bar */
  --pearl: #EDEDF0;     /* buttons, headings */
  --silver: #C4C4CC;    /* bars, highlights */
  --smoke: #9E9EA8;     /* small supporting text */
  --urgent: #E5484D;    /* ENDING TODAY badge only */

  --font-heading: "Montserrat", sans-serif;
  --font-body: "Inter", sans-serif;
  --radius: 12px;
}

/* ===== 2. BASICS ===== */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--pearl);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: var(--pearl); }

main {
  max-width: 720px;   /* keeps it readable on big screens */
  margin: 0 auto;
  padding: 16px;
}

h1, h2 { font-family: var(--font-heading); margin: 0; }

/* ===== 3. HEADER ===== */
/* Phone first: logo on top, swipeable menu row underneath */
.site-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 0;
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
  letter-spacing: 1px;
}

.menu {
  display: flex;
  gap: 4px;
  margin: 8px -16px 0;          /* row reaches the screen edges */
  padding: 0 12px;
  overflow-x: auto;             /* swipe sideways if it doesn't fit */
  scrollbar-width: none;        /* hide the scrollbar (Firefox) */
}
.menu::-webkit-scrollbar { display: none; } /* hide it (Chrome, Safari) */

.menu a {
  flex-shrink: 0;               /* never squash a link */
  white-space: nowrap;          /* "Stream guide" stays on one line */
  color: var(--smoke);
  text-decoration: none;

  font-size: 14px;
  padding: 10px 8px 12px;       /* big enough to tap with a thumb */
  border-bottom: 2px solid transparent;
}

.menu a:hover { color: var(--pearl); }

.menu a.active {
  color: var(--pearl);
  font-weight: 600;
  border-bottom-color: var(--pearl); /* underline like app tabs */
}

/* Wider screens: logo and menu side by side */
@media (min-width: 640px) {
  .site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
  }
  .menu { margin: 0; padding: 0; }
}

/* ===== 4. BANNER ===== */
.btn {
  display: inline-block;
  background: var(--pearl);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 8px;
}

.btn:hover { background: var(--silver); }

.countdown { color: var(--smoke); font-size: 14px; margin: 12px 0 0; }

/* ===== 5. QUICK LINKS (2 x 2 grid) ===== */
.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
}

.card:hover { border-color: var(--silver); }

/* ===== 6. GOAL CARD ===== */
.goal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.goal h2 { font-size: 18px; margin-bottom: 12px; }

.bar {
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill { height: 100%; background: var(--silver); }

.goal-meta { color: var(--smoke); font-size: 14px; margin: 8px 0 0; }

/* ===== 7. FOOTER ===== */
.site-footer {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 24px 16px;
  border-top: 1px solid var(--line);
  color: var(--smoke);
  font-size: 13px;
  text-align: center;
}

.site-footer a { color: var(--silver); }

/* ===== 8. INNER PAGES ===== */
.page-title { font-size: 28px; margin-top: 8px; }

.page-intro { color: var(--smoke); margin: 4px 0 20px; }

.placeholder {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  color: var(--smoke);
}

/* ===== 9. VOTING PAGE ===== */
.vote-list {
  display: grid;
  gap: 16px;
}

.vote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.vote-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.vote-platform {
  color: var(--smoke);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.badge {
  background: var(--urgent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;

  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
}

.vote-card h2 {
  font-size: 24px;
  text-transform: uppercase;
}

.vote-category {
  color: var(--silver);
  margin: 4px 0 16px;
}

.vote-countdown {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  font-variant-numeric: tabular-nums; /* digits stay still while ticking */
}

.vote-local {
  color: var(--smoke);
  font-size: 13px;
  margin: 4px 0 20px;
}

.vote-btn {
  display: block;
  text-align: center;

  font-size: 18px;
  letter-spacing: 1px;
  padding: 16px;
}

.vote-tip {
  color: var(--smoke);
  font-size: 14px;
  margin: 16px 0 0;
}

/* Keyboard users can see where they are */
a:focus-visible {
  outline: 2px solid var(--silver);
  outline-offset: 3px;
}

/* ===== 10. GOALS PAGE ===== */
.goal-list {
  display: grid;
  gap: 16px;
}

.goal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  overflow: hidden;
}

.goal-img {
  display: block;
  width: calc(100% + 40px);   /* stretch past the card padding */
  margin: -24px -20px 16px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.goal-platform {
  color: var(--smoke);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 8px;
}

.goal-card h2 { font-size: 22px; }


.goal-numbers {
  margin: 12px 0;
  font-variant-numeric: tabular-nums;
}

.goal-numbers strong {
  font-family: var(--font-heading);
  font-size: 26px;
}

.goal-numbers span { color: var(--smoke); }

.goal-card .bar { height: 10px; border-radius: 5px; }

.goal-meta-row {
  display: flex;
  justify-content: space-between;
  color: var(--silver);
  font-size: 14px;
  margin-top: 8px;
}

.goal-countdown {
  color: var(--smoke);
  font-size: 14px;
  margin: 12px 0 0;
  font-variant-numeric: tabular-nums;
}

/* A finished goal gets a pearl outline and a full pearl bar */
.goal-card.reached { border-color: var(--pearl); }
.goal-card.reached .bar-fill { background: var(--pearl); }

/* ===== 11. STREAM GUIDE ===== */
.section-title { font-size: 20px; margin: 28px 0 12px; }
.group-title { color: var(--smoke); font-size: 13px; text-transform: uppercase; letter-spacing: 2px; margin: 16px 0 8px; }

.tips {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.tips h2 { font-size: 18px; }
.tips ul { margin: 12px 0 0; padding-left: 20px; color: var(--silver); }
.tips li { margin-bottom: 6px; }

.link-list { display: grid; gap: 8px; }

.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
}
.link-row:hover { border-color: var(--silver); }
.link-row small { display: block; color: var(--smoke); font-size: 13px; }

.link-tag {
  flex-shrink: 0;

  font-size: 12px;
  color: var(--bg);
  background: var(--silver);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ===== 12. YOUTUBE PAGE ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;              /* swipe if it doesn't fit */
  scrollbar-width: none;
  margin-bottom: 16px;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  flex-shrink: 0;
  font: inherit;                 /* buttons don't use the page font by default */
  font-size: 14px;
  color: var(--smoke);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;          /* pill shape */
  padding: 8px 16px;
  cursor: pointer;
}
.filter-tab:hover { color: var(--pearl); border-color: var(--silver); }

.filter-tab.active {
  color: var(--bg);
  background: var(--pearl);
  border-color: var(--pearl);
  font-weight: 600;
}

.filter-tab:focus-visible {
  outline: 2px solid var(--silver);

  outline-offset: 3px;
}

.video-list { display: grid; gap: 12px; }

.video-card {
  display: grid;
  grid-template-columns: 128px 1fr;  /* thumbnail | info */
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  text-decoration: none;
}
.video-card:hover { border-color: var(--silver); }

.video-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;             /* trims YouTube's black bars */
  border-radius: 8px;
  background: var(--line);       /* grey box while the image loads */
}

.video-info { min-width: 0; }    /* lets long titles shrink instead of overflowing */

.video-type {
  color: var(--smoke);
  font-size: 11px;
  text-transform: uppercase;

  letter-spacing: 2px;
}

.video-info h2 {
  font-size: 15px;
  line-height: 1.3;
  margin: 2px 0 6px;
  overflow: hidden;
  display: -webkit-box;          /* cut long titles after 2 lines with … */
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-views {
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: var(--smoke);
  font-size: 13px;
}
.video-views strong {
  color: var(--pearl);
  font-family: var(--font-heading);
  font-size: 17px;
}

.video-gain {
  margin: 2px 0 0;
  color: var(--silver);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}


.last-updated {
  color: var(--smoke);
  font-size: 13px;
  text-align: center;
  margin-top: 16px;
}

/* Bigger thumbnails on wider screens */
@media (min-width: 640px) {
  .video-card { grid-template-columns: 200px 1fr; }
  .video-info h2 { font-size: 17px; }
}

/* ===== 13. SPOTIFY PAGE ===== */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 8px;
}

.chart-label {
  color: var(--smoke);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

.chart-latest {
  margin: 4px 0 16px;
  color: var(--smoke);
  font-variant-numeric: tabular-nums;
}
.chart-latest strong {
  color: var(--pearl);
  font-family: var(--font-heading);
  font-size: 26px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;      /* bars grow up from the bottom */
  gap: 4px;
  height: 140px;
  border-bottom: 1px solid var(--line);
}

.chart-bar {
  flex: 1;                    /* every bar gets an equal share of the width */
  max-width: 40px;
  background: var(--silver);
  opacity: 0.55;
  border-radius: 3px 3px 0 0;
}
.chart-bar.latest {
  background: var(--pearl);
  opacity: 1;                 /* the newest day stands out */
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  color: var(--smoke);
  font-size: 12px;
  margin-top: 6px;
}

.stat-list { display: grid; gap: 8px; }

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
}
a.stat-row:hover { border-color: var(--silver); }

.stat-row small {
  display: block;
  color: var(--smoke);
  font-size: 12px;
}

.stat-numbers {
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.stat-numbers strong {
  font-family: var(--font-heading);
  font-size: 17px;
}

/* ===== 14. HOME CAROUSEL ===== */
.carousel { margin-bottom: 16px; }

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;   /* swipes always land on a whole slide */
  scrollbar-width: none;
  border-radius: var(--radius);
}
.carousel-track::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 100%;                  /* each slide is exactly one screen wide */
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 300px;               /* all slides the same height */
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
}

.slide-label {
  color: var(--smoke);
  font-size: 12px;
  text-transform: uppercase;

  letter-spacing: 2px;
  margin: 0 0 4px;
}
.slide-label .badge { margin-left: 6px; vertical-align: middle; }

.slide h2 {
  font-size: 30px;
  text-transform: uppercase;
  line-height: 1.15;
}

.slide-sub {
  color: var(--silver);
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}

.slide .bar {
  width: 100%;
  max-width: 320px;
  height: 10px;
  margin: 8px 0;
}

.slide .btn { margin-top: 16px; }

.slide-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}


.btn-secondary {
  background: transparent;
  color: var(--pearl);
  border: 1px solid var(--pearl);
}
.btn-secondary:hover { background: var(--surface); color: var(--pearl); }

.slide-countdown {
  color: var(--smoke);
  font-size: 14px;
  margin: 12px 0 0;
  font-variant-numeric: tabular-nums;
}

/* Dots: the button is a big tap area, the visible dot is drawn inside it */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
}
.dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  transition: width 0.2s;
}
.dot.active::before { width: 20px; background: var(--pearl); }
.dot:focus-visible { outline: 2px solid var(--silver); outline-offset: 2px; border-radius: 6px; }

/* Comeback countdown card */
.comeback {
  background: var(--surface);
  border: 1px solid var(--pearl);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
  text-align: center;
}
.comeback h2 { font-size: 22px; text-transform: uppercase; }
.comeback-timer {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 30px;
  margin: 8px 0 4px;
  font-variant-numeric: tabular-nums;
}

/* Respect the "reduce motion" phone setting */
@media (prefers-reduced-motion: reduce) {
  .dot::before { transition: none; }

}