/* =========================================================
   IPTV Hub - Shared Styles
   Used by: login.html, home.html, live.html
   ========================================================= */

:root {
  --bg-1: #070816;
  --bg-2: #11182f;
  --card: rgba(255, 255, 255, 0.09);
  --card-strong: rgba(255, 255, 255, 0.14);
  --card-border: rgba(255, 255, 255, 0.18);
  --text: #f6f8ff;
  --muted: rgba(246, 248, 255, 0.68);
  --muted-2: rgba(246, 248, 255, 0.46);
  --accent: #7c3cff;
  --accent-2: #00d4ff;
  --accent-3: #ff5277;
  --success: #36e39f;
  --danger: #ff5277;
  --warning: #ffd166;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 15%, rgba(124, 60, 255, 0.38), transparent 34%),
    radial-gradient(circle at 88% 20%, rgba(0, 212, 255, 0.26), transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(255, 82, 119, 0.22), transparent 42%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: floatBlob 12s ease-in-out infinite alternate;
}

body::before {
  left: -180px;
  top: -190px;
  background: radial-gradient(circle, rgba(124, 60, 255, 0.56), transparent 70%);
}

body::after {
  right: -200px;
  bottom: -220px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.42), transparent 70%);
  animation-delay: -4s;
}

@keyframes floatBlob {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(35px, 25px, 0) scale(1.08); }
}

.hidden {
  display: none !important;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(54, 227, 159, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(54, 227, 159, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(54, 227, 159, 0); }
  100% { box-shadow: 0 0 0 0 rgba(54, 227, 159, 0); }
}

.gradient-text {
  background: linear-gradient(120deg, #ffffff 5%, #bfc8ff 32%, #73e7ff 58%, #ffffff 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.primary-btn,
.ghost-btn,
.login-btn {
  border: 0;
  color: white;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.primary-btn,
.ghost-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 15px;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.primary-btn {
  position: relative;
  background: linear-gradient(135deg, var(--accent), #4c7dff 52%, var(--accent-2));
  box-shadow: 0 16px 34px rgba(0, 111, 255, 0.24);
  overflow: hidden;
}

.primary-btn::before,
.login-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: translateX(-120%);
  transition: transform 0.65s ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.login-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.primary-btn:hover::before,
.login-btn:hover::before {
  transform: translateX(120%);
}

.mini-badge,
.api-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 999px;
  background: rgba(54, 227, 159, 0.1);
  border: 1px solid rgba(54, 227, 159, 0.28);
  color: rgba(214, 255, 238, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(24px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 60, 255, 0.9), rgba(0, 212, 255, 0.7));
  box-shadow: 0 16px 34px rgba(0, 111, 255, 0.26);
  font-size: 24px;
}

.brand h2 {
  font-size: 20px;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

.brand p {
  color: var(--muted-2);
  font-size: 13px;
  margin-top: 3px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* =========================================================
   Login Page
   ========================================================= */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 54px;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(46px, 6vw, 82px);
  line-height: 0.94;
  letter-spacing: -0.07em;
  font-weight: 900;
}

.hero p {
  max-width: 580px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 680px;
}

.feature {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(18px);
  min-height: 122px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(124, 60, 255, 0.75), rgba(0, 212, 255, 0.35));
  margin-bottom: 14px;
  font-size: 20px;
}

.feature strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}

.feature span {
  display: block;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.45;
}

.login-wrap {
  position: relative;
}

.login-wrap::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(145deg, rgba(124, 60, 255, 0.85), rgba(0, 212, 255, 0.65), rgba(255, 82, 119, 0.72));
  border-radius: calc(var(--radius-xl) + 2px);
  opacity: 0.7;
  filter: blur(0.4px);
  z-index: -1;
}

.login-card,
.home-card,
.section-card,
.live-sidebar,
.live-main,
.player-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07)),
    rgba(11, 14, 31, 0.75);
  backdrop-filter: blur(28px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-card {
  padding: 30px;
}

.screen-preview {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  height: 176px;
  margin-bottom: 26px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124, 60, 255, 0.27), rgba(0, 212, 255, 0.1)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
}

.screen-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.orbital {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  left: 28px;
  top: 30px;
  display: grid;
  place-items: center;
  animation: rotate 12s linear infinite;
}

