/* ============================================================
   MMH — My Media Hub  |  style.css
   Dark cinema core + teal palette from Flask Color Studio
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Teal brand palette (from Flask Color Studio) */
  --bg-gradient-start:  #498498;
  --bg-gradient-end:    #5da8c2;
  --bg-gradient-angle:  160deg;
  --btn-landing-bg:     #15282f;
  --btn-landing-hover:  #1e3a47;
  --card-teal:          #345f6d;
  --card-teal-border:   #3d6e7e;

  /* App dark cinema palette */
  --bg-base:    rgba(8, 8, 20, 0.95);
  --bg-card:    rgba(10, 12, 30, 0.82);
  --bg-surface: rgba(16, 18, 38, 0.90);
  --bg-hover:   rgba(26, 29, 53, 0.92);

  /* Accent — teal-shifted from original purple */
  --accent:        #2a9db5;
  --accent-hover:  #1f8ba0;
  --accent-glow:   rgba(42, 157, 181, 0.25);
  --accent-light:  rgba(42, 157, 181, 0.12);

  /* Typography */
  --text:       #e8eaf0;
  --text-muted: #6b7280;
  --text-dim:   #9ca3af;

  /* Borders */
  --border:       rgba(255,255,255,.08);
  --border-light: rgba(255,255,255,.04);

  /* Shape */
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  16px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,.45);
  --shadow-btn:  0 2px 12px rgba(0,0,0,.35);
  --shadow-glow: 0 0 20px var(--accent-glow);

  --transition: .22s ease;

  /* User category colors */
  --cat-admin:    #f59e0b;
  --cat-premium:  #a855f7;
  --cat-standard: #6b7280;
}

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

/* ── Base ──────────────────────────────────────────────────── */
body {
  background: linear-gradient(160deg, #498498 0%, #5da8c2 100%) fixed !important;
  color: var(--text);
  font-family: 'Inter', 'Cairo', system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
body.rtl { font-family: 'Cairo', 'Inter', system-ui, sans-serif; }

/* ── Typography ────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { color: var(--text); font-weight: 700; }
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted) !important; }
.fw-500       { font-weight: 500; }
.page-title   { font-size: 1.15rem; font-weight: 700; color: var(--text); }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(8,8,20,.5); }
::-webkit-scrollbar-thumb { background: var(--bg-surface); border-radius: 3px; }

/* ════════════════════════════════════════════════════════════
   LANDING PAGE
   ════════════════════════════════════════════════════════════ */
/* Force gradient over Bootstrap body reset */
body.landing-page {
  background: linear-gradient(160deg, #498498 0%, #5da8c2 100%) !important;
  background-attachment: fixed !important;
  overflow-x: hidden;
  margin: 0 !important;
  padding: 0 !important;
}

.landing-lang {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100;
}
[dir="rtl"] .landing-lang { right: auto; left: 1.25rem; }

.landing-flash {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: min(500px, 90vw);
}

/* Grid split: auth (left 2/3) | hero (right 1/3) */
.landing-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  min-height: 100vh;
  width: 100%;
}
[dir="rtl"] .landing-wrapper {
  grid-template-columns: 1fr 2fr;
}

/* Left col — auth panel */
.landing-auth-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 2.5rem;
  background: rgba(8, 8, 20, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  min-height: 100vh;
}

/* Right col — hero */
.landing-hero-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

/* Auth panel card */
.auth-panel {
  width: 100%;
  max-width: 460px;
}

.auth-brand {
  display: flex;
  align-items: center;
}
.auth-brand .brand-icon { font-size: 1.4rem; }
.auth-brand .brand-text { font-size: 1.3rem; font-weight: 800; color: var(--text); }

/* Auth tabs */
.auth-tabs { border-bottom: 1px solid var(--border); gap: .25rem; }
.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: .92rem;
  font-weight: 600;
  padding: .55rem 1.1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.auth-tab:hover  { color: var(--text); }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Auth panels */
.auth-form-panel       { display: none; }
.auth-form-panel.active{ display: block; }

/* Input with icon */
.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute;
  top: 50%; left: .9rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .85rem;
  pointer-events: none;
}
[dir="rtl"] .input-icon { left: auto; right: .9rem; }
.auth-input {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  padding-left: 2.4rem !important;
  padding-top: .6rem !important;
  padding-bottom: .6rem !important;
  transition: border-color var(--transition), box-shadow var(--transition);
}
[dir="rtl"] .auth-input { padding-left: .75rem !important; padding-right: 2.4rem !important; }
.auth-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-light) !important;
  outline: none;
}
.auth-input::placeholder { color: var(--text-muted); }
.form-label-sm { font-size: .8rem; font-weight: 600; color: var(--text-dim); margin-bottom: .35rem; display: block; }

