/* ==========================================================================
   RESCENE Streaming Support - Pastel Light Glassmorphism Stylesheet
   Matched with RESCENE Sound Chart Tracker (chart/style.css)
   ========================================================================== */

:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;

  --ink: #0f172a;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --accent-purple: #7c3aed;
  --accent-purple-light: rgba(124, 58, 237, 0.1);
  --accent-purple-border: rgba(124, 58, 237, 0.25);
  --accent-cyan: #0284c7;

  --melon-green: #05c93c;
  --genie-blue: #00a2ff;

  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(15, 23, 42, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-main: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
}

/* Reset & Basic Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  color: var(--ink);
  min-height: 100vh;
  background-color: #f3f4f6;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(219, 234, 254, 0.6) 0%, transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(252, 231, 243, 0.5) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(220, 252, 231, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 20% 60%, rgba(243, 232, 255, 0.5) 0%, transparent 40%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 3rem;
}

/* Noise overlay matching chart page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.012;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3e%3cfilter id='noise'%3e%3cfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3e%3c/filter%3e%3crect width='100%25' height='100%25' filter='url(%23noise)'/%3e%3c/svg%3e");
}

/* Glassmorphism Container Utility */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-main);
  border-radius: var(--radius-lg);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
}

/* ==========================================================================
   Header Section
   ========================================================================== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-accent {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-purple);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.2);
}

.logo-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.system-time {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-purple);
  background: var(--accent-purple-light);
  border: 1px solid var(--accent-purple-border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

/* Global Navigation Menu Drawer */
.menu-wrap {
  position: relative;
}

.menu-wrap details summary {
  list-style: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.menu-wrap details summary::-webkit-details-marker {
  display: none;
}

.menu-wrap details summary::before {
  content: '\f0c9';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1rem;
  color: var(--ink);
}

.menu-wrap details[open] summary::before {
  content: '\f00d';
}

.menu-panel {
  position: absolute;
  top: 48px;
  right: 0;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 8px 6px;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.12);
  z-index: 999;
}

.menu-cat-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 12px 2px 12px;
}

.menu-panel a {
  display: block;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.menu-panel a:hover {
  background: var(--accent-purple-light);
  color: var(--accent-purple);
}

.menu-divider {
  border: 0;
  height: 1px;
  background: var(--glass-border);
  margin: 4px 8px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-card {
  padding: 1.75rem 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.badge-gallery {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-purple);
  background: var(--accent-purple-light);
  border: 1px solid var(--accent-purple-border);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.title-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.main-title-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.2);
}

.main-title-text {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.desc-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.warning-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e11d48;
  margin-bottom: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.update-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

/* Bill Link Button */
.bill-btn-wrap {
  margin-bottom: 1.25rem;
}

.bill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
  transition: all 0.25s ease;
}

.bill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.bill-btn img {
  width: 18px;
  height: 18px;
}

/* Mode Switcher Segment */
.copy-mode-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.copy-mode-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-right: 0.25rem;
}

.mode-toggle-group {
  display: inline-flex;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid var(--glass-border);
  padding: 4px;
  border-radius: var(--radius-full);
}

.mode-btn {
  padding: 0.4rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #6366f1 100%);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ==========================================================================
   Collapsible Streaming Box
   ========================================================================== */
.streaming-box {
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.streaming-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease;
}

.streaming-box-header:hover {
  background: rgba(255, 255, 255, 0.85);
}

.box-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.box-title-icon {
  font-size: 1.25rem;
  color: var(--accent-purple);
}

.box-title-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
}

.box-title-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-left: 0.4rem;
}

.toggle-arrow {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.streaming-box.open .toggle-arrow {
  transform: rotate(180deg);
  color: var(--accent-purple);
}

.streaming-box-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  padding: 0 1.25rem;
}

.streaming-box.open .streaming-box-body {
  max-height: 400px;
  padding: 1.25rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.3);
}

.streaming-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

@media (max-width: 540px) {
  .streaming-grid {
    grid-template-columns: 1fr;
  }
}

.stream-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
  cursor: pointer;
}

.stream-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.stream-btn-melon-app {
  background: linear-gradient(135deg, #00c73c 0%, #00962d 100%);
  box-shadow: 0 6px 20px rgba(0, 199, 60, 0.25);
}
.stream-btn-melon-app:hover {
  background: linear-gradient(135deg, #00e645 0%, #00b336 100%);
  transform: translateY(-2px);
}

.stream-btn-melon-pc {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}
.stream-btn-melon-pc:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  transform: translateY(-2px);
}

.stream-btn-genie-app {
  background: linear-gradient(135deg, #00a2ff 0%, #0070f3 100%);
  box-shadow: 0 6px 20px rgba(0, 162, 255, 0.25);
}
.stream-btn-genie-app:hover {
  background: linear-gradient(135deg, #33b5ff 0%, #1a82ff 100%);
  transform: translateY(-2px);
}

.stream-btn-genie-ios {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}
.stream-btn-genie-ios:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  transform: translateY(-2px);
}

/* ==========================================================================
   Timeline / Schedule Section
   ========================================================================== */
.schedule-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 1rem;
  padding-left: 0.3rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.1rem;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-purple);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
  border: 2px solid #ffffff;
}

.timeline-line {
  width: 2px;
  flex-grow: 1;
  background: rgba(15, 23, 42, 0.08);
  margin-top: 4px;
}

.timeline-card {
  flex: 1;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.timeline-card:hover {
  transform: translateX(4px);
  border-color: rgba(124, 58, 237, 0.35);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.time-badge {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-purple);
  background: var(--accent-purple-light);
  border: 1px solid var(--accent-purple-border);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
}

.gallery-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid var(--glass-border);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
}

.gallery-badge img {
  width: 15px;
  height: 15px;
}

.song-area {
  background: rgba(248, 250, 252, 0.85);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--glass-border);
}

.song-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
  word-break: break-all;
}

.song-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.song-type-icon {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  color: #fff;
}

.type-melon {
  background: #00c73c;
}
.type-youtube {
  background: #ff0000;
}
.type-genie {
  background: #00a2ff;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: all 0.2s ease;
}

.btn-app {
  background: var(--accent-purple-light);
  color: #6d28d9;
  border-color: var(--accent-purple-border);
}
.btn-app:hover {
  background: var(--accent-purple);
  color: #fff;
}

.btn-web {
  background: rgba(241, 245, 249, 0.9);
  color: var(--text-muted);
}
.btn-web:hover {
  background: #0f172a;
  color: #fff;
}

.btn-youtube {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.25);
}
.btn-youtube:hover {
  background: #dc2626;
  color: #fff;
}

/* Toast Popup */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent-purple);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-dim);
  font-size: 0.82rem;
}

footer p {
  margin-bottom: 0.3rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}
footer a:hover {
  color: var(--accent-purple);
}