.orbital::before,
.orbital::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.9);
}

.orbital::before { top: -6px; }

.orbital::after {
  bottom: -6px;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(124, 60, 255, 0.9);
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.play-core {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
  transform: rotate(-360deg);
}

.play-core svg {
  width: 25px;
  height: 25px;
  fill: #fff;
  margin-left: 3px;
}

.preview-lines {
  position: absolute;
  left: 170px;
  right: 24px;
  top: 38px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-line {
  height: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.preview-line:nth-child(1) { width: 74%; }
.preview-line:nth-child(2) { width: 94%; opacity: 0.82; }
.preview-line:nth-child(3) { width: 54%; opacity: 0.62; }

.preview-line::before {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.52), transparent);
  animation: shimmer 2.4s infinite;
}

@keyframes shimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(260%); }
}

.card-header,
.section-header,
.live-main-header,
.player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.card-header {
  margin-bottom: 24px;
}

.card-header h2 {
  font-size: 30px;
  letter-spacing: -0.045em;
  margin-bottom: 8px;
}

.card-header p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  color: rgba(246, 248, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.input-shell {
  position: relative;
}

.input-shell svg {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(246, 248, 255, 0.45);
  pointer-events: none;
}

input[type="text"],
input[type="password"],
.search-shell input {
  width: 100%;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  background: rgba(3, 5, 15, 0.46);
  color: var(--text);
  outline: none;
  padding: 0 48px 0 48px;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder {
  color: rgba(246, 248, 255, 0.34);
}

input[type="text"]:focus,
input[type="password"]:focus,
.search-shell input:focus {
  border-color: rgba(0, 212, 255, 0.68);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.12);
  background: rgba(3, 5, 15, 0.62);
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(246, 248, 255, 0.8);
  cursor: pointer;
  transition: background 0.2s ease;
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 600;
}

.check input {
  display: none;
}

.box {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.box svg {
  width: 15px;
  height: 15px;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.check input:checked + .box {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.check input:checked + .box svg {
  opacity: 1;
  transform: scale(1);
}

.tiny-link {
  border: 0;
  background: none;
  color: rgba(115, 231, 255, 0.9);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.login-btn {
  position: relative;
  height: 60px;
  border-radius: 18px;
  margin-top: 10px;
  font-size: 16px;
  background: linear-gradient(135deg, var(--accent), #4c7dff 52%, var(--accent-2));
  box-shadow: 0 18px 40px rgba(0, 111, 255, 0.28), inset 0 1px 0 rgba(255,255,255,0.22);
  overflow: hidden;
}

.login-btn:disabled,
.ghost-btn:disabled,
.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
  filter: grayscale(0.15);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 999px;
  display: none;
  margin-right: 10px;
  vertical-align: -4px;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-btn.loading .spinner {
  display: inline-block;
}

.status {
  min-height: 52px;
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 4px;
  border: 1px solid transparent;
}

.status.show {
  display: flex;
}

.status.success {
  background: rgba(54, 227, 159, 0.1);
  border-color: rgba(54, 227, 159, 0.22);
  color: rgba(219, 255, 240, 0.94);
}

.status.error {
  background: rgba(255, 82, 119, 0.1);
  border-color: rgba(255, 82, 119, 0.28);
  color: rgba(255, 228, 234, 0.96);
}

.status.warning {
  background: rgba(255, 209, 102, 0.1);
  border-color: rgba(255, 209, 102, 0.25);
  color: rgba(255, 246, 216, 0.96);
}

.status-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 900;
}

.footer-note {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 18px;
  text-align: center;
}

/* =========================================================
   Home Page
   ========================================================= */

.home-page,
.live-tv-page {
  min-height: 100vh;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-hero {
  position: relative;
  min-height: 310px;
  padding: 34px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(110deg, rgba(7, 8, 22, 0.86) 0%, rgba(7, 8, 22, 0.72) 44%, rgba(7, 8, 22, 0.18) 100%),
    radial-gradient(circle at 78% 34%, rgba(0, 212, 255, 0.35), transparent 30%),
    radial-gradient(circle at 88% 72%, rgba(255, 82, 119, 0.32), transparent 35%),
    linear-gradient(135deg, rgba(124, 60, 255, 0.55), rgba(0, 212, 255, 0.12));
  box-shadow: var(--shadow);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, black, transparent 85%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 690px;
}

.home-hero h1 {
  max-width: 720px;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  margin: 18px 0 16px;
  font-weight: 900;
}

.home-hero p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 17px;
  max-width: 600px;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
  max-width: 780px;
}

.stat {
  padding: 15px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.stat span {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.stat strong {
  display: block;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.nav-card {
  position: relative;
  min-height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(24px);
  cursor: pointer;
  color: var(--text);
  text-align: left;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
  text-decoration: none;
  display: block;
}

.nav-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.4);
}

.nav-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.94;
  transition: transform 0.3s ease;
}

.nav-card:hover::before {
  transform: scale(1.04);
}

.nav-card.live::before {
  background:
    linear-gradient(180deg, rgba(7,8,22,0.04), rgba(7,8,22,0.88)),
    radial-gradient(circle at 74% 26%, rgba(0, 212, 255, 0.68), transparent 31%),
    linear-gradient(135deg, rgba(12, 226, 173, 0.48), rgba(25, 93, 255, 0.74));
}

.nav-card.movies::before {
  background:
    linear-gradient(180deg, rgba(7,8,22,0.04), rgba(7,8,22,0.88)),
    radial-gradient(circle at 72% 24%, rgba(255, 209, 102, 0.7), transparent 32%),
    linear-gradient(135deg, rgba(255, 82, 119, 0.64), rgba(124, 60, 255, 0.74));
}

.nav-card.series::before {
  background:
    linear-gradient(180deg, rgba(7,8,22,0.04), rgba(7,8,22,0.88)),
    radial-gradient(circle at 76% 24%, rgba(196, 145, 255, 0.72), transparent 32%),
    linear-gradient(135deg, rgba(124, 60, 255, 0.68), rgba(0, 212, 255, 0.42));
}

.nav-card::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.14);
  pointer-events: none;
}

.nav-content {
  position: relative;
  z-index: 1;
  min-height: 280px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24);
  font-size: 30px;
}

.nav-content h2 {
  font-size: 33px;
  letter-spacing: -0.055em;
  margin-bottom: 8px;
}

.nav-content p {
  color: rgba(246, 248, 255, 0.72);
  font-size: 14px;
  line-height: 1.55;
  max-width: 260px;
}

.nav-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.17);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 900;
  margin-top: 20px;
}