/* Landing button */
.btn-landing {
  background: linear-gradient(135deg, var(--accent), var(--btn-landing-bg));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  padding: .75rem 1.5rem;
  box-shadow: var(--shadow-btn);
  transition: opacity var(--transition), transform var(--transition);
}
.btn-landing:hover { opacity: .9; transform: translateY(-1px); color: #fff; }

.auth-switch-hint { font-size: .82rem; color: var(--text-muted); text-align: center; }
.auth-switch-link {
  background: none; border: none; color: var(--accent);
  font-size: .82rem; font-weight: 600; cursor: pointer; padding: 0;
}
.auth-switch-link:hover { text-decoration: underline; }

/* Hero */
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-icon {
  font-size: 4rem;
  color: rgba(255,255,255,.9);
  filter: drop-shadow(0 0 24px rgba(255,255,255,.3));
}
.hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: .75rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.hero-subtitle {
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
.hero-features {
  list-style: none;
  text-align: left;
  display: inline-block;
}
[dir="rtl"] .hero-features { text-align: right; }
.hero-features li {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  margin-bottom: .65rem;
}
.hero-feat-icon {
  width: 30px; height: 30px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .25;
  pointer-events: none;
}
.hero-orb-1 { width: 280px; height: 280px; background: var(--btn-landing-bg); top: -80px; right: -80px; }
.hero-orb-2 { width: 200px; height: 200px; background: #5da8c2; bottom: -60px; left: -60px; }

@media (max-width: 768px) {
  .landing-wrapper   { grid-template-columns: 1fr; }
  .landing-hero-col  { min-height: 280px; order: -1; }
  .landing-auth-col  { min-height: auto; padding: 2rem 1.25rem; }
  .hero-title        { font-size: 1.4rem; }
  .hero-features     { display: none; }
}


/* ════════════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════════════ */
.mmh-navbar {
  background: rgba(8,8,20,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: .55rem 0;
}
.brand-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), #1a6e80);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: #fff;
}
.brand-text { font-weight: 800; font-size: 1.05rem; color: var(--text); }

.nav-pill {
  border-radius: var(--radius-sm);
  color: var(--text-dim) !important;
  font-size: .875rem;
  font-weight: 500;
  padding: .35rem .75rem !important;
  transition: background var(--transition), color var(--transition);
}
.nav-pill:hover  { background: var(--bg-surface); color: var(--text) !important; }
.nav-pill.active { background: var(--accent-light); color: var(--accent) !important; }

.lang-switcher { }
.lang-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: .72rem; font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.lang-btn:hover  { background: var(--bg-surface); color: var(--text); }
.lang-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* User menu in navbar */
.btn-user-menu {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .3rem .6rem;
  display: flex; align-items: center;
  transition: border-color var(--transition);
}
.btn-user-menu:hover { border-color: var(--accent); color: var(--text); }
.btn-user-menu::after { border-color: var(--text-muted) transparent transparent; margin-left: .5rem; }

.nav-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: #fff;
}
.nav-avatar-admin    { background: var(--cat-admin); }
.nav-avatar-premium  { background: var(--cat-premium); }
.nav-avatar-standard { background: var(--accent); }

.mmh-dropdown {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem;
  min-width: 200px;
}
.mmh-dropdown .dropdown-item {
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  padding: .45rem .75rem;
}
.mmh-dropdown .dropdown-item:hover { background: var(--bg-hover); color: var(--accent); }
.mmh-dropdown .dropdown-item-text  { font-size: .8rem; padding: .4rem .75rem; display: block; }

/* ── Main content ──────────────────────────────────────────── */
.main-content { min-height: calc(100vh - 56px); }

/* ════════════════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════════════════ */
.section-title {
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); margin-bottom: 1rem;
}

/* Latest media strip */
.latest-strip {
  display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .5rem;
  scrollbar-width: thin;
}
.latest-card {
  flex: 0 0 calc(20% - .8rem);
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
}
.latest-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  color: var(--text);
}
.latest-card-thumb {
  height: 90px;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-hover));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--text-muted);
  position: relative; overflow: hidden;
}
.latest-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest-card-play {
  position: absolute; inset: 0;
  background: rgba(42,157,181,.3);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
  font-size: 1.5rem; color: #fff;
}
.latest-card:hover .latest-card-play { opacity: 1; }
.latest-card-body { padding: .6rem .75rem; }
.latest-card-title { font-size: .8rem; font-weight: 600; line-height: 1.3; }

