/* ═══════════════════════════════════════════════════════════════
   GMN Browse Enhancement Styles v4 — Genre Rows + Detail + Audio Player
   Phase 3: Audio Pipeline + Responsive Overhaul — April 2026
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens (inherit from index.html :root) ── */
.gmn-genre-container,
.gmn-detail-hero,
.gmn-audio-player {
  --red: var(--gmn-red, #e63946);
  --red-hover: var(--gmn-red-hover, #ff4d5a);
  --purple: var(--gmn-purple, #8b5cf6);
  --gold: var(--gmn-gold, #f59e0b);
  --bg: var(--gmn-bg-dark, #0a0a0a);
  --surface: var(--gmn-bg-surface, #141414);
  --elevated: var(--gmn-bg-elevated, #1a1a1a);
  --text: var(--gmn-text, #e5e5e5);
  --text-muted: var(--gmn-text-muted, #999);
}

/* ── Genre Container ── */
.gmn-genre-container {
  max-width: 100%;
  padding: 40px 0 80px;
  overflow: hidden;
}

.gmn-genre-header {
  padding: 0 4%;
  margin-bottom: 32px;
}

.gmn-genre-main-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.gmn-genre-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* ── Genre Row ── */
.gmn-genre-row {
  margin-bottom: 36px;
}

.gmn-genre-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 600;
  color: #e5e5e5;
  letter-spacing: -0.3px;
}

.gmn-genre-count {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.35);
}

/* ── Track Wrapper (for arrows) ── */
.gmn-genre-track-wrapper {
  position: relative;
}

.gmn-genre-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 4%;
  margin-top: -20px;
  margin-bottom: -20px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.gmn-genre-track::-webkit-scrollbar {
  display: none;
}

/* ── Scroll Arrows ── */
.gmn-genre-arrow {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.gmn-genre-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.gmn-genre-arrow-left {
  left: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, transparent 100%);
  padding-left: 8px;
}

.gmn-genre-arrow-right {
  right: 0;
  background: linear-gradient(to left, rgba(0,0,0,0.8) 0%, transparent 100%);
  padding-right: 8px;
}

/* ── Series Card ── */
.gmn-genre-card {
  flex: 0 0 auto;
  width: 185px;
  text-decoration: none;
  color: #fff;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, z-index 0s 0.25s;
  position: relative;
}

.gmn-genre-card:hover {
  transform: scale(1.35);
  z-index: 20;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s ease, box-shadow 0.25s ease, z-index 0s;
}

.gmn-card-poster {
  width: 100%;
  height: 278px;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: #1a1a2e;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
}

.gmn-card-poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, #16213e 0%, #0f3460 50%, #1a1a2e 100%);
  z-index: 0;
}

.gmn-poster-loaded .gmn-card-poster-fallback {
  display: none;
}

.gmn-poster-missing .gmn-card-poster-fallback {
  display: flex;
}

/* ── Card Badge ── */
.gmn-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 5;
}

.gmn-badge-original {
  background: #e63946;
  color: #fff;
}

.gmn-badge-new {
  background: #2ec4b6;
  color: #000;
}

.gmn-badge-soon {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ── Card Overlay (title on hover) ── */
.gmn-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.65) 55%, transparent 100%);
  opacity: 1;
  transition: opacity 0.25s ease;
}

.gmn-genre-card:hover .gmn-card-overlay {
  opacity: 1;
}

.gmn-card-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.gmn-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gmn-card-genre {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
}

.gmn-card-eps {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

/* ── iRunReality Nav Link ── */
#gmn-nav-reality {
  position: relative;
}

#gmn-nav-reality span {
  background: linear-gradient(135deg, #e63946, #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700 !important;
}

#gmn-nav-reality::after {
  content: 'NEW';
  position: absolute;
  top: -8px;
  right: -16px;
  font-size: 8px;
  background: #e63946;
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ═══════════════════════════════════════════════
   SERIES DETAIL PAGE (for non-bundled series)
   ═══════════════════════════════════════════════ */

#gmn-series-detail {
  min-height: 100vh;
  background: #0a0a0a;
}

/* ── Hero Section ── */
.gmn-detail-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.gmn-detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: blur(30px) brightness(0.3);
  transform: scale(1.1);
}

.gmn-detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(10,10,10,0.3) 0%,
    rgba(10,10,10,0.6) 50%,
    rgba(10,10,10,1) 100%);
}

