* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.08);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.4);
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}
*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

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

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0a0a0a;
  background-size: cover;
  color: #fff;
  position: relative;
  overflow-x: hidden;
}

/* Rotating gradient + breathing circles ambience */
.ambience {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  filter: blur(32px);
}

.ambience-gradient {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, #1a1a1a, #3a3a3a, #171717, #1a1a1a);
  animation: rotateGrad 40s linear infinite;
}

.ambience-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 70%);
  transition: filter 0.6s ease;
}

.ambience-circle.c1 {
  width: 60vmax;
  height: 60vmax;
  top: -15%;
  left: -10%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2) 45%, transparent 70%);
  animation: growBig 22s ease-in-out infinite;
}

.ambience-circle.c2 {
  width: 34vmax;
  height: 34vmax;
  bottom: -8%;
  right: -6%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), rgba(200, 200, 200, 0.2) 45%, transparent 70%);
  animation: shrinkSmall 30s ease-in-out infinite;
}

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

@keyframes growBig {
  0%, 100% { transform: scale(0.85); opacity: 0.55; filter: blur(10px) brightness(1); }
  25% { opacity: 0.9; filter: blur(4px) brightness(1.4); }
  50% { transform: scale(1.15); opacity: 1; filter: blur(0px) brightness(1.8); }
  75% { opacity: 0.9; filter: blur(4px) brightness(1.4); }
}

@keyframes shrinkSmall {
  0%, 100% { transform: scale(1.1); opacity: 0.6; filter: blur(10px) brightness(1); }
  25% { opacity: 0.9; filter: blur(4px) brightness(1.4); }
  50% { transform: scale(0.8); opacity: 1; filter: blur(0px) brightness(1.8); }
  75% { opacity: 0.9; filter: blur(4px) brightness(1.4); }
}

.site-header {
  background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('/background_lookplay.png') no-repeat center center;
  background-size: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 95%;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo-link {
  display: inline-flex;
  text-decoration: none;
}

.header-logo {
  height: 40px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}

.header-nav a:hover {
  opacity: 0.7;
}

.nav-search {
  flex: 1;
  max-width: 460px;
  position: relative;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(15, 15, 18, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-dropdown[hidden] {
  display: none;
}

.search-dropdown.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sd-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  color: #fff;
  text-decoration: none;
  opacity: 0;
  transform: translateX(-6px);
  transition: background 0.15s, opacity 0.3s ease, transform 0.3s ease;
  animation: sdFade 0.28s ease forwards;
}

.sd-item:nth-child(1) { animation-delay: 0.03s; }
.sd-item:nth-child(2) { animation-delay: 0.07s; }
.sd-item:nth-child(3) { animation-delay: 0.11s; }
.sd-item:nth-child(4) { animation-delay: 0.15s; }
.sd-item:nth-child(5) { animation-delay: 0.19s; }
.sd-item:nth-child(6) { animation-delay: 0.23s; }

@keyframes sdFade {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.sd-item + .sd-item {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sd-item:hover {
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.15), rgba(255, 255, 255, 0.05));
}

.sd-item img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 4px;
}

.sd-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.sd-body strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-body small {
  font-size: 12px;
  opacity: 0.6;
}

.sd-empty {
  display: block;
  padding: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 14px 18px 14px 46px;
  color: #fff;
  font-size: 17px;
  outline: none;
  letter-spacing: 0.3px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: 15px center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.3px;
}

.search-input:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.search-input:focus {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  border-bottom-color: #e50914;
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.25);
  transform: translateY(-1px);
}

.site-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.hero {
  text-align: center;
  max-width: 600px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 20px;
  opacity: 0.8;
  line-height: 1.6;
}

.site-footer {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/footerbg.png') no-repeat center center;
  background-size: cover;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-lookgroup {
  height: 32px;
  width: auto;
}

.footer-lookgroup-link {
  display: inline-flex;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-lookgroup-link:hover {
  opacity: 0.8;
}

.footer-copyright {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: #333;
  background: #fff;
  padding: 10px 0;
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logos img {
  height: 24px;
  width: auto;
  transition: opacity 0.2s;
}

.footer-logos img:hover,
.footer-logos a:hover img {
  opacity: 1;
}

.footer-logos a {
  display: inline-flex;
  text-decoration: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  z-index: 110;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.97);
    flex-direction: column;
    gap: 0;
    padding: 0 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-12px);
    visibility: hidden;
    transition: max-height 0.4s ease, opacity 0.35s ease, transform 0.4s ease, visibility 0.4s;
  }

  .header-nav.open {
    max-height: 420px;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    padding: 16px 24px;
  }

  .header-nav a {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-search {
    max-width: none;
    margin-bottom: 8px;
  }
}

/* ---------- Content pages ---------- */

.page-main {
  flex: 1;
  padding: 40px 24px;
}

.page-header {
  max-width: 1200px;
  margin: 0 auto 28px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header p {
  opacity: 0.8;
  font-size: 16px;
}

.grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  overflow: hidden;
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-5px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.5);
}

