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

body {
  font-family: 'Outfit', sans-serif;
  background-color: #0b0e14;
  color: #ffffff;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}

/* Background Ambient Glow */
.ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vh;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.12) 0%, rgba(0, 210, 255, 0.08) 50%, rgba(0, 0, 0, 0) 100%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  transition: background 1s ease;
}

/* Header */
.header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem 4rem 1rem 4rem;
}

.logo-container h1 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #ffffff, #a0aec0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.clock-container {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #a0aec0;
}

/* Main Container */
.main-container {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4rem 3rem 4rem;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 1600px;
}

/* Channel Card */
.channel-card {
  position: relative;
  height: 420px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
  overflow: hidden;
}

.channel-card:focus, .channel-card.focused {
  transform: translateY(-12px) scale(1.04);
  border-color: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.card-badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1px;
}

/* Simpsons Specific */
.simpsons-card.focused, .simpsons-card:focus {
  border-color: #ffd700;
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.4);
}

.simpsons-logo {
  color: #ffd700;
  font-size: 2.2rem;
  font-weight: 900;
  text-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* Futurama Specific */
.futurama-card.focused, .futurama-card:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.4);
}

.futurama-logo {
  color: #00f0ff;
  font-size: 2.2rem;
  font-weight: 900;
  text-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
}

/* Family Guy Specific */
.familyguy-card.focused, .familyguy-card:focus {
  border-color: #ff4757;
  box-shadow: 0 0 35px rgba(255, 71, 87, 0.4);
}

.familyguy-logo {
  color: #ff4757;
  font-size: 2.2rem;
  font-weight: 900;
  text-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

/* Dragon Ball Z Specific */
.dragonballz-card.focused, .dragonballz-card:focus {
  border-color: #ff9900;
  box-shadow: 0 0 35px rgba(255, 153, 0, 0.5);
}

.dragonballz-logo {
  color: #ff9900;
  font-size: 2rem;
  font-weight: 900;
  text-shadow: 0 4px 15px rgba(255, 153, 0, 0.5);
}

.now-playing-box {
  margin-top: 1.5rem;
}

.now-playing-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: #718096;
  letter-spacing: 1px;
}

.ep-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 6px 0 14px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3.2em;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #ffffff;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.simpsons-card .progress-bar { background: #ffd700; }
.futurama-card .progress-bar { background: #00f0ff; }
.familyguy-card .progress-bar { background: #ff4757; }
.dragonballz-card .progress-bar { background: #ff9900; }

.watch-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.channel-card:focus .watch-btn, .channel-card.focused .watch-btn {
  background: #ffffff;
  color: #0b0e14;
}

/* Fullscreen Player */
.player-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  z-index: 100;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* OSD Overlay */
.osd-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.osd-overlay.hidden-osd {
  opacity: 0;
}

.osd-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.osd-channel-badge {
  font-size: 1.5rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 10px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.osd-live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ef4444;
  font-weight: 800;
}

.osd-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.osd-subtitle {
  font-size: 0.85rem;
  color: #a0aec0;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.osd-ep-info h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 6px 0 16px 0;
  max-width: 800px;
}

.osd-progress-line {
  width: 600px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.osd-progress-fill {
  height: 100%;
  background: #ffffff;
}

.osd-controls-hint {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
  color: #718096;
  font-size: 0.9rem;
  font-weight: 600;
}

.hidden {
  display: none !important;
}