.gmn-detail-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 40px;
  padding: 80px 6% 60px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Poster ── */
.gmn-detail-poster-wrap {
  flex: 0 0 auto;
}

.gmn-detail-poster {
  width: 280px;
  height: 420px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* ── Info Section ── */
.gmn-detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.gmn-detail-title {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -1px;
}

.gmn-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gmn-detail-badge {
  background: linear-gradient(135deg, #e63946, #c0392b);
  color: #fff;
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.gmn-detail-rating {
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.gmn-detail-genre {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}

.gmn-detail-eps {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

.gmn-detail-desc {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 8px 0;
}

.gmn-detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.gmn-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.gmn-detail-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.gmn-detail-btn-browse {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.gmn-detail-btn-browse:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.gmn-detail-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.gmn-detail-cat-pill {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── Episodes Section ── */
.gmn-detail-episodes {
  padding: 40px 6% 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.gmn-detail-episodes-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.gmn-detail-episodes-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  margin: 0 0 24px;
}

.gmn-detail-episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gmn-detail-ep-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 20px;
  transition: background 0.2s;
}

.gmn-detail-ep-card:hover {
  background: rgba(255,255,255,0.07);
}

.gmn-detail-ep-number {
  font-size: 12px;
  font-weight: 600;
  color: #e63946;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.gmn-detail-ep-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-bottom: 8px;
}

.gmn-detail-ep-status {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════
   HERO / FEATURED SECTION
   ═══════════════════════════════════════════════════════════════════ */
.gmn-hero-section {
  position: relative;
  min-height: 420px;
  background-size: cover;
  background-position: center 20%;
  margin-bottom: 16px;
  overflow: hidden;
}
.gmn-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #0a0a0a 0%, rgba(10,10,10,0.85) 40%, rgba(10,10,10,0.3) 100%);
}
.gmn-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 6% 60px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
}
.gmn-hero-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #e63946;
  margin-bottom: 12px;
}
.gmn-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.1;
  max-width: 600px;
}
.gmn-hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: #a3a3a3;
  max-width: 500px;
  margin: 0 0 20px;
}
.gmn-hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.gmn-hero-pill {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.gmn-hero-pill-genre {
  background: rgba(139,92,246,0.3);
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,0.4);
}
.gmn-hero-pill-eps {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.1);
}
.gmn-hero-actions {
  display: flex;
  gap: 12px;
}
.gmn-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.gmn-hero-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.gmn-hero-btn-primary {
  background: linear-gradient(135deg, #e63946, #c0392b);
  color: #fff;
}
.gmn-hero-btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}
.gmn-hero-dots {
  position: absolute;
  bottom: 20px;
  right: 6%;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.gmn-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  border: none;
}
.gmn-hero-dot.active {
  background: #e63946;
  transform: scale(1.2);
}

/* ═══════════════════════════════════════════════════════════════════
   CONTINUE READING ROW
   ═══════════════════════════════════════════════════════════════════ */
.gmn-continue-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 4% 16px;
}
.gmn-continue-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.gmn-continue-title::before {
  content: '📖';
}
.gmn-continue-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.gmn-continue-card {
  min-width: 300px;
  max-width: 360px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 16px;
  text-decoration: none;
  color: #e5e5e5;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.gmn-continue-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
}
.gmn-continue-poster {
  width: 60px;
  height: 90px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.gmn-continue-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.gmn-continue-series {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gmn-continue-ep {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.gmn-continue-progress {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: auto;
}
.gmn-continue-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #e63946, #8b5cf6);
  border-radius: 2px;
  transition: width 0.3s;
}

/* ═══════════════════════════════════════════════════════════════════
   READING PROGRESS BAR (Episode Pages)
   ═══════════════════════════════════════════════════════════════════ */
.gmn-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 99999;
  background: rgba(255,255,255,0.05);
}
.gmn-reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #e63946, #8b5cf6);
  width: 0%;
  transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════════════════════════════
   READING CONTROLS PANEL (Episode Pages)
   ═══════════════════════════════════════════════════════════════════ */
.gmn-reading-controls {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.gmn-rc-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20,20,20,0.95);
  border: 1px solid rgba(255,255,255,0.15);
  color: #a3a3a3;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.gmn-rc-toggle:hover {
  background: rgba(40,40,40,0.95);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.gmn-rc-panel {
  background: rgba(20,20,20,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(12px);
  display: none;
  min-width: 200px;
}
.gmn-rc-panel.open { display: block; }
.gmn-rc-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
  font-family: system-ui, sans-serif;
}
.gmn-rc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.gmn-rc-row:last-child { margin-bottom: 0; }
.gmn-rc-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #a3a3a3;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: system-ui, sans-serif;
}
.gmn-rc-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.gmn-rc-value {
  font-size: 14px;
  color: #e5e5e5;
  min-width: 36px;
  text-align: center;
  font-family: system-ui, sans-serif;
}
.gmn-rc-bookmark {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.25);
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: system-ui, sans-serif;
  text-align: center;
}
.gmn-rc-bookmark:hover {
  background: rgba(139,92,246,0.2);
  color: #ddd6fe;
}
.gmn-rc-bookmark.bookmarked {
  background: rgba(139,92,246,0.25);
  color: #a78bfa;
}

