/* ============================================================
   SAGU Stream - Ultra Modern Cinema & Telegram Video Player
   Host: sagu.pages.dev | Repo: gitlab.com/surga/sagu
   ============================================================ */

:root {
  --bg-primary: #07090e;
  --bg-surface: #0f131d;
  --bg-card: rgba(20, 26, 38, 0.7);
  --bg-card-hover: rgba(28, 37, 54, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 242, 254, 0.4);
  
  --text-main: #f3f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-tg: #229ed9;
  --accent-tg-hover: #1b82b3;
  --accent-coral: #ff5e62;
  --accent-glow: rgba(0, 242, 254, 0.25);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(34, 158, 217, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(0, 242, 254, 0.05) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Utilities */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
}

.gradient-text {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #ff5e62 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(20px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  font-size: 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 12px rgba(255, 94, 98, 0.5));
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  letter-spacing: 0.5px;
}

/* Nav Search */
.nav-search-wrap {
  flex: 1;
  max-width: 460px;
  margin: 0 1.5rem;
  position: relative;
}

.nav-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.nav-search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.2);
}

.nav-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #05101a;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-tg {
  background: #229ed9;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.3);
}

.btn-tg:hover {
  background: #1d8bbf;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 158, 217, 0.45);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-icon-only {
  padding: 0.6rem;
  width: 38px;
  height: 38px;
  justify-content: center;
}

/* Category Filter Bar */
.category-bar {
  display: flex;
  gap: 0.6rem;
  padding: 0.8rem 2rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.cat-pill:hover,
.cat-pill.active {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.35);
}

/* Main Container */
.main-container {
  max-width: 1480px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 2rem;
  transition: var(--transition);
}

.main-container.theater-mode {
  grid-template-columns: 1fr;
}

/* ============================================================
   VIDEO STAGE & AMBIENT GLOW
   ============================================================ */
.player-stage-wrap {
  position: relative;
  width: 100%;
}

/* Ambient Backlight Canvas/Glow */
.ambient-glow {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border-radius: var(--radius-lg);
  filter: blur(55px);
  opacity: 0.65;
  z-index: 1;
  pointer-events: none;
  transition: background 0.8s ease, opacity 0.5s ease;
  background: radial-gradient(circle at center, rgba(34, 158, 217, 0.45) 0%, rgba(255, 94, 98, 0.2) 60%, transparent 80%);
}

.ambient-glow.hidden {
  opacity: 0 !important;
}

.player-card {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* Mode Switcher Tabs */
.player-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: #0d111a;
  border-bottom: 1px solid var(--border-subtle);
}

.mode-tabs {
  display: flex;
  gap: 0.5rem;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.mode-btn.active {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(0, 242, 254, 0.3);
}

.mode-btn-tg.active {
  background: rgba(34, 158, 217, 0.18);
  color: #5ac4f5;
  border-color: rgba(34, 158, 217, 0.4);
}

.player-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tool-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.95rem;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.tool-icon-btn:hover,
.tool-icon-btn.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

/* Cinema Video Container */
.video-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

video#html5-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Custom Video Controls */
.video-overlay-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.65) 0%, transparent 25%, transparent 70%, rgba(0,0,0,0.85) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.video-viewport:hover .video-overlay-controls,
.video-overlay-controls.active {
  opacity: 1;
  pointer-events: auto;
}

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

.video-badge-tag {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
}

.controls-center {
  align-self: center;
}

.btn-center-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.2);
  border: 2px solid var(--accent-cyan);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.btn-center-play:hover {
  transform: scale(1.1);
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.6);
}

.controls-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Scrubber Timeline */
.timeline-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: height 0.15s ease;
}

.timeline-bar-wrap:hover {
  height: 10px;
}

.timeline-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  width: 0%;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-coral));
  border-radius: 3px;
  width: 0%;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.8);
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-left,
.controls-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0.9;
}

.ctrl-btn:hover {
  opacity: 1;
  color: var(--accent-cyan);
  transform: scale(1.1);
}

.time-display {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.volume-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.volume-slider {
  width: 70px;
  accent-color: var(--accent-cyan);
  height: 4px;
  cursor: pointer;
}

.speed-select {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.78rem;
  cursor: pointer;
  outline: none;
}

/* Telegram Viewport */
.telegram-viewport {
  width: 100%;
  background: #0f141f;
  padding: 1.5rem;
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

.telegram-viewport.active {
  display: flex;
}

.tg-hero-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  background: rgba(22, 28, 41, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid rgba(34, 158, 217, 0.25);
  overflow: hidden;
  padding: 1.2rem;
  position: relative;
}

.tg-thumb-box {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #000;
}

.tg-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tg-hero-card:hover .tg-thumb-img {
  transform: scale(1.04);
}

.tg-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tg-pulse-play {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #229ed9;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 20px rgba(34, 158, 217, 0.7);
}

.tg-duration-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.tg-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tg-channel-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tg-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #229ed9;
}

.tg-author-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.tg-handle {
  font-size: 0.82rem;
  color: #229ed9;
}

.tg-post-quote {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #229ed9;
  padding: 0.6rem 0.9rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--text-main);
  margin: 0.75rem 0;
}

.tg-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Telegram Widget Container */
.telegram-embed-box {
  background: rgba(14, 18, 27, 0.5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 260px;
}

.tg-embed-title {
  width: 100%;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#tg-widget-mount {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Video Details Section */
.video-info-box {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-main-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
}

.video-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.channel-meta-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.channel-avatar-lg {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
}

.channel-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.channel-subtext {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.video-action-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Description & Tags */
.video-desc-box {
  background: rgba(18, 23, 34, 0.6);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  border: 1px solid var(--border-subtle);
}

.desc-stats {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1rem;
}

.desc-text {
  font-size: 0.92rem;
  color: #cbd5e1;
  white-space: pre-line;
}

.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.tag-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(79, 172, 254, 0.1);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.tag-badge:hover {
  background: rgba(79, 172, 254, 0.25);
}

/* ============================================================
   SIDEBAR / PLAYLIST SECTION
   ============================================================ */
.sidebar-playlist {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.playlist-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.playlist-count {
  font-size: 0.78rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.video-item-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.video-item-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.video-item-card.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.15);
}

.card-thumb-wrap {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.card-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.85);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  color: #fff;
}

.card-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-channel {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
}

.active-indicator {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  color: var(--accent-cyan);
  font-size: 0.75rem;
}

.video-item-card.active .active-indicator {
  display: block;
}

/* ============================================================
   MODALS & TOAST
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 520px;
  background: #111622;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
}
.modal-close-btn:hover {
  color: #fff;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.key-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  background: rgba(15, 22, 35, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border-subtle);
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  background: rgba(10, 13, 19, 0.8);
}

.footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
  }
  .tg-hero-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .nav-search-wrap {
    order: 3;
    max-width: 100%;
    margin: 0;
    width: 100%;
  }
  .main-container {
    padding: 0 1rem;
    margin: 1rem auto;
  }
  .video-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .video-action-btns {
    width: 100%;
    justify-content: space-between;
  }
}
/* Mode 3: Iframe Embed Player */
.iframe-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.iframe-player {
  width: 100%;
  height: 100%;
  border: none;
}

.mode-btn-iframe.active {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}