.section-card {
  padding: 26px;
}

.section-header {
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.section-header p {
  color: var(--muted-2);
  margin-top: 5px;
  font-size: 14px;
}

.coming-soon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mini-panel {
  min-height: 110px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  background: rgba(255,255,255,0.06);
  padding: 16px;
}

.mini-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.mini-panel span {
  display: block;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.45;
}

/* =========================================================
   Live TV Page
   ========================================================= */

.live-tv-page {
  width: min(1340px, calc(100% - 40px));
}

.live-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.live-sidebar,
.live-main,
.player-card {
  border-radius: 28px;
}

.live-sidebar {
  position: sticky;
  top: 22px;
  padding: 18px;
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sidebar-title h3,
.live-main-header h2,
.player-header h2 {
  letter-spacing: -0.04em;
}

.sidebar-title h3 {
  font-size: 18px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

.category-list::-webkit-scrollbar,
.channel-grid::-webkit-scrollbar {
  width: 8px;
}

.category-list::-webkit-scrollbar-thumb,
.channel-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
}

.category-btn {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  background: rgba(255,255,255,0.065);
  color: rgba(246,248,255,0.78);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  font-weight: 800;
}

.category-btn:hover,
.category-btn.active {
  background: linear-gradient(135deg, rgba(124,60,255,0.28), rgba(0,212,255,0.16));
  border-color: rgba(115,231,255,0.36);
  transform: translateY(-1px);
  color: #fff;
}

.category-btn span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-count {
  flex: 0 0 auto;
  min-width: 28px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.1);
  color: rgba(246,248,255,0.68);
  font-size: 12px;
}

.live-main {
  min-height: 680px;
  display: flex;
  flex-direction: column;
}

.live-main-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}

.live-main-header p,
.player-header p {
  color: var(--muted-2);
  margin-top: 5px;
  font-size: 14px;
}

