/* =========================================================
   FMTV — pages.css
   Styles for interior pages: listing grids, search, favorites,
   history, profile, subscription, auth forms, and the IPTV player.
   Loaded in addition to style.css on every non-home page.
   ========================================================= */

/* ---------- Page banner (small hero for interior pages) ---------- */
.fmtv-page-banner {
  padding: calc(var(--fmtv-header-h) + 40px) 4vw 24px;
  background: var(--fmtv-bg-elevated);
  border-bottom: 1px solid var(--fmtv-border);
}
.fmtv-page-banner h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fmtv-page-banner p { color: var(--fmtv-text-muted); margin: 0; }
.fmtv-breadcrumb { font-size: 0.85rem; color: var(--fmtv-text-muted); margin-bottom: 10px; }
.fmtv-breadcrumb a { color: var(--fmtv-text-muted); }
.fmtv-breadcrumb a:hover { color: var(--fmtv-accent); }

.fmtv-page-body { padding: 28px 4vw 60px; min-height: 40vh; }

/* ---------- Filter chips ---------- */
.fmtv-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.fmtv-chip {
  border: 1px solid var(--fmtv-border);
  background: var(--fmtv-card);
  color: var(--fmtv-text-muted);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--fmtv-transition);
}
.fmtv-chip:hover { color: var(--fmtv-text); border-color: var(--fmtv-text-muted); }
.fmtv-chip.active { background: var(--fmtv-accent-grad); color: #fff; border-color: transparent; }

/* ---------- Grid layout (listing pages, favorites, kids) ---------- */
.fmtv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}
.fmtv-grid .fmtv-card { width: 100%; }

.fmtv-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--fmtv-text-muted);
}
.fmtv-empty-state i { font-size: 3rem; margin-bottom: 14px; display: block; color: var(--fmtv-border); }

/* ---------- Kids theme ---------- */
.fmtv-kids-banner {
  background: linear-gradient(120deg, #ffb703, #fb8500 60%, #ff3b5c);
  border-bottom: none;
}
.fmtv-kids-banner h1, .fmtv-kids-banner p { color: #fff; }
.fmtv-kids-card { border-radius: 20px; }
.fmtv-kids-card .fmtv-card-thumb { border-radius: 20px 20px 0 0; }

/* ---------- Search ---------- */
.fmtv-search-bar {
  position: relative;
  max-width: 640px;
  margin: 0 auto 28px;
}
.fmtv-search-bar input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border-radius: 100px;
  border: 1px solid var(--fmtv-border);
  background: var(--fmtv-card);
  color: var(--fmtv-text);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--fmtv-transition);
}
.fmtv-search-bar input:focus { border-color: var(--fmtv-accent); }
.fmtv-search-bar i {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  color: var(--fmtv-text-muted); font-size: 1.1rem;
}
.fmtv-search-meta { text-align: center; color: var(--fmtv-text-muted); margin-bottom: 20px; font-size: 0.9rem; }

/* ---------- History list ---------- */
.fmtv-history-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--fmtv-radius);
  background: var(--fmtv-card);
  border: 1px solid var(--fmtv-border);
  margin-bottom: 12px;
}
.fmtv-history-thumb { width: 140px; aspect-ratio: 16/9; border-radius: 8px; flex-shrink: 0; overflow: hidden; }
.fmtv-history-info { flex: 1; min-width: 0; }
.fmtv-history-title { font-weight: 700; margin-bottom: 4px; }
.fmtv-history-meta { font-size: 0.8rem; color: var(--fmtv-text-muted); margin-bottom: 8px; }
.fmtv-progress { height: 5px; border-radius: 4px; background: var(--fmtv-border); overflow: hidden; }
.fmtv-progress-bar { height: 100%; background: var(--fmtv-accent-grad); }
.fmtv-history-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- Profile ---------- */
.fmtv-profile-header {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.fmtv-profile-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--fmtv-accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.fmtv-profile-name { font-size: 1.4rem; font-weight: 800; margin: 0; }
.fmtv-profile-email { color: var(--fmtv-text-muted); margin: 4px 0 10px; }
.fmtv-badge-plan {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,59,92,0.15); color: var(--fmtv-accent);
  font-size: 0.78rem; font-weight: 700;
  padding: 4px 12px; border-radius: 100px;
}

.fmtv-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--fmtv-border); margin-bottom: 24px; overflow-x: auto; }
.fmtv-tab {
  padding: 12px 18px;
  font-weight: 600;
  color: var(--fmtv-text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  background: transparent; border-left: none; border-right: none; border-top: none;
}
.fmtv-tab.active { color: var(--fmtv-text); border-bottom-color: var(--fmtv-accent); }
.fmtv-tab-panel { display: none; }
.fmtv-tab-panel.active { display: block; }

/* ---------- Forms ---------- */
.fmtv-form { max-width: 520px; }
.fmtv-form-row { margin-bottom: 18px; }
.fmtv-form-row label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--fmtv-text-muted); }
.fmtv-form-row input, .fmtv-form-row select, .fmtv-form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--fmtv-border);
  background: var(--fmtv-card);
  color: var(--fmtv-text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--fmtv-transition);
}
.fmtv-form-row input:focus, .fmtv-form-row select:focus, .fmtv-form-row textarea:focus { border-color: var(--fmtv-accent); }
.fmtv-form-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .fmtv-form-two-col { grid-template-columns: 1fr; } }

