/* ==========================================================================
   STREAM.HTML STYLESHEET - DEDICATED THEATER MODE SPORTS STREAM EXPERIENCE
   ========================================================================== */

.stream-page-body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
}

.stream-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(16, 23, 38, 0.95);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.btn-back-schedule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  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: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-share-stream {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  font-size: 0.8125rem;
  font-weight: 600;
  min-height: 36px;
  transition: all 0.2s ease;
}

.btn-share-stream:hover {
  background: var(--accent-cyan);
  color: #030814;
}

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

.stream-match-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

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

.live-pill-glow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 51, 92, 0.15);
  border: 1px solid rgba(255, 51, 92, 0.4);
  color: var(--accent-live);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.725rem;
  letter-spacing: 0.04em;
}

.stream-league-tag {
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

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

.stream-team-item {
  display: flex;
  align-items: center;
  gap: 12px;
  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: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
}

.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: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.stream-team-name {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

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

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

/* Theater Mode active: player becomes full width */
.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: 16px;
  min-width: 0;
}

/* Video Player Viewport */
.stream-video-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

/* Player Control Bar */
.player-control-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  gap: 12px;
  flex-wrap: wrap;
}

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

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

/* TV Broadcast Guide Card */
.stream-info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.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: var(--text-primary);
}

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

/* Stream Tips Box */
.stream-tips-box {
  background: rgba(0, 210, 255, 0.04);
  border: 1px solid rgba(0, 210, 255, 0.15);
  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-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 440px;
  overflow: hidden;
}

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

.chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.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-gold);
}

.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(0, 0, 0, 0.35);
  border-top: 1px solid var(--border-subtle);
  gap: 8px;
}

.chat-input-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  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: var(--accent-cyan);
  color: #030814;
  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-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.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: var(--text-primary);
}

.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 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  text-decoration: none;
}

.mini-game-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 210, 255, 0.25);
}

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

.mini-game-teams {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  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.6875rem;
  font-weight: 700;
  color: var(--accent-live);
  background: rgba(255, 51, 92, 0.15);
  padding: 2px 6px;
  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: 42px;
    height: 42px;
  }

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

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

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

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