/* ==========================================================================
   Android Audio Player - Material Mobile Stylesheet
   Tailored for Samsung Galaxy S25 Ultra (6.9" Quad HD+ Dynamic AMOLED 2X)
   and all Android flagships (edge-to-edge, display cutout & safe-areas)
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.35);
  --teal: #0d9488;
  --amber: #f59e0b;
  --slate-950: #090d16;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --card-bg: #ffffff;
  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-de: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Safe Area Insets for Galaxy S25 Ultra Punch Hole & Gesture Pill */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-ar);
  background: #f8fafc;
  color: var(--slate-900);
  line-height: 1.5;
  direction: rtl;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: max(100px, calc(var(--safe-bottom) + 85px)); /* Room for floating mini player on tall screen */
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: contain;
}

/* ---------------- App Top Bar ---------------- */
.app-topbar {
  background: var(--slate-900);
  color: #fff;
  padding: max(12px, var(--safe-top)) 16px 12px 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.app-branding {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-avatar {
  font-size: 1.8rem;
  background: #2563eb;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37,99,235,0.4);
}
.app-branding h1 {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}
.app-branding p {
  font-size: 0.72rem;
  color: #94a3b8;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-topbar-action {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.btn-update {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}
.btn-apk {
  background: #10b981 !important;
}
.btn-topbar-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 6px;
}
.btn-topbar-link:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ---------------- App Body & Tabs ---------------- */
.app-body {
  max-width: 600px;
  margin: 0 auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.playlist-tabs {
  display: flex;
  background: #e2e8f0;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}
.tab-btn.active {
  background: #fff;
  color: #1e3a8a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Search Box */
.search-wrap {
  width: 100%;
}
.search-box {
  background: #fff;
  border: 1.5px solid var(--slate-200);
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.88rem;
  font-family: inherit;
}
.clear-search-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
}

/* Settings Strip */
.settings-strip {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
}
.strip-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.voice-picker {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.75rem;
  max-width: 150px;
  font-family: inherit;
}
.speed-chips {
  display: flex;
  gap: 4px;
}
.speed-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.speed-chip.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* ---------------- Track List ---------------- */
.track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-card {
  background: #fff;
  border: 1.5px solid var(--slate-200);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.track-card:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}
.track-card.active-playing {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(37,99,235,0.15);
}

.track-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.track-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  overflow: hidden;
}
.track-num-badge {
  width: 32px;
  height: 32px;
  background: #f1f5f9;
  color: #1e40af;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.track-card.active-playing .track-num-badge {
  background: #2563eb;
  color: #fff;
}
.track-texts {
  overflow: hidden;
}
.track-title-de {
  font-family: var(--font-de);
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
  direction: ltr;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-title-ar {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.7rem;
  color: #94a3b8;
}

.track-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-fav-star {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #cbd5e1;
  cursor: pointer;
  padding: 4px;
}
.btn-fav-star.is-fav {
  color: #f59e0b;
}
.btn-quick-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
}
.track-card.active-playing .btn-quick-play {
  background: #2563eb;
  color: #fff;
}

/* Inline Expandable Vocab Card */
.track-vocab-btn-row {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
  border-top: 1px dashed #e2e8f0;
}
.btn-toggle-vocab-card {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e3a8a;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  transition: all 0.2s ease;
}
.btn-toggle-vocab-card:hover, .btn-toggle-vocab-card.is-open {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.track-card-vocab-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}
.panel-section-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #2563eb;
  display: flex;
  align-items: center;
  gap: 4px;
}
.panel-chips-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.adj-pill {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  line-height: 1.3;
}
.adj-pill-de {
  font-weight: 700;
  color: #1e40af;
  direction: ltr;
  display: inline-block;
}
.adj-pill-ar {
  color: #64748b;
  font-size: 0.68rem;
}
.adj-pill-comp {
  color: #b45309;
  font-size: 0.68rem;
  font-weight: 700;
  direction: ltr;
}
.vocab-pill {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
}
.grammar-focus-tip {
  background: #fef3c7;
  border-right: 3px solid #f59e0b;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 0.72rem;
  color: #92400e;
  line-height: 1.4;
}

/* Inline Card Weil Exam Dialogue Preview */
.card-weil-dialogue-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
}
.card-weil-line {
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8fafc;
  border-left: 3px solid #f59e0b;
}
.card-weil-line.line-b {
  border-left-color: #3b82f6;
  background: #f0fdf4;
}
.card-weil-speaker {
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 2px;
}
.card-weil-speaker.speaker-a {
  color: #d97706;
}
.card-weil-speaker.speaker-b {
  color: #2563eb;
}
.card-weil-de {
  font-family: var(--font-de);
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  direction: ltr;
  text-align: left;
}
.card-weil-ar {
  font-size: 0.72rem;
  color: #475569;
  margin-top: 2px;
}
.card-weil-pattern {
  display: inline-block;
  font-size: 0.68rem;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
  direction: ltr;
  text-align: left;
}

/* ---------------- Mini Player Bar (Sticky Bottom) ---------------- */
.mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
  cursor: pointer;
  padding-bottom: max(10px, var(--safe-bottom));
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  border-top: 1px solid rgba(255,255,255,0.1);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mini-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.15);
}
.mini-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.2s ease;
}

