/* ---------- Theme Variables ---------- */
:root {
  --bg: #1e2a1e;
  --box: #2c3b2c;
  --accent: #3b4b2f;
  --text: #e6efe6;
}

[data-theme="day"] {
  --bg: #e8f1e8;
  --box: #ffffff;
  --accent: #d2e6d2;
  --text: #2b3b2b;
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  cursor: url("assets/pics/cursor.png"), auto;
}

h1, h2 {
  font-family: 'IM Fell English', serif;
  margin-top: 0;
}

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

/* ---------- Layout ---------- */
.page {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

@media (min-width: 1024px) {
  .page {
    grid-template-columns: 260px 1fr 260px;
    max-width: 1200px;
    margin: auto;
  }
}

.box {
  background: var(--box);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

/* ---------- Profile ---------- */
.profile img {
  width: 10rem;
  border-radius: 12px;
}

/* ---------- Status ---------- */
/* ---- Stream Status Pill --- */

.status {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 🌙 OFFLINE — Night mode */
html[data-theme="night"] .status[data-live="false"] {
  background: rgba(40, 44, 40, 0.9);
  color: #cfd8cf;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 🌞 OFFLINE — Day mode */
html[data-theme="day"] .status[data-live="false"] {
  background: rgba(235, 240, 232, 0.95);
  color: #2a332a;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* 🔴 LIVE — Night mode */
html[data-theme="night"] .status[data-live="true"] {
  background: linear-gradient(
    135deg,
    rgba(40, 90, 60, 0.95),
    rgba(30, 65, 45, 0.95)
  );
  color: #eafff0;
  border: 1px solid rgba(120, 255, 180, 0.5);
  box-shadow:
    0 0 10px rgba(120, 255, 180, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* 🔴 LIVE — Day mode */
html[data-theme="day"] .status[data-live="true"] {
  background: linear-gradient(
    135deg,
    #b9e6c8,
    #9fd9b2
  );
  color: #16361f;
  border: 1px solid #6fbf8e;
  box-shadow: 0 0 6px rgba(80, 160, 120, 0.35);
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px rgba(120,255,180,0.25); }
  50% { box-shadow: 0 0 14px rgba(120,255,180,0.45); }
}

.status[data-live="true"] {
  animation: glow 2.5s ease-in-out infinite;
}

/* ---------- Links ---------- */
.links a {
  display: block;
  background: var(--accent);
  padding: 0.6rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  text-align: center;
  font-weight: 600;
}

/* ---------- Offline Banner ---------- */
#offline-banner {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

/* ---------- Pinned Note ---------- */
.note {
  background: var(--accent);
  /* transform: rotate(-1deg); */
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* ---------- Collapsible Sections ---------- */
.collapse-toggle {
  background: var(--accent);
  color: var(--text);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ---------- Floating Buttons ---------- */
#audio-toggle,
#theme-toggle {
  position: fixed;
  color: var(--text);
  bottom: 1rem;
  background: var(--accent);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  z-index: 1000;
}

#audio-toggle {
  right: 1rem;
}

#theme-toggle {
  right: 9rem;
}

/* ---------- Sparkles ---------- */
.sparkle {
  position: fixed;
  pointer-events: none;
  font-size: 12px;
  opacity: 0.8;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.sparkle.fade-out {
  opacity: 0;
  transform: scale(0.5);
}

/* ---------- Discord Widget ---------- */
.discord-toggle {
  width: 100%;
  color: var(--text);
  background: var(--accent);
  border: none;
  padding: 0.6rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
   display: none;
}

.discord-widget {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

/* iframe sizing */
.discord-widget iframe {
  width: 100%;
  height: 500px;
  border: 0;
}

/* ---------- Mobile Behavior ---------- */
@media (max-width: 768px) {
  .discord-widget {
    display: none;
  }

  .discord-widget.open {
    display: block;
  }

  .discord-widget iframe {
    height: 420px;
  }
  .discord-toggle {
    display: block;
  }
}

/* ---------- Top 8 ---------- */
.top8 {
  margin-top: 1.2rem;
}

.top8 h2 {
  text-align: center;
  margin-bottom: 0.6rem;
}

.top8-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.top8-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 0.4rem;
  text-align: center;
  text-decoration: none;
  font-size: 0.75rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.top8-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.25rem;
}

.top8-card span {
  display: block;
  opacity: 0.85;
}

/* hover = subtle MySpace flex */
.top8-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
