/* ==========================================================================
   STREAM.HTML STYLESHEET - NEXT-GEN THEATER MODE SPORTS STREAM EXPERIENCE
   Obsidian Dark Luxury Theme • High-Tech Video Viewport & Multi-Server Switcher
   ========================================================================== */

:root {
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
}

.stream-page-body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 50% -120px, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 10% 260px, rgba(59, 130, 246, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 90% 420px, rgba(168, 85, 247, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
}

.stream-header {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
}

.stream-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.4) 50%, transparent 100%);
  pointer-events: none;
}

.stream-nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-back-schedule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 36px;
}

.btn-back-schedule:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateX(-2px);
}

.btn-share-stream {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--accent-gold-bright);
  font-size: 0.8125rem;
  font-weight: 700;
  min-height: 36px;
  transition: all 0.2s ease;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.btn-share-stream:hover {
  background: var(--accent-gold-gradient);
  color: #06080d;
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

/* ---------------- MATCH BANNER ---------------- */
.stream-main-content {
  padding: 24px 0 60px 0;
  flex: 1;
}

.stream-match-banner {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.stream-match-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald), var(--accent-live));
}

.match-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
}

.live-pill-glow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255, 42, 95, 0.2) 0%, rgba(244, 63, 94, 0.1) 100%);
  border: 1px solid rgba(255, 42, 95, 0.5);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.725rem;
  letter-spacing: 0.05em;
  box-shadow: 0 0 14px rgba(255, 42, 95, 0.35);
}

.stream-league-tag {
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
}

.stream-time-tag {
  color: var(--text-muted);
}

.stream-teams-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}

.stream-team-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.stream-team-item.team-left {
  justify-content: flex-end;
}

.stream-team-item.team-right {
  justify-content: flex-start;
  flex-direction: row-reverse;
}

.stream-team-badge-wrap {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.stream-team-badge-wrap img {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  display: block;
}

.stream-team-fallback {
  width: 100% !important;
  height: 100% !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 245, 155, 0.15) 100%);
}

.stream-team-name {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.stream-vs-box {
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--accent-cyan);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
}

/* ---------------- PLAYER LAYOUT GRID ---------------- */
.player-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  align-items: start;
}

.player-layout-grid.theater-mode {
  grid-template-columns: 1fr;
}

.player-layout-grid.theater-mode .stream-sidebar {
  display: none;
}

.player-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* Video Player Viewport */
.stream-video-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-card-hover);
  box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.8), 0 0 30px -5px rgba(0, 212, 255, 0.2);
}

/* Player Control Bar */
.player-control-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.stream-server-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.server-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.server-pill {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-height: 32px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.server-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.server-pill.active {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #0070f3 100%);
  border-color: rgba(0, 212, 255, 0.6);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.35);
}

.player-utility-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-player-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-height: 32px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-player-action:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

/* TV Broadcast Guide Card */
.stream-info-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.info-icon {
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
}

.info-card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.tv-guide-pills-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.channel-tag {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.775rem;
}

/* Stream Tips Box */
.stream-tips-box {
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.tips-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.tips-title h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* ---------------- SIDEBAR (LIVE CHAT & OTHER GAMES) ---------------- */
.stream-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Live Chat Card */
.chat-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 440px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(14, 21, 38, 0.9);
  border-bottom: 1px solid var(--border-subtle);
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.chat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.chat-online-count {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.chat-messages-container {
  flex: 1;
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.8125rem;
}

.chat-message-row {
  line-height: 1.4;
  word-break: break-word;
}

.chat-user {
  font-weight: 700;
  color: var(--accent-cyan);
  margin-right: 6px;
}

.chat-user.user-pro {
  color: var(--accent-amber);
}

.chat-user.user-mod {
  color: var(--accent-live);
}

.chat-text {
  color: var(--text-secondary);
}

.chat-input-form {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: rgba(10, 15, 28, 0.95);
  border-top: 1px solid var(--border-subtle);
  gap: 8px;
}

.chat-input-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #ffffff;
  font-size: 0.8125rem;
  outline: none;
}

.chat-input-form input:focus {
  border-color: var(--accent-cyan);
}

.btn-send-chat {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #0070f3 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.btn-send-chat:hover {
  opacity: 0.9;
}

/* Other Live Games Card */
.other-games-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.other-games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.other-games-header h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
}

.view-all-link {
  font-size: 0.775rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.other-games-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-game-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
  text-decoration: none;
}

.mini-game-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateX(2px);
}

.mini-game-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mini-game-teams {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-game-league {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.mini-game-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #ff2a5f 0%, #f43f5e 100%);
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ---------------- RESPONSIVE BREAKPOINTS (MOBILE & TABLET) ---------------- */
@media (max-width: 900px) {
  .player-layout-grid {
    grid-template-columns: 1fr;
  }

  .chat-card {
    height: 380px;
  }
}

@media (max-width: 600px) {
  .stream-teams-heading {
    flex-direction: column;
    gap: 10px;
  }

  .stream-team-item.team-left,
  .stream-team-item.team-right {
    justify-content: center;
    flex-direction: row;
    width: 100%;
  }

  .stream-team-badge-wrap {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .stream-team-name {
    font-size: 1.1rem;
  }

  .stream-vs-box {
    margin: 4px 0;
  }

  .player-control-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .stream-server-bar,
  .player-utility-btns {
    justify-content: center;
  }
}