.mini-player-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mini-track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  flex: 1;
}
.mini-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(30,58,138,0.5);
}
.mini-title {
  font-family: var(--font-de);
  font-weight: 800;
  font-size: 0.96rem;
  direction: ltr;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.mini-subtitle {
  font-size: 0.74rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mini-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 1.2rem;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mini-btn-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2563eb;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(37,99,235,0.5);
  transition: transform 0.15s ease;
}
.mini-btn-play:active {
  transform: scale(0.92);
}

/* ---------------- Fullscreen Android Modal Player (Galaxy S25 Ultra Optimized) ---------------- */
.full-player-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  background: #090d16; /* Pure deep AMOLED black for Galaxy S25 Ultra */
  color: #fff;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: max(12px, var(--safe-top));
  padding-bottom: max(18px, var(--safe-bottom));
  padding-left: max(14px, var(--safe-left));
  padding-right: max(14px, var(--safe-right));
  animation: fullSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fullSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.full-player-inner {
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  gap: 8px;
}

/* Header */
.full-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
}
.full-btn-close, .full-btn-timer {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.full-header-title {
  text-align: center;
  overflow: hidden;
}
.full-album-badge {
  font-size: 0.7rem;
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
}
.full-header-title h2 {
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
}

/* Visual Topic Hero Bubble */
.full-hero-visual {
  background: linear-gradient(135deg, rgba(30,58,138,0.4) 0%, rgba(15,23,42,0.6) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 16px 20px;
  text-align: center;
  margin: 10px 0;
}
.hero-topic-bubble {
  font-family: var(--font-de);
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  direction: ltr;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-topic-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 4px;
}

.dialogue-mode-switch-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.mode-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mode-pill.active {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #0f172a;
  border-color: #fbbf24;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}
.mode-pill#modeExtendedBtn.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border-color: #60a5fa;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

/* Weil grammar highlighting inside lyrics and cards */
.hl-weil {
  color: #fbbf24 !important;
  font-weight: 800 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
}
.hl-verb {
  color: #38bdf8 !important;
  font-weight: 800 !important;
  border-bottom: 2px dashed #38bdf8 !important;
}
.lyric-pattern-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.7rem;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px dashed rgba(245, 158, 11, 0.35);
  direction: ltr;
  text-align: left;
}

.role-switch-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.role-pill {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.role-pill.active {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
}

/* Karaoke Lyrics Transcript Box */
.lyrics-container {
  flex: 1;
  overflow-y: auto;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  margin: 8px 0;
}

.lyric-card {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.25s ease;
  cursor: pointer;
}
.lyric-card.lyric-active {
  background: rgba(37,99,235,0.22);
  border-color: #3b82f6;
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}

.lyric-speaker-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.lyric-speaker-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
.badge-speaker-a { background: #1e40af; color: #93c5fd; }
.badge-speaker-b { background: #0f766e; color: #99f6e4; }

.lyric-text-de {
  font-family: var(--font-de);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.5;
  color: #e2e8f0;
  direction: ltr;
  text-align: left;
}
.lyric-card.lyric-active .lyric-text-de {
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

.lyric-text-ar {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 6px;
  line-height: 1.4;
  border-top: 1px dashed rgba(255,255,255,0.1);
  padding-top: 4px;
}

/* Toolbar */
.lyrics-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
}
.btn-tool {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.18);
  color: #cbd5e1;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  flex: 1;
  transition: all 0.2s ease;
}
.btn-tool:active, .btn-tool.active {
  background: #2563eb;
  color: #fff;
  border-color: #60a5fa;
  box-shadow: 0 2px 10px rgba(37,99,235,0.3);
}

/* Vocab Drawer */
.vocab-drawer {
  background: #111827;
  border: 1.5px solid #374151;
  border-radius: 16px;
  padding: 12px 14px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.78rem;
  color: #f3f4f6;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  margin: 6px 0;
  animation: fadeIn 0.2s ease;
}
.vocab-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.btn-close-drawer {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
}
.vocab-drawer-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vocab-drawer-section-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #60a5fa;
  margin-top: 4px;
}
.vocab-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vocab-chip-item {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.74rem;
}
.vocab-chip-item strong {
  color: #93c5fd;
}
.vocab-chip-item em {
  color: #fcd34d;
  font-style: normal;
  font-size: 0.7rem;
}

/* Progress Scrubber */
.scrubber-wrap {
  margin: 10px 0;
}
.scrubber-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.scrubber-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 999px;
  transition: width 0.15s ease;
}
.scrubber-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* Full Controls Bar */
.full-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 6px;
}
.btn-ctrl-sec {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
  font-weight: 800;
}
.btn-ctrl-sec.active {
  color: #3b82f6;
}
.btn-ctrl-main {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 8px;
}
.btn-ctrl-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #2563eb;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,99,235,0.5);
  transition: transform 0.15s ease;
}
.btn-ctrl-play:active {
  transform: scale(0.92);
}