.card-link {
  display: block;
  color: #fff;
  text-decoration: none;
}

.card-thumb {
  aspect-ratio: 16 / 8;
  background: radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card-thumb img {
  height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-body p {
  font-size: 13px;
  opacity: 0.7;
}

.card-badge {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 3px 10px;
  border-radius: 0;
  margin-bottom: 10px;
}

/* Contact page */
.contact-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  padding: 10px 12px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: background 0.2s, border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
  background: linear-gradient(135deg, #fff 0%, #e6e6e6 100%);
  color: #000;
  border: none;
  border-radius: 0;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-form button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #fff 0%, #d4d4d4 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.contact-form button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.contact-info {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.8;
  word-break: break-word;
}

.contact-info a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  transition: border-color 0.2s, color 0.2s;
}

.contact-info a:hover {
  color: #ccc;
  border-color: #ccc;
}

/* Auth pages */
.login-link {
  text-decoration: none;
}

.auth-wrap {
  max-width: 380px;
  margin: 0 auto;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.auth-form input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  padding: 10px 12px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: background 0.2s, border-color 0.2s;
}

.auth-form input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
}

.auth-form button {
  background: linear-gradient(135deg, #e50914, #b00610);
  border: none;
  color: #fff;
  border-radius: 0;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: filter 0.2s;
}

.auth-form button:hover {
  filter: brightness(1.1);
}

.auth-form button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.auth-msg {
  font-size: 13px;
  color: #ff5a5f;
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
}

.auth-switch a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

/* Search results */
.search-summary {
  max-width: 1200px;
  margin: 0 auto 24px;
  font-size: 15px;
  opacity: 0.8;
}

.search-summary strong {
  color: #fff;
}

.empty-state {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 24px;
  opacity: 0.7;
}

.search-loading {
  max-width: 1200px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}

.loading-label {
  font-size: 14px;
  letter-spacing: 0.4px;
  opacity: 0.8;
  text-transform: uppercase;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Channel page (cinematic player) ---------- */

.channel-body {
  background: #0a0a0a;
}

.channel-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 24px;
}

.player {
  width: 100%;
  max-width: none;
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: 78vh;
  background:
    radial-gradient(120% 120% at 50% 30%, rgba(30, 30, 40, 0.9), #000 70%),
    #000;
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.player-stage.is-cinematic .player-info {
  padding-left: 48px;
  padding-right: 48px;
}

.player-stage.is-cinematic .player-controls {
  right: 40px;
  bottom: 40px;
}

.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 120% at 50% 30%, rgba(30, 30, 40, 0.5), #000 70%),
    #000;
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.lag-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  text-transform: uppercase;
}

.player-loading {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.live-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  background: #e50914;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.live-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 60%, 100% { opacity: 1; }
  30% { opacity: 0.25; }
}

.player-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 22px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.player-info h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.now-playing {
  font-size: 14px;
  opacity: 0.8;
  color: #fff;
}

.player-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctrl {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.ctrl:hover {
  background: rgba(255, 255, 255, 0.25);
}

.ctrl svg {
  width: 20px;
  height: 20px;
}

#btn-play .ico-play { display: none; }
#btn-play.playing .ico-play { display: block; }
#btn-play.playing .ico-pause { display: none; }
#btn-play.playing { background: #fff; color: #000; }

#btn-vol.muted { opacity: 0.5; }

.vol-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vol-val {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
  width: 24px;
  text-align: center;
}

#range-vol {
  width: 90px;
  accent-color: #e50914;
  cursor: pointer;
}

@media (max-width: 640px) {
  #range-vol { width: 60px; }
}

/* EPG — horizontal thumbnail grid */
.epg-grid {
  max-width: 1600px;
  margin: 32px auto 0;
  padding: 0 24px;
}

.epg-grid-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.epg-grid-head h2 {
  font-size: 20px;
  font-weight: 800;
}

.epg-date {
  font-size: 13px;
  text-transform: capitalize;
  opacity: 0.6;
}

.user-slot {
  position: relative;
  display: flex;
  align-items: center;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 10px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  transition: background 0.2s, border-color 0.2s;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.user-avatar-circle {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #e50914, #ff5a5f);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-err {
  font-size: 12px;
  color: #e50914;
}

/* ---- auth dropdown ---- */
.user-auth {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.user-auth-toggle {
  background: linear-gradient(135deg, #e50914, #b00610);
  border: none;
  color: #fff;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 0;
  transition: filter 0.2s;
}

.user-auth-toggle:hover {
  filter: brightness(1.1);
}

.user-auth-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  z-index: 200;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.user-auth-panel[hidden] {
  display: none;
}

.user-auth-tabs {
  display: flex;
}

.user-tab {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  padding: 7px 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.user-tab.is-active {
  color: #fff;
  border-bottom-color: #e50914;
}

.user-auth-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  padding: 9px 11px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.user-auth-input:focus {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.35);
}

.user-auth-submit {
  background: linear-gradient(135deg, #e50914, #b00610);
  border: none;
  color: #fff;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 0;
}

.user-auth-submit:disabled {
  opacity: 0.5;
  cursor: wait;
}

.user-auth-msg {
  font-size: 12px;
  color: #ff5a5f;
}

.user-auth-msg[hidden] {
  display: none;
}

@media (max-width: 768px) {
  .user-slot {
    padding: 14px 0;
    width: 100%;
    justify-content: flex-end;
  }

  .user-chip {
    border: none;
    padding: 0;
  }

  .user-auth {
    align-items: stretch;
    width: 100%;
  }

  .user-auth-panel {
    position: static;
    width: 100%;
  }
}

.epg-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.epg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
  background: rgba(10, 10, 10, 0.75);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.epg-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.epg-arrow:first-child {
  left: 0;
}

.epg-arrow:last-child {
  right: 0;
}

.epg-scroll-wrap,
.clist-scroll-wrap {
  position: relative;
}

.epg-scroll-wrap .scroll-view,
.clist-scroll-wrap .scroll-view {
  padding-left: 12px;
  padding-right: 12px;
}

.scroll-view {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.scroll-view::-webkit-scrollbar {
  height: 8px;
}
.scroll-view::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 0;
}
.scroll-view::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.epg-cell {
  scroll-snap-align: start;
  width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.55);
  transition: transform 0.2s, border-color 0.2s;
}

.epg-cell:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
}

.epg-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 120% at 50% 30%, rgba(30, 30, 40, 0.9), #000 70%),
    #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.epg-thumb img {
  height: 45%;
  width: auto;
  max-width: 70%;
  object-fit: contain;
  opacity: 0.7;
}

.epg-time {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 0;
}

.epg-mark {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e50914;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 0;
  text-transform: uppercase;
}

.epg-cell.is-live .epg-thumb {
  box-shadow: inset 0 0 0 2px rgba(229, 9, 20, 0.55);
}

.epg-cell-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.epg-cell-body strong {
  font-size: 14px;
  font-weight: 700;
}

.epg-cell-body small {
  font-size: 12px;
  opacity: 0.6;
}

/* Channel list */
.clist {
  max-width: 1600px;
  margin: 32px auto 0;
  padding: 0 24px;
}

.clist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.clist-head h2 {
  font-size: 20px;
  font-weight: 800;
}

.clist-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.clist-grid::-webkit-scrollbar {
  height: 8px;
}
.clist-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 0;
}
.clist-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

.clist-item {
  scroll-snap-align: start;
  display: block;
  width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.clist-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
}

.clist-item.is-active {
  border-color: #e50914;
  background: rgba(229, 9, 20, 0.12);
}

.clist-thumb {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 120% at 50% 30%, rgba(30, 30, 40, 0.9), #000 70%),
    #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clist-item.is-active .clist-thumb {
  box-shadow: inset 0 0 0 2px rgba(229, 9, 20, 0.55);
}

.clist-thumb img {
  height: 45%;
  width: auto;
  max-width: 70%;
  object-fit: contain;
  opacity: 0.7;
}

.clist-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  min-width: 0;
}

.clist-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clist-desc {
  font-size: 12px;
  opacity: 0.6;
}