.live-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-shell {
  position: relative;
  min-width: min(360px, 100%);
}

.search-shell input {
  height: 46px;
  padding: 0 44px 0 44px;
  border-radius: 15px;
}

.search-shell::before {
  content: "🔎";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.62;
  z-index: 1;
}

.channel-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  overflow-y: auto;
  max-height: 720px;
}

.channel-card {
  position: relative;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  min-height: 190px;
  padding: 14px;
  background:
    radial-gradient(circle at 80% 10%, rgba(0,212,255,0.16), transparent 35%),
    rgba(255,255,255,0.065);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.channel-card:hover,
.channel-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(115,231,255,0.36);
  background:
    radial-gradient(circle at 80% 10%, rgba(0,212,255,0.28), transparent 35%),
    rgba(255,255,255,0.09);
  outline: none;
}

.channel-logo-wrap {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  font-size: 28px;
  font-weight: 900;
}

.channel-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.channel-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.22;
}

.channel-meta {
  color: var(--muted-2);
  font-size: 12px;
  margin-top: 7px;
}

.fav-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 13px;
  background: rgba(0,0,0,0.24);
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.fav-btn:hover {
  transform: scale(1.06);
  background: rgba(255,255,255,0.15);
}

.fav-btn.active {
  color: #ffd166;
  background: rgba(255,209,102,0.14);
  border-color: rgba(255,209,102,0.34);
}

.player-card {
  padding: 18px;
}

.player-frame {
  position: relative;
  margin-top: 16px;
  border-radius: 26px;
  overflow: hidden;
  background: #02030a;
  border: 1px solid rgba(255,255,255,0.12);
  min-height: 440px;
  display: grid;
  place-items: center;
}

.player-frame video {
  width: 100%;
  height: 100%;
  min-height: 440px;
  background: #02030a;
  display: block;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 20%, rgba(124,60,255,0.18), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.player-placeholder strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.player-placeholder span {
  color: var(--muted);
  line-height: 1.55;
}

.player-url {
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
}

.empty-state,
.loading-state {
  grid-column: 1 / -1;
  min-height: 280px;
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 24px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 30px;
  color: var(--muted);
  background: rgba(255,255,255,0.045);
}

.loading-dots::after {
  content: "";
  animation: dots 1.2s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
  100% { content: ""; }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1180px) {
  .channel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .login-page {
    grid-template-columns: 1fr;
    gap: 34px;
    width: min(720px, calc(100% - 28px));
  }

  .hero {
    text-align: center;
    align-items: center;
  }

  .hero p {
    margin: 0 auto;
  }

  .feature-row,
  .hero-stats,
  .nav-grid,
  .coming-soon-grid {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-grid,
  .coming-soon-grid {
    grid-template-columns: 1fr;
  }

  .live-layout {
    grid-template-columns: 1fr;
  }

  .live-sidebar {
    position: static;
    max-height: none;
  }

  .category-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
}

@media (max-width: 620px) {
  .login-page,
  .home-page,
  .live-tv-page {
    width: min(100% - 28px, 720px);
    padding: 28px 0;
  }

  .hero h1,
  .home-hero h1 {
    font-size: 48px;
  }

  .feature-row,
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .login-card,
  .home-hero,
  .section-card {
    padding: 20px;
    border-radius: 28px;
  }

  .screen-preview {
    height: 145px;
  }

  .orbital {
    width: 86px;
    height: 86px;
    left: 20px;
    top: 28px;
  }

  .play-core {
    width: 48px;
    height: 48px;
  }

  .preview-lines {
    left: 128px;
    top: 36px;
  }

  .card-header,
  .section-header,
  .live-main-header,
  .player-header,
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .options {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand h2 {
    max-width: 260px;
  }

  .category-list,
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .live-tools,
  .search-shell,
  .search-shell input {
    width: 100%;
  }

  .player-frame,
  .player-frame video {
    min-height: 260px;
  }
}


/* =========================================================
   Movies Page
   ========================================================= */

.movies-page {
  min-height: 100vh;
  width: min(1340px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.movies-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.movies-sidebar,
.movies-main,
.movie-player-card {
  border: 1px solid var(--card-border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07)),
    rgba(11, 14, 31, 0.75);
  backdrop-filter: blur(28px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.movies-sidebar {
  position: sticky;
  top: 22px;
  padding: 18px;
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.movies-main {
  min-height: 720px;
  display: flex;
  flex-direction: column;
}

.movies-main-header,
.movie-player-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}

.movie-player-header {
  border-bottom: 0;
  padding: 0;
}

.movies-main-header h2,
.movie-player-header h2 {
  letter-spacing: -0.04em;
}

.movies-main-header p,
.movie-player-header p {
  color: var(--muted-2);
  margin-top: 5px;
  font-size: 14px;
}

.movies-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.movie-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  overflow-y: auto;
  max-height: 820px;
}

.movie-grid::-webkit-scrollbar {
  width: 8px;
}

.movie-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
}

.movie-card {
  position: relative;
  min-height: 330px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 82, 119, 0.16), transparent 35%),
    rgba(255,255,255,0.065);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover,
.movie-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 209, 102, 0.38);
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 209, 102, 0.22), transparent 35%),
    rgba(255,255,255,0.09);
  outline: none;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  background:
    linear-gradient(135deg, rgba(124,60,255,0.28), rgba(255,82,119,0.18)),
    rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-fallback {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  font-size: 44px;
  font-weight: 900;
  color: rgba(255,255,255,0.7);
}