/* ═══════════════════════════════════════════════════════════════════
   ENHANCED EPISODE LIST (Series Detail)
   ═══════════════════════════════════════════════════════════════════ */
.gmn-ep-card-enhanced {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  text-decoration: none;
  color: #e5e5e5;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.gmn-ep-card-enhanced:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}
.gmn-ep-card-enhanced .gmn-ep-read-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #22c55e;
  opacity: 0;
  transition: opacity 0.2s;
}
.gmn-ep-card-enhanced.read .gmn-ep-read-indicator {
  opacity: 1;
}
.gmn-ep-card-num {
  font-size: 14px;
  font-weight: 700;
  color: #737373;
  min-width: 32px;
}
.gmn-ep-card-enhanced.read .gmn-ep-card-num {
  color: #22c55e;
}
.gmn-ep-card-body {
  flex: 1;
  min-width: 0;
}
.gmn-ep-card-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2px;
}
.gmn-ep-card-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  display: flex;
  gap: 12px;
}
.gmn-ep-card-arrow {
  color: rgba(255,255,255,0.2);
  font-size: 18px;
  transition: color 0.2s;
}
.gmn-ep-card-enhanced:hover .gmn-ep-card-arrow {
  color: rgba(255,255,255,0.5);
}

/* ═══════════════════════════════════════════════════════════════════
   SKELETON LOADING STATES
   ═══════════════════════════════════════════════════════════════════ */
@keyframes gmn-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.gmn-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: gmn-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
.gmn-skeleton-card {
  width: 185px;
  height: 278px;
  border-radius: 6px;
  flex-shrink: 0;
}
.gmn-skeleton-hero {
  height: 420px;
  width: 100%;
  border-radius: 0;
}
.gmn-skeleton-line {
  height: 14px;
  margin-bottom: 8px;
}
.gmn-skeleton-line.short { width: 60%; }
.gmn-skeleton-line.medium { width: 80%; }

/* ═══════════════════════════════════════════════════════════════════
   SCROLL TO TOP BUTTON
   ═══════════════════════════════════════════════════════════════════ */