.fmtv-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 40px;
}
.fmtv-auth-card {
  width: 100%; max-width: 420px;
  background: var(--fmtv-card);
  border: 1px solid var(--fmtv-border);
  border-radius: var(--fmtv-radius);
  padding: 36px 32px;
}
.fmtv-auth-card .fmtv-logo { display: flex; justify-content: center; margin-bottom: 24px; }
.fmtv-auth-card h2 { text-align: center; margin-bottom: 6px; }
.fmtv-auth-card .fmtv-sub { text-align: center; color: var(--fmtv-text-muted); margin-bottom: 26px; font-size: 0.9rem; }
.fmtv-auth-switch { text-align: center; margin-top: 18px; font-size: 0.9rem; color: var(--fmtv-text-muted); }
.fmtv-auth-switch a { color: var(--fmtv-accent); font-weight: 600; }
.fmtv-form-full-btn { width: 100%; justify-content: center; }

/* ---------- Pricing / Subscription ---------- */
.fmtv-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  max-width: 1000px;
  margin: 0 auto;
}
.fmtv-price-card {
  background: var(--fmtv-card);
  border: 1px solid var(--fmtv-border);
  border-radius: var(--fmtv-radius);
  padding: 28px 24px;
  position: relative;
  transition: transform var(--fmtv-transition), border-color var(--fmtv-transition);
}
.fmtv-price-card:hover { transform: translateY(-4px); }
.fmtv-price-card.featured { border-color: var(--fmtv-accent); }
.fmtv-price-badge {
  position: absolute; top: -12px; right: 24px;
  background: var(--fmtv-accent-grad); color: #fff;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em;
  padding: 4px 12px; border-radius: 100px; text-transform: uppercase;
}
.fmtv-price-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.fmtv-price-amount { font-size: 2.2rem; font-weight: 800; margin-bottom: 4px; }
.fmtv-price-amount span { font-size: 0.95rem; font-weight: 500; color: var(--fmtv-text-muted); }
.fmtv-price-list { list-style: none; padding: 0; margin: 20px 0 26px; }
.fmtv-price-list li { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 0.9rem; color: var(--fmtv-text-muted); }
.fmtv-price-list li i { color: var(--fmtv-success); }
.fmtv-current-plan-note {
  max-width: 1000px; margin: 0 auto 24px;
  background: rgba(255,59,92,0.1);
  border: 1px solid rgba(255,59,92,0.3);
  color: var(--fmtv-text);
  padding: 14px 18px;
  border-radius: var(--fmtv-radius);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: space-between;
}

/* ---------- IPTV Player ---------- */
.fmtv-player-wrap { background: #000; }
.fmtv-player-stage {
  position: relative;
  width: 100%;
  max-height: 82vh;
  aspect-ratio: 16/9;
  background: #000;
  margin: 0 auto;
}
.fmtv-player-stage video { width: 100%; height: 100%; background: #000; }

.fmtv-player-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 18px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
  display: flex; flex-direction: column; gap: 8px;
  opacity: 1;
  transition: opacity var(--fmtv-transition);
}
.fmtv-player-seek {
  width: 100%; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,0.25);
  appearance: none; cursor: pointer;
}
.fmtv-player-seek::-webkit-slider-thumb {
  appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--fmtv-accent); margin-top: -4.5px;
}
.fmtv-player-row { display: flex; align-items: center; gap: 14px; color: #fff; }
.fmtv-player-row .fmtv-spacer { flex: 1; }
.fmtv-player-btn {
  background: transparent; border: none; color: #fff; font-size: 1.25rem;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
}
.fmtv-player-btn:hover { background: rgba(255,255,255,0.15); }
.fmtv-player-time { font-size: 0.8rem; color: #ddd; min-width: 100px; }

.fmtv-menu-wrap { position: relative; }
.fmtv-menu {
  position: absolute; bottom: 46px; right: 0;
  background: rgba(20,20,24,0.96);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  min-width: 160px;
  padding: 8px;
  display: none;
  max-height: 220px; overflow-y: auto;
}
.fmtv-menu.open { display: block; }
.fmtv-menu-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 6px; color: #eee; font-size: 0.85rem;
  background: transparent; border: none; width: 100%; text-align: left;
}
.fmtv-menu-item:hover { background: rgba(255,255,255,0.08); }
.fmtv-menu-item.active { color: var(--fmtv-accent); }

.fmtv-player-belowbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 4vw; flex-wrap: wrap; gap: 20px;
}
.fmtv-player-meta h2 { margin: 0 0 8px; }
.fmtv-player-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.fmtv-tag { font-size: 0.78rem; color: var(--fmtv-text-muted); border: 1px solid var(--fmtv-border); padding: 3px 10px; border-radius: 100px; }