.movie-card-body {
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.22;
}

.movie-meta {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.4;
}

.movie-rating {
  position: absolute;
  left: 10px;
  top: 10px;
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,0.52);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
  color: #ffd166;
  font-size: 12px;
  font-weight: 900;
}

.movie-fav-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 13px;
  background: rgba(0,0,0,0.38);
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.movie-fav-btn:hover {
  transform: scale(1.06);
  background: rgba(255,255,255,0.15);
}

.movie-fav-btn.active {
  color: #ffd166;
  background: rgba(255,209,102,0.14);
  border-color: rgba(255,209,102,0.34);
}

.movie-player-card {
  padding: 18px;
}

.movie-player-frame {
  position: relative;
  margin-top: 16px;
  border-radius: 26px;
  overflow: hidden;
  background: #02030a;
  border: 1px solid rgba(255,255,255,0.12);
  min-height: 440px;
  display: grid;
  place-items: center;
}

.movie-player-frame video {
  width: 100%;
  height: 100%;
  min-height: 440px;
  background: #02030a;
  display: block;
}

.movie-detail {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.055);
}

.movie-detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124,60,255,0.28), rgba(255,82,119,0.18)),
    rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
}

.movie-detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-detail h3 {
  font-size: 26px;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.movie-detail-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.movie-detail-description {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  margin-bottom: 16px;
}

.movie-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.movie-detail-empty {
  margin-top: 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px dashed rgba(255,255,255,0.16);
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,0.045);
}

@media (max-width: 1180px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .movies-layout {
    grid-template-columns: 1fr;
  }

  .movies-sidebar {
    position: static;
    max-height: none;
  }

  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: none;
  }
}

@media (max-width: 740px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-detail {
    grid-template-columns: 1fr;
  }

  .movie-detail-poster {
    max-width: 220px;
  }
}

@media (max-width: 620px) {
  .movies-page {
    width: min(100% - 28px, 720px);
    padding: 28px 0;
  }

  .movies-main-header,
  .movie-player-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .movies-tools,
  .movies-tools .search-shell,
  .movies-tools input {
    width: 100%;
  }

  .movie-grid {
    grid-template-columns: 1fr;
  }

  .movie-player-frame,
  .movie-player-frame video {
    min-height: 260px;
  }
}


/* =========================================================
   Series Page
   ========================================================= */