/* Sleep Modal */
.sleep-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: flex-end;
  z-index: 300;
}
.sleep-modal-box {
  background: #1e293b;
  width: 100%;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 20px 16px;
  text-align: center;
}
.sleep-modal-box h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.sleep-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}
.btn-sleep-opt {
  background: #334155;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-cancel-sleep {
  grid-column: span 2;
  background: #dc2626;
}
.btn-close-sleep {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px;
}

/* ---------------- In-App Updater Modal ---------------- */
.update-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  z-index: 350;
  animation: fadeIn 0.2s ease;
}
.update-modal-box {
  background: #1e293b;
  color: #fff;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 22px 18px max(24px, env(safe-area-inset-bottom, 20px)) 18px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.5);
}
.update-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #334155;
}
.update-modal-head h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}
.btn-close-update {
  background: #334155;
  border: none;
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.update-modal-body {
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.update-ver-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  font-size: 0.85rem;
}
.badge-ver {
  background: #3b82f6;
  color: #fff;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}
.update-check-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.update-check-card p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 12px;
}
.btn-check-update {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
  transition: transform 0.15s ease;
}
.btn-check-update:active {
  transform: scale(0.98);
}
.update-result-card {
  background: #0f172a;
  border: 1.5px solid #10b981;
  border-radius: 14px;
  padding: 16px;
  animation: fadeIn 0.3s ease;
}
.update-alert-badge {
  background: #10b981;
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 8px;
}
.update-result-card h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.changelog-list {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.6;
  padding-right: 18px;
  margin: 10px 0;
}
.update-actions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}
.btn-up-apk {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  text-decoration: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 800;
  text-align: center;
  display: block;
  font-size: 0.92rem;
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}
.btn-up-refresh {
  background: #334155;
  color: #fff;
  border: 1px solid #475569;
  padding: 10px;
  border-radius: 10px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.85rem;
}

/* ==========================================================================
   Samsung Galaxy S25 Ultra & Flagship Screen Optimization
   Viewport: ~412px x 915px (19.5:9 Aspect Ratio, 6.9" Dynamic AMOLED 2X)
   ========================================================================== */
@media screen and (min-height: 820px) {
  .app-body {
    padding: 16px 14px;
    gap: 14px;
  }
  .track-card {
    padding: 14px 16px;
    border-radius: 16px;
  }
  .track-title-de {
    font-size: 1.02rem;
  }
  .track-title-ar {
    font-size: 0.82rem;
  }

  /* Full Player Ergonomics for 6.9" Tall Display */
  .full-player-inner {
    padding: 14px 16px 20px 16px;
    gap: 12px;
  }
  .full-hero-visual {
    padding: 18px 20px;
    border-radius: 24px;
    margin: 8px 0;
  }
  .hero-topic-bubble {
    font-size: 1.65rem;
  }
  .hero-topic-sub {
    font-size: 0.9rem;
  }
  .lyrics-container {
    padding: 12px 6px;
    gap: 12px;
    max-height: 48dvh;
  }
  .lyric-card {
    padding: 12px 16px;
    border-radius: 14px;
  }
  .lyric-text-de {
    font-size: 1.05rem;
    line-height: 1.55;
  }
  .lyric-card.lyric-active .lyric-text-de {
    font-size: 1.12rem;
  }
  .lyric-text-ar {
    font-size: 0.84rem;
    line-height: 1.45;
  }
  .full-controls-bar {
    padding-top: 10px;
  }
  .btn-ctrl-play {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
  .btn-ctrl-main {
    font-size: 2rem;
  }
}

/* Edge-to-Edge landscape / notch protection */
@media screen and (orientation: landscape) {
  .full-player-inner {
    flex-direction: row;
    max-width: 900px;
    align-items: center;
  }
  .full-hero-visual {
    flex: 1;
  }
  .lyrics-container {
    flex: 1.5;
    max-height: 70vh;
  }
}