.gmn-scroll-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20,20,20,0.95);
  border: 1px solid rgba(255,255,255,0.15);
  color: #a3a3a3;
  font-size: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 9999;
  backdrop-filter: blur(8px);
}
.gmn-scroll-top.visible { display: flex; }
.gmn-scroll-top:hover {
  background: rgba(40,40,40,0.95);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .gmn-genre-card {
    width: 140px;
  }
  .gmn-card-poster {
    height: 210px;
  }
  .gmn-genre-row-title {
    font-size: 17px;
  }
  .gmn-genre-main-title {
    font-size: 22px;
  }
  .gmn-genre-arrow {
    width: 36px;
  }
  .gmn-genre-card:hover {
    transform: scale(1.15);
  }

  /* Detail page responsive */
  .gmn-detail-hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 5% 40px;
    gap: 24px;
  }
  .gmn-detail-poster {
    width: 200px;
    height: 300px;
  }
  .gmn-detail-title {
    font-size: 28px;
  }
  .gmn-detail-meta {
    justify-content: center;
  }
  .gmn-detail-desc {
    text-align: center;
  }
  .gmn-detail-actions {
    justify-content: center;
  }
  .gmn-detail-categories {
    justify-content: center;
  }

  /* Hero responsive */
  .gmn-hero-section { min-height: 320px; }
  .gmn-hero-content { min-height: 320px; padding: 60px 5% 40px; }
  .gmn-hero-desc { font-size: 14px; }
  .gmn-hero-actions { flex-direction: column; gap: 8px; }
  .gmn-hero-btn { text-align: center; justify-content: center; }
  .gmn-hero-dots { right: 5%; bottom: 16px; }

  /* Continue reading responsive */
  .gmn-continue-card { min-width: 260px; }

  /* Reading controls responsive */
  .gmn-reading-controls { bottom: 16px; right: 16px; }
}

@media (max-width: 480px) {
  .gmn-genre-card {
    width: 120px;
  }
  .gmn-card-poster {
    height: 180px;
  }
  .gmn-card-badge {
    font-size: 8px;
    padding: 1px 5px;
  }
  .gmn-genre-row-title {
    font-size: 15px;
  }
  .gmn-genre-container {
    padding: 24px 0 40px;
  }
  .gmn-genre-row {
    margin-bottom: 24px;
  }
  .gmn-detail-poster {
    width: 160px;
    height: 240px;
  }
  .gmn-detail-title {
    font-size: 22px;
  }
  .gmn-detail-episode-grid {
    grid-template-columns: 1fr;
  }

  /* Hero small */
  .gmn-hero-section { min-height: 280px; }
  .gmn-hero-content { min-height: 280px; padding: 48px 4% 32px; }
  .gmn-hero-title { font-size: 1.5rem; }

  /* Continue reading small */
  .gmn-continue-card { min-width: 240px; padding: 12px; }
  .gmn-continue-poster { width: 48px; height: 72px; }
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 3: Audio Player Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Audio Badge (Episode Meta) ── */
.gmn-audio-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.gmn-audio-badge-sm {
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 600;
}

/* ── Audio Player Container ── */
.gmn-audio-player {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px;
}

.gmn-audio-player > div:first-child,
.gmn-audio-player .gmn-audio-header {
  background: linear-gradient(135deg, rgba(139,92,246,0.12) 0%, rgba(59,130,246,0.08) 100%);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: -20px;
  position: relative;
  z-index: 3;
}

.gmn-audio-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.gmn-audio-icon {
  font-size: 24px;
}

.gmn-audio-label {
  font-size: 16px;
  font-weight: 700;
  color: #e5e5e5;
  font-family: system-ui, -apple-system, sans-serif;
}

.gmn-audio-narrator {
  font-size: 12px;
  color: #8b8b8b;
  font-family: system-ui, sans-serif;
  margin-left: auto;
}

/* ── Audio Controls Row ── */
.gmn-audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  padding: 12px 16px;
}

