/* TV Planet CSS - Light Blue theme (#6ebeff / #68c7ff) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

body {
  font-family: 'Inter', sans-serif;
  color: #fff;
}

/* Base Stage overrides for TV Page */
.stage {
  display: flex;
  flex-direction: column;
  padding: 40px;
  box-sizing: border-box;
}

/* Header & Back Button */
.tv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  width: 100%;
  margin-bottom: 20px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #6ebeff;
  box-shadow: 0 0 15px rgba(110, 190, 255, 0.3);
  transform: translateY(-2px);
}

/* Secondary logo link on TV Page */
.tv-logo {
  width: 180px;
  height: 95px;
  background-image: url("istoselida.jpg");
  background-position: -22px -23px;
  background-size: 1000px 667px;
  background-repeat: no-repeat;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.tv-logo:hover {
  opacity: 1;
}

/* Main Grid Layout */
.tv-container {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  height: calc(100% - 120px);
  z-index: 5;
  align-items: start;
}

/* Left side: Video Player Column */
.player-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(110, 190, 255, 0.3);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.6), 
    0 0 30px rgba(110, 190, 255, 0.15);
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info-card {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-info-card h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.video-info-card .air-date {
  font-size: 0.85rem;
  color: #6ebeff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: block;
}

.video-info-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
}

/* Right side: Playlist Panel Column */
.playlist-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  max-height: calc(100% - 10px);
}

.playlist-header {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.playlist-header span {
  color: #6ebeff;
  font-size: 0.85rem;
  font-weight: 500;
}

.playlist-scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  height: 100%;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 190, 255, 0.3) transparent;
}

.playlist-scroll::-webkit-scrollbar {
  width: 6px;
}

.playlist-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.playlist-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(110, 190, 255, 0.3);
  border-radius: 20px;
}

/* Playlist Items */
.playlist-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.playlist-item:hover {
  background: rgba(110, 190, 255, 0.08);
  border-color: rgba(110, 190, 255, 0.4);
  transform: translateX(4px);
}

.playlist-item.active {
  background: rgba(110, 190, 255, 0.12);
  border-color: rgba(110, 190, 255, 0.6);
  box-shadow: 0 0 15px rgba(110, 190, 255, 0.15);
}

.thumb-container {
  width: 120px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.playlist-item:hover .play-overlay,
.playlist-item.active .play-overlay {
  opacity: 1;
}

.play-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #6ebeff;
  display: grid;
  place-items: center;
  color: #000;
  box-shadow: 0 4px 10px rgba(110, 190, 255, 0.4);
}

.item-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.item-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  margin: 0 0 6px 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-item.active .item-title {
  color: #6ebeff;
  font-weight: 600;
}

.item-meta {
  font-size: 0.75rem;
  color: #a0a0a0;
  font-weight: 400;
}

/* External Playlist Button */
.youtube-playlist-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  color: #fff;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.youtube-playlist-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.45);
  filter: brightness(1.1);
}

.youtube-playlist-btn svg {
  width: 22px;
  height: 22px;
}

.playlist-load-btn {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(110, 190, 255, 0.3);
  border-radius: 12px;
  color: #6ebeff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 4px;
}

.playlist-load-btn:hover {
  background: rgba(110, 190, 255, 0.08);
  border-color: rgba(110, 190, 255, 0.6);
  color: #fff;
}

/* TV Ambient Planet glow */
.tv-planet-glow {
  position: absolute;
  top: 25%;
  right: 5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 190, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: float-slow 15s ease-in-out infinite alternate;
}

@keyframes float-slow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 20px) scale(1.05); }
}

/* ==========================================================================
   Mobile Styles Override (@media max-width: 760px)
   ========================================================================== */
@media (max-width: 760px) {
  .mobile-page::before {
    background-image: none !important;
    background: radial-gradient(circle at 50% 15%, rgba(110, 190, 255, 0.18), transparent 55%), #050505 !important;
    opacity: 1 !important;
  }

  .mobile-page::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), #000 90%) !important;
  }

  .mobile-tv-content {
    position: relative;
    z-index: 10;
    margin-top: 24px;
    width: 100%;
    max-width: 480px;
    margin-right: auto;
    margin-left: auto;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .mobile-back-wrapper {
    margin-bottom: 0;
  }

  .mobile-video-player-container {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
      0 10px 25px rgba(0,0,0,0.6),
      0 0 20px rgba(110, 190, 255, 0.1);
    border: 1px solid rgba(110, 190, 255, 0.3);
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
  }

  .mobile-video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
  }

  .mobile-tv-info {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .mobile-tv-info h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #fff;
  }

  .mobile-tv-info .air-date {
    font-size: 0.8rem;
    color: #6ebeff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: block;
  }

  .mobile-tv-info p {
    font-size: 0.95rem;
    line-height: 1.55;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
  }

  .mobile-playlist-container {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
  }

  .mobile-playlist-container h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #fff;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-playlist-scroll {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-playlist-container .playlist-item {
    background: rgba(255, 255, 255, 0.02);
  }
}