/* Filter bar */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  display: flex; gap: .75rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 1.25rem;
}
.filter-select {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  font-size: .85rem !important;
  padding: .35rem .7rem !important;
  min-width: 140px;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--accent) !important; outline: none; box-shadow: none !important; }
.filter-select option { background: var(--bg-surface); }

/* Media grid cards */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.media-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  position: relative;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.media-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  color: var(--text);
}
.media-card-thumb {
  height: 110px;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-hover));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; color: var(--text-muted);
  position: relative; overflow: hidden;
}
.media-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
  font-size: 1.8rem; color: #fff;
}
.media-card:hover .media-card-overlay { opacity: 1; }
.media-type-chip {
  position: absolute; top: 8px; right: 8px;
  font-size: .65rem; font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 4px;
  text-transform: uppercase; letter-spacing: .05em;
}
.chip-youtube { background: rgba(255,0,0,.75); color: #fff; }
.chip-stream  { background: rgba(42,157,181,.75); color: #fff; }
.chip-web     { background: rgba(55,65,81,.85); color: #fff; }
.media-card-body { padding: .65rem .8rem; }
.media-card-title { font-size: .82rem; font-weight: 600; line-height: 1.3; margin-bottom: .4rem; }
.media-card-meta  { font-size: .72rem; color: var(--text-muted); display: flex; gap: .35rem; flex-wrap: wrap; }

/* ── Badges ────────────────────────────────────────────────── */
.badge-source   { background: rgba(42,157,181,.15); color: var(--accent); border: 1px solid rgba(42,157,181,.2); }
.badge-category { background: rgba(34,197,94,.1);  color: #4ade80; border: 1px solid rgba(34,197,94,.15); }
.badge-region   { background: rgba(245,158,11,.1);  color: #fbbf24; border: 1px solid rgba(245,158,11,.15); }
.badge { font-size: .68rem !important; border-radius: 5px !important; font-weight: 600 !important; }

/* ── User badges ───────────────────────────────────────────── */
.user-badge {
  display: inline-flex; align-items: center;
  font-size: .7rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: 20px;
}
.user-badge-admin    { background: rgba(245,158,11,.15); color: var(--cat-admin);    border: 1px solid rgba(245,158,11,.25); }
.user-badge-premium  { background: rgba(168,85,247,.15); color: var(--cat-premium);  border: 1px solid rgba(168,85,247,.25); }
.user-badge-standard { background: rgba(107,114,128,.15);color: var(--cat-standard); border: 1px solid rgba(107,114,128,.25); }

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-avatar-admin    { background: var(--cat-admin); }
.user-avatar-premium  { background: var(--cat-premium); }
.user-avatar-standard { background: var(--accent); }

/* ════════════════════════════════════════════════════════════
   PLAYER
   ════════════════════════════════════════════════════════════ */
.player-header {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.5rem;
}
.player-title { font-size: 1.25rem; font-weight: 700; }
.player-badges { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

.video-wrapper {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}
.video-wrapper iframe {
  position: absolute;
  inset: 0; width: 100%; height: 100%;
  border: none;
}

/* Audio player */
.audio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
}
.audio-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.live-badge  { background: #ef4444; color: #fff; font-size: .7rem; font-weight: 800;
               padding: .15rem .5rem; border-radius: 4px; text-transform: uppercase; }

/* Wave animation */
.wave-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 40px; margin: 1.5rem auto; }
.wave-bar  { width: 4px; background: var(--accent); border-radius: 2px; height: 8px;
             transition: height var(--transition); }
.wave-active .wave-bar { animation: wave 1s ease-in-out infinite; }
.wave-bar:nth-child(1)  { animation-delay: 0s; }
.wave-bar:nth-child(2)  { animation-delay: .08s; }
.wave-bar:nth-child(3)  { animation-delay: .16s; }
.wave-bar:nth-child(4)  { animation-delay: .24s; }
.wave-bar:nth-child(5)  { animation-delay: .32s; }
.wave-bar:nth-child(6)  { animation-delay: .4s; }
.wave-bar:nth-child(7)  { animation-delay: .48s; }
.wave-bar:nth-child(8)  { animation-delay: .56s; }
.wave-bar:nth-child(9)  { animation-delay: .64s; }
.wave-bar:nth-child(10) { animation-delay: .72s; }
.wave-bar:nth-child(11) { animation-delay: .8s; }
.wave-bar:nth-child(12) { animation-delay: .88s; }
@keyframes wave {
  0%,100% { height: 8px; }
  50%      { height: 36px; }
}

/* Web fallback */
.web-fallback-card {
  flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 3.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card); text-align: center; min-height: 320px;
}
.web-fallback-icon  { font-size: 3.5rem; color: var(--accent); opacity: .7; }
.web-fallback-title { font-size: 1.4rem; font-weight: 700; margin: 0; }
.web-fallback-msg   { color: var(--text-muted); max-width: 440px; margin: 0; }
.iframe-loading-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); z-index: 2;
  border-radius: var(--radius); pointer-events: none;
}

/* ════════════════════════════════════════════════════════════
   MANAGE / TABLES
   ════════════════════════════════════════════════════════════ */
.manage-table-wrap {
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,.18);
}
.mmh-table { color: #111; margin: 0; }
.mmh-table thead th {
  background: #f0f6f8;
  border-bottom: 2px solid #d0e4ea;
  color: #2c5f6d;
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .75rem 1rem;
}
.mmh-table tbody td  { border-bottom: 1px solid #e8f0f3; padding: .7rem 1rem; vertical-align: middle; color: #111 !important; }
.mmh-table tbody tr:last-child td { border-bottom: none; }
.mmh-table tbody tr:hover td { background: #f0f9fc; }
.mmh-table a { color: #1a6e80 !important; }
.mmh-table .text-muted { color: #4a7080 !important; }

/* Type chips in table */
.type-chip {
  font-size: .68rem; font-weight: 700; padding: .2rem .5rem;
  border-radius: 4px; text-transform: uppercase; letter-spacing: .05em;
  display: inline-flex; align-items: center; gap: .3rem;
}
.chip-yt  { background: rgba(255,0,0,.12);  color: #f87171; }
.chip-str { background: rgba(42,157,181,.12); color: var(--accent); }
.chip-web { background: rgba(107,114,128,.12); color: var(--text-muted); }

.table-logo { width: 28px; height: 28px; border-radius: 5px; object-fit: cover; }

/* Icon action buttons */
.btn-icon {
  width: 30px; height: 30px;
  border-radius: 6px; border: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-edit   { background: var(--accent-light); color: var(--accent); }
.btn-delete { background: rgba(239,68,68,.1);  color: #f87171; }
.btn-edit:hover   { background: var(--accent); color: #fff; }
.btn-delete:hover { background: #ef4444; color: #fff; }

/* ════════════════════════════════════════════════════════════
   MODALS
   ════════════════════════════════════════════════════════════ */
.mmh-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
}
.mmh-modal .modal-header { padding: 1.25rem 1.5rem .5rem; }
.mmh-modal .modal-body   { padding: 1rem 1.5rem; }
.mmh-modal .modal-footer { padding: .75rem 1.5rem 1.25rem; }
.mmh-modal .modal-title  { font-size: 1rem; font-weight: 700; }
.modal-backdrop           { background: rgba(0,0,0,.75) !important; }

.mmh-input {
  background: var(--bg-base) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  font-size: .9rem !important;
}
.mmh-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-light) !important;
}
.mmh-input::placeholder { color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════
   BUTTONS (app-wide)
   ════════════════════════════════════════════════════════════ */
.btn-accent {
  background: var(--accent);
  color: #fff; border: none;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: .875rem;
  box-shadow: var(--shadow-btn);
  transition: background var(--transition), transform var(--transition);
}
.btn-accent:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: .875rem;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm { padding: .35rem .75rem !important; font-size: .8rem !important; }

/* ════════════════════════════════════════════════════════════
   ALERTS
   ════════════════════════════════════════════════════════════ */
.alert-success { background: rgba(34,197,94,.12);  border-color: rgba(34,197,94,.3);  color: #4ade80; }
.alert-warning { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); color: #fbbf24; }
.alert-danger  { background: rgba(239,68,68,.12);  border-color: rgba(239,68,68,.3);  color: #f87171; }
.btn-close-white { filter: invert(1) brightness(2); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .player-title { font-size: 1rem; }
  .audio-card   { padding: 1.5rem 1rem; }
  .filter-bar   { padding: .75rem; }
  .media-grid   { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ── RTL ───────────────────────────────────────────────────── */
[dir="rtl"] .media-type-chip { right: auto; left: 8px; }
[dir="rtl"] .table-logo      { margin-left: .5rem; margin-right: 0; }
[dir="rtl"] .me-1,[dir="rtl"] .me-2,[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: .25rem !important; }
[dir="rtl"] .ms-1,[dir="rtl"] .ms-2,[dir="rtl"] .ms-3 { margin-left:  0 !important; margin-right: .25rem !important; }
[dir="rtl"] .ms-auto { margin-right: auto !important; margin-left: 0 !important; }

/* ════════════════════════════════════════════════════════════
   HLS / STREAM PLAYER
   ════════════════════════════════════════════════════════════ */

/* Stream card — wraps both HLS video and audio players */
.stream-card {
  background: rgba(10, 12, 30, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.5rem;
  box-shadow: var(--shadow-card);
}

.stream-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.stream-logo {
  width: 72px; height: 72px;
  border-radius: var(--radius);
  object-fit: contain;
  background: rgba(255,255,255,.08);
  padding: 6px;
  flex-shrink: 0;
}

.stream-icon-placeholder {
  width: 72px; height: 72px;
  border-radius: var(--radius);
  background: var(--accent-light);
  border: 1px solid rgba(42,157,181,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--accent);
  flex-shrink: 0;
}

.stream-info { flex: 1; }
.stream-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .25rem; }
.stream-desc  { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; }

/* Live badge */
.live-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 20px;
  color: #f87171;
  font-size: .72rem; font-weight: 800;
  padding: .2rem .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.7); }
}

/* HLS video wrapper */
.hls-video-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.hls-video {
  width: 100%; height: 100%;
  display: block;
  background: #000;
}

/* Loading overlay inside video */
.hls-status-overlay {
  position: absolute; inset: 0;
  background: rgba(8,8,20,.85);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 5;
}

/* Error card inside video area */
.hls-error-card {
  position: absolute; inset: 0;
  background: rgba(8,8,20,.9);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 2rem;
  z-index: 5;
}
.hls-error-card h5 { color: #f59e0b; }

/* Audio wave (radio streams) */
.audio-wave {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 3px; height: 40px;
}
.audio-wave span {
  width: 4px; height: 8px;
  background: var(--accent); border-radius: 2px;
  transition: height .22s;
}
.audio-wave.playing span { animation: wave-bar 1s ease-in-out infinite; }
.audio-wave span:nth-child(1)  { animation-delay: 0s; }
.audio-wave span:nth-child(2)  { animation-delay: .08s; }
.audio-wave span:nth-child(3)  { animation-delay: .16s; }
.audio-wave span:nth-child(4)  { animation-delay: .24s; }
.audio-wave span:nth-child(5)  { animation-delay: .32s; }
.audio-wave span:nth-child(6)  { animation-delay: .40s; }
.audio-wave span:nth-child(7)  { animation-delay: .48s; }
.audio-wave span:nth-child(8)  { animation-delay: .56s; }
.audio-wave span:nth-child(9)  { animation-delay: .64s; }
.audio-wave span:nth-child(10) { animation-delay: .72s; }
.audio-wave span:nth-child(11) { animation-delay: .80s; }
.audio-wave span:nth-child(12) { animation-delay: .88s; }
@keyframes wave-bar {
  0%,100% { height: 8px; }
  50%      { height: 36px; }
}

.stream-url-hint { font-size: .78rem; color: var(--text-muted); }
.stream-url-hint a { color: var(--text-muted); word-break: break-all; }
.stream-url-hint a:hover { color: var(--accent); }

/* Micro-badges in player header */
.micro-badge {
  font-size: .68rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: 4px;
  display: inline-flex; align-items: center; gap: .25rem;
}
.badge-source  { background: rgba(42,157,181,.15); color: var(--accent); border: 1px solid rgba(42,157,181,.2); }
.badge-type    { background: rgba(34,197,94,.1);   color: #4ade80; border: 1px solid rgba(34,197,94,.15); }
.badge-region  { background: rgba(245,158,11,.1);  color: #fbbf24; border: 1px solid rgba(245,158,11,.15); }

/* Back button */
.btn-back {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  padding: .4rem .85rem;
  transition: border-color var(--transition);
}
.btn-back:hover { border-color: var(--accent); color: var(--text); }

/* YouTube button */
.btn-yt {
  background: rgba(255,0,0,.15);
  border: 1px solid rgba(255,0,0,.25);
  color: #f87171;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  padding: .4rem .85rem;
}
.btn-yt:hover { background: #ef4444; color: #fff; border-color: #ef4444; }