/* ── Play Button ── */
.gmn-audio-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.gmn-audio-play:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.8);
  color: #fff;
  transform: scale(1.05);
}

.gmn-audio-play.playing {
  background: rgba(139, 92, 246, 0.25);
  border-color: #8b5cf6;
  color: #fff;
  animation: gmn-pulse 2s ease-in-out infinite;
}

@keyframes gmn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(139,92,246,0); }
}

/* ── Progress Bar ── */
.gmn-audio-progress-wrap {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.gmn-audio-progress-bg {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.gmn-audio-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8b5cf6, #6366f1);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.gmn-audio-progress-wrap:hover .gmn-audio-progress-bg {
  height: 8px;
}

.gmn-audio-timestamps {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #737373;
  font-family: system-ui, monospace;
  margin-top: 4px;
  padding: 0 2px;
}

/* ── Speed Button ── */
.gmn-audio-speed-wrap {
  flex-shrink: 0;
}

.gmn-audio-speed {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #a3a3a3;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: system-ui, monospace;
  transition: all 0.2s;
  white-space: nowrap;
}

.gmn-audio-speed:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ── Volume ── */
.gmn-audio-vol-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.gmn-audio-vol-btn {
  background: none;
  border: none;
  color: #a3a3a3;
  font-size: 18px;
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s;
}

.gmn-audio-vol-btn:hover {
  color: #fff;
}

.gmn-audio-vol {
  -webkit-appearance: none;
  appearance: none;
  width: 60px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.gmn-audio-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8b5cf6;
  cursor: pointer;
}

.gmn-audio-vol::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8b5cf6;
  cursor: pointer;
  border: none;
}

/* ── Audio Player Responsive ── */
@media (max-width: 640px) {
  .gmn-audio-controls {
    flex-wrap: wrap;
    gap: 8px;
  }
  .gmn-audio-play {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .gmn-audio-vol-wrap {
    display: none;
  }
  .gmn-audio-narrator {
    display: none;
  }
  .gmn-audio-progress-wrap {
    order: 10;
    flex-basis: 100%;
  }
}

/* ── Large Screens (1200px+) ── */
@media (min-width: 1200px) {
  .gmn-genre-card { width: 200px; }
  .gmn-card-poster { height: 300px; }
  .gmn-genre-main-title { font-size: 32px; }
  .gmn-genre-row-title { font-size: 22px; }
  .gmn-detail-hero-content { padding: 60px 6% 50px; gap: 40px; }
  .gmn-detail-poster { width: 280px; height: 420px; }
  .gmn-detail-title { font-size: 42px; }
  .gmn-detail-episode-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Ultra-wide (1600px+) ── */
@media (min-width: 1600px) {
  .gmn-genre-card { width: 220px; }
  .gmn-card-poster { height: 330px; }
  .gmn-genre-container { max-width: 1800px; margin: 0 auto; }
  .gmn-detail-episode-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── 4K (2560px+) ── */
@media (min-width: 2560px) {
  .gmn-genre-container { max-width: 2200px; }
  .gmn-genre-card { width: 260px; }
  .gmn-card-poster { height: 390px; }
  .gmn-genre-main-title { font-size: 36px; }
  .gmn-detail-hero-content { max-width: 2200px; margin: 0 auto; }
}

/* ── Touch device optimizations ── */
@media (hover: none) and (pointer: coarse) {
  .gmn-genre-card:hover { transform: none; }
  .gmn-genre-arrow { display: none !important; }
  .gmn-audio-play { width: 48px; height: 48px; }
  .gmn-audio-speed { padding: 8px 14px; font-size: 14px; }
}

/* ── Safe area for notched phones ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .gmn-scroll-top { bottom: calc(24px + env(safe-area-inset-bottom)); }
  .gmn-reading-controls { bottom: calc(24px + env(safe-area-inset-bottom)); }
}