.series-page {
  min-height: 100vh;
  width: min(1340px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.series-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.series-sidebar,
.series-main,
.series-player-card,
.episode-panel {
  border: 1px solid var(--card-border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07)),
    rgba(11, 14, 31, 0.75);
  backdrop-filter: blur(28px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.series-sidebar {
  position: sticky;
  top: 22px;
  padding: 18px;
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.series-main {
  min-height: 720px;
  display: flex;
  flex-direction: column;
}

.series-main-header,
.series-player-header,
.episode-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}

.series-player-header {
  border-bottom: 0;
  padding: 0;
}

.episode-panel-header h2,
.series-main-header h2,
.series-player-header h2 {
  letter-spacing: -0.04em;
}

.episode-panel-header p,
.series-main-header p,
.series-player-header p {
  color: var(--muted-2);
  margin-top: 5px;
  font-size: 14px;
}

.series-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.series-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  overflow-y: auto;
  max-height: 820px;
}

.series-grid::-webkit-scrollbar,
.episode-list::-webkit-scrollbar {
  width: 8px;
}

.series-grid::-webkit-scrollbar-thumb,
.episode-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
}

.series-card {
  position: relative;
  min-height: 330px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 10%, rgba(124, 60, 255, 0.2), transparent 35%),
    rgba(255,255,255,0.065);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.series-card:hover,
.series-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(196, 145, 255, 0.42);
  background:
    radial-gradient(circle at 80% 10%, rgba(196, 145, 255, 0.26), transparent 35%),
    rgba(255,255,255,0.09);
  outline: none;
}

.series-card-body {
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.series-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.22;
}

.series-meta {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.4;
}

.series-fav-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 13px;
  background: rgba(0,0,0,0.38);
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.series-fav-btn:hover {
  transform: scale(1.06);
  background: rgba(255,255,255,0.15);
}

.series-fav-btn.active {
  color: #ffd166;
  background: rgba(255,209,102,0.14);
  border-color: rgba(255,209,102,0.34);
}

.series-player-card {
  padding: 18px;
}

.series-player-frame {
  position: relative;
  margin-top: 16px;
  border-radius: 26px;
  overflow: hidden;
  background: #02030a;
  border: 1px solid rgba(255,255,255,0.12);
  min-height: 440px;
  display: grid;
  place-items: center;
}

.series-player-frame video {
  width: 100%;
  height: 100%;
  min-height: 440px;
  background: #02030a;
  display: block;
}

.episode-panel {
  padding: 0;
}

.episode-panel-body {
  padding: 18px;
}

.series-detail {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.055);
  margin-bottom: 18px;
}

.series-detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124,60,255,0.28), rgba(0,212,255,0.18)),
    rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
}

.series-detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-detail h3 {
  font-size: 26px;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.series-detail-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.series-detail-description {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.season-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.season-tab {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.07);
  color: rgba(246,248,255,0.76);
  cursor: pointer;
  font-weight: 900;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.season-tab:hover,
.season-tab.active {
  background: linear-gradient(135deg, rgba(124,60,255,0.34), rgba(0,212,255,0.16));
  border-color: rgba(196, 145, 255, 0.44);
  transform: translateY(-1px);
  color: white;
}

.episode-list {
  display: grid;
  gap: 10px;
  max-height: 580px;
  overflow-y: auto;
  padding-right: 4px;
}

.episode-card {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.episode-card:hover,
.episode-card.active {
  transform: translateY(-2px);
  border-color: rgba(115,231,255,0.34);
  background: rgba(255,255,255,0.09);
}

.episode-number {
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124,60,255,0.34), rgba(0,212,255,0.16));
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 900;
}

.episode-info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}

.episode-info span {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.4;
}

.episode-play {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 900;
}

.series-detail-empty {
  padding: 18px;
  border-radius: 22px;
  border: 1px dashed rgba(255,255,255,0.16);
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,0.045);
}

@media (max-width: 1180px) {
  .series-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .series-layout {
    grid-template-columns: 1fr;
  }

  .series-sidebar {
    position: static;
    max-height: none;
  }

  .series-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: none;
  }
}

@media (max-width: 740px) {
  .series-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .series-detail {
    grid-template-columns: 1fr;
  }

  .series-detail-poster {
    max-width: 220px;
  }

  .episode-card {
    grid-template-columns: 1fr;
  }

  .episode-number {
    width: 74px;
  }

  .episode-play {
    width: fit-content;
  }
}

@media (max-width: 620px) {
  .series-page {
    width: min(100% - 28px, 720px);
    padding: 28px 0;
  }

  .series-main-header,
  .series-player-header,
  .episode-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .series-tools,
  .series-tools .search-shell,
  .series-tools input {
    width: 100%;
  }

  .series-grid {
    grid-template-columns: 1fr;
  }

  .series-player-frame,
  .series-player-frame video {
    min-height: 260px;
  }
}
