/* assets/css/style.css - ViralVdes Modern Dark/Netflix UI */

:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #12121e;
  --bg-card: #181828;
  --bg-card-hover: #222236;
  --accent-color: #ff2a54;
  --accent-gradient: linear-gradient(135deg, #ff2a54 0%, #ff6b4a 100%);
  --accent-glow: 0 4px 20px rgba(255, 42, 84, 0.4);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:visited {
  color: inherit;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 18, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-brand img,
.brand-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.brand-text {
  display: inline-flex;
  align-items: center;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--text-primary);
}

.brand-highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-brand span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Desktop Category Navigation Pills */
.desktop-nav-pills {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Mobile-only category pills (hidden on PC view to prevent duplicate navigation) */
.category-pill.mobile-only-pill,
.mobile-only-pill {
  display: none !important;
}

@media (max-width: 768px) {
  .category-pill.mobile-only-pill,
  .mobile-only-pill {
    display: inline-flex !important;
  }
}

/* Desktop Search Form */
.desktop-nav-search {
  flex: 1;
  max-width: 450px;
}

.nav-search {
  width: 100%;
  position: relative;
}

.nav-search input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.3s ease;
}

.nav-search input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(255, 42, 84, 0.25);
}

.nav-search i {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Mobile Header Action Controls (Hidden on Desktop) */
.mobile-nav-actions {
  display: none;
  align-items: center;
  gap: 0.6rem;
}

.mobile-search-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-search-btn:hover {
  border-color: var(--accent-color);
  color: var(--text-primary);
}

/* 3-Line Hamburger Menu Toggle Button */
.nav-toggle-btn {
  width: 42px;
  height: 40px;
  background: rgba(255, 42, 84, 0.12);
  border: 1px solid rgba(255, 42, 84, 0.35);
  color: #ff2a54;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 42, 84, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle-btn:hover {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--accent-glow);
  transform: scale(1.05);
}

.nav-toggle-btn:active {
  transform: scale(0.95);
}

/* Mobile Navigation Backdrop Overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 10, 0.82);
  backdrop-filter: blur(10px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Mobile Navigation Slide-in Drawer */
.mobile-nav-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 320px !important;
  max-width: 86vw !important;
  background: #111120 !important;
  border-left: 1px solid rgba(255, 42, 84, 0.3) !important;
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.85) !important;
  z-index: 10000 !important;
  transform: translateX(100%) !important;
  visibility: hidden !important;
  opacity: 0 !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.35s ease !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 1.4rem 1.2rem !important;
  overflow-y: auto !important;
}

.mobile-nav-drawer.open {
  transform: translateX(0) !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.2rem;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
  transform: rotate(90deg);
}

.drawer-search-box {
  margin-bottom: 1.4rem;
}

.drawer-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.drawer-search-form input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.7rem 2.8rem 0.7rem 2.3rem;
  border-radius: 10px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.3s;
}

.drawer-search-form input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(255, 42, 84, 0.25);
}

.drawer-search-form i.fa-search {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.drawer-search-form button {
  position: absolute;
  right: 0.35rem;
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(255, 42, 84, 0.3);
}

.drawer-menu-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.drawer-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.drawer-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.drawer-link:hover {
  background: rgba(255, 42, 84, 0.08);
  border-color: rgba(255, 42, 84, 0.4);
  transform: translateX(4px);
}

.drawer-link.active {
  background: linear-gradient(135deg, rgba(255,42,84,0.18) 0%, rgba(255,107,74,0.1) 100%);
  border-color: var(--accent-color);
  box-shadow: 0 2px 15px rgba(255,42,84,0.25);
}

.drawer-link-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.drawer-link-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.drawer-link-text strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.drawer-link-text small {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.drawer-link:hover .drawer-arrow {
  transform: translateX(3px);
  color: var(--accent-color);
}

.drawer-footer {
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.drawer-badge-18 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #ff2a54;
  font-weight: 700;
  background: rgba(255, 42, 84, 0.1);
  border: 1px solid rgba(255, 42, 84, 0.3);
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 0.5rem;
}

.drawer-badge-18 span {
  background: #ff2a54;
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.drawer-copyright {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Category Pill Navigation */
.categories-bar {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg-primary);
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 0.5rem 1.1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.category-pill:hover,
.category-pill.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(255, 42, 84, 0.3);
}

.btn-upload {
  background: var(--accent-gradient);
  color: #fff;
  padding: 0.55rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--accent-glow);
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 42, 84, 0.6);
}

/* Container */
.container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Video Grid (Desktop 3-4 columns) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.35rem;
}

/* 2-Column Mobile Grid for Phone Screens (Home, Recent, Trending, Search) */
@media (max-width: 768px) {
  .desktop-nav-pills,
  .desktop-nav-search {
    display: none !important;
  }
  .mobile-nav-actions {
    display: flex !important;
  }
  .container {
    padding: 0.85rem 0.65rem;
  }
  /* Strict 2-Column Grid on Mobile Phone */
  .video-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem;
  }
  .card-info {
    padding: 0.6rem 0.5rem;
    gap: 0.2rem;
  }
  .card-title {
    font-size: 0.82rem;
    line-height: 1.35;
  }
  .card-meta {
    font-size: 0.72rem;
    gap: 0.35rem;
    flex-wrap: wrap;
  }
  .hero-banner {
    padding: 1.5rem 1rem !important;
    min-height: 220px !important;
    margin-bottom: 1.4rem !important;
  }
  .navbar {
    padding: 0.65rem 0.85rem;
    gap: 0.75rem;
  }
  .nav-brand {
    font-size: 1.4rem;
    gap: 0.55rem;
  }
  .brand-text {
    font-size: 1.4rem;
  }
  .brand-logo-img {
    width: 32px;
    height: 32px;
  }
  .category-pill {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.75rem 0.45rem;
  }
  /* Strict 2-Column Grid on small screens */
  .video-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.45rem;
  }
  .card-info {
    padding: 0.45rem 0.4rem;
  }
  .card-title {
    font-size: 0.76rem;
    font-weight: 600;
  }
  .card-meta {
    font-size: 0.65rem;
  }
  .section-title {
    font-size: 1.15rem;
  }
}

/* Video Card */
.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.video-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 42, 84, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.thumbnail-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #05050a;
  overflow: hidden;
}

.thumbnail-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .thumbnail-wrapper img {
  transform: scale(1.05);
}

.video-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: auto;
}

/* Watch Page Layout */
.watch-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
}

.player-box {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  width: 100%;
}

/* Multi-Server Switcher Bar */
.server-switcher-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.85rem 1.2rem;
  margin-top: 1rem;
}

.server-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.server-title {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.server-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  text-align: right;
  line-height: 1.3;
}

.server-btn-list {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.server-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.server-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.server-btn.active {
  background: linear-gradient(135deg, rgba(255, 42, 84, 0.2) 0%, rgba(255, 107, 74, 0.2) 100%);
  border-color: var(--accent-color);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 42, 84, 0.35);
}

.server-btn.active::after {
  content: "●";
  font-size: 0.6rem;
  color: #10b981;
  margin-left: 2px;
}

.video-details-box {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  margin-top: 1.2rem;
}

.video-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-action {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-action:hover, .btn-action.liked {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
}

/* Watch Page Up Next Sidebar & Grid Styles */
.watch-sidebar {
  display: flex;
  flex-direction: column;
}

.up-next-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.up-next-card {
  display: flex;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  padding: 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.up-next-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 42, 84, 0.4);
  transform: translateX(4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.up-next-thumb {
  width: 130px;
  height: 74px;
  flex-shrink: 0;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.up-next-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.up-next-card:hover .up-next-thumb img {
  transform: scale(1.06);
}

.up-next-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.85);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 3px;
}

.up-next-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  flex: 1;
  gap: 0.3rem;
}

.up-next-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
}

.up-next-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Responsive Watch Page & 2-Column Up Next on Mobile (<= 992px, <= 768px, <= 480px) */
@media (max-width: 992px) {
  .watch-container {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  /* 2-Column Grid in 1 Line for Mobile Phone Up Next */
  .up-next-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }
  
  .up-next-card {
    flex-direction: column !important;
    padding: 0 !important;
    border-radius: var(--radius) !important;
  }
  
  .up-next-card:hover {
    transform: translateY(-4px) !important;
  }
  
  .up-next-thumb {
    width: 100% !important;
    height: auto !important;
    padding-top: 56.25% !important; /* 16:9 Aspect Ratio */
    border-radius: var(--radius) var(--radius) 0 0 !important;
  }
  
  .up-next-thumb img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  .up-next-info {
    padding: 0.6rem 0.5rem !important;
    gap: 0.25rem !important;
  }
  
  .up-next-title {
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
  }
  
  .up-next-meta {
    font-size: 0.7rem !important;
    gap: 0.35rem !important;
    flex-wrap: wrap !important;
  }

  .video-details-box {
    padding: 1rem !important;
    margin-top: 0.85rem !important;
  }

  .video-details-box h1 {
    font-size: 1.15rem !important;
  }

  .video-actions {
    gap: 0.6rem !important;
  }

  .action-btn-group {
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
  }

  .btn-action {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.82rem !important;
  }
  
  .provider-bar {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.78rem !important;
  }
  
  .server-switcher-box {
    padding: 0.75rem 0.9rem !important;
  }
  
  .server-title {
    font-size: 0.82rem !important;
  }
  
  .server-hint {
    font-size: 0.72rem !important;
  }
  
  .server-btn {
    padding: 0.45rem 0.8rem !important;
    font-size: 0.78rem !important;
  }
}

@media (max-width: 480px) {
  .up-next-grid {
    gap: 0.45rem !important;
  }
  .up-next-info {
    padding: 0.45rem 0.4rem !important;
  }
  .up-next-title {
    font-size: 0.76rem !important;
    font-weight: 600 !important;
  }
  .up-next-meta {
    font-size: 0.65rem !important;
  }
}

/* Admin Responsive Navigation & Layout */
.admin-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 17, 34, 0.95);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-nav-links {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Admin Dashboard Table & Forms */
.admin-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-box:hover {
  border-color: rgba(255, 42, 84, 0.35);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-color);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

/* Mobile Video Management Cards (Hidden on Desktop, Visible on Mobile) */
.admin-video-mobile-list {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-video-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.admin-video-card-top {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.admin-video-card-thumb {
  width: 110px;
  height: 65px;
  flex-shrink: 0;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.admin-video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-video-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow: hidden;
}

.admin-video-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-video-card-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.admin-video-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.65rem;
}

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  text-align: center;
}

.admin-action-btn.btn-view {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.admin-action-btn.btn-edit {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.admin-action-btn.btn-del {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-color);
}

/* Server Item in Admin */
.server-item-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.85rem;
  position: relative;
}

/* Mobile Media Queries for Admin */
@media (max-width: 768px) {
  .admin-navbar {
    padding: 0.65rem 0.85rem !important;
  }
  
  .admin-navbar .nav-brand {
    font-size: 1.15rem !important;
  }

  .admin-nav-links {
    gap: 0.35rem !important;
  }

  .admin-nav-links .category-pill,
  .admin-nav-links .btn-upload {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.75rem !important;
  }

  .admin-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.45rem !important;
    margin-bottom: 1.2rem !important;
  }

  .stat-box {
    padding: 0.65rem 0.5rem !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.25rem !important;
  }

  .stat-box p {
    font-size: 0.65rem !important;
  }

  .stat-number {
    font-size: 1.2rem !important;
  }

  .stat-box i {
    display: none !important;
  }

  .admin-table-wrapper {
    display: none !important;
  }

  .admin-video-mobile-list {
    display: flex !important;
  }

  .admin-card {
    padding: 1rem 0.85rem !important;
  }

  .form-group label {
    font-size: 0.82rem !important;
  }

  .form-control {
    padding: 0.65rem 0.85rem !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 480px) {
  .admin-grid {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0.35rem !important;
  }
  
  .stat-number {
    font-size: 1.05rem !important;
  }
}

.btn-remove-server {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-remove-server:hover {
  background: #ef4444;
  color: #fff;
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 2rem 1.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-dmca-box {
  transition: border-color 0.2s ease, background 0.2s ease;
}

.footer-dmca-box:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(30, 41, 59, 0.6);
}

@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Pagination Component */
.pagination-wrapper {
  margin: 2.8rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
}

.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pagination-btn:hover:not(.disabled):not(.active) {
  background: var(--bg-card-hover);
  border-color: var(--accent-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 42, 84, 0.25);
}

.pagination-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: var(--accent-glow);
  pointer-events: none;
}

.pagination-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.pagination-btn.prev-btn,
.pagination-btn.next-btn {
  display: inline-flex;
  gap: 0.45rem;
  padding: 0 1.1rem;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 40px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.1rem;
  user-select: none;
}

.pagination-meta-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 540px) {
  .pagination-wrapper {
    margin: 2rem 0 1rem;
  }
  .pagination-container {
    gap: 0.3rem;
  }
  .pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    font-size: 0.82rem;
    border-radius: 8px;
  }
  .pagination-btn.prev-btn,
  .pagination-btn.next-btn {
    padding: 0 0.75rem;
  }
}

/* Mobile Expandable Slide-Down Search Bar */
.mobile-search-bar {
  display: none;
  background: rgba(14, 14, 24, 0.98);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  backdrop-filter: blur(15px);
  position: sticky;
  top: 59px;
  z-index: 99;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  animation: slideDownSearch 0.25s ease-out;
}

@keyframes slideDownSearch {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-search-bar.active {
  display: block !important;
}

.mobile-search-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

.mobile-search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.mobile-search-input-wrap .search-prefix-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.mobile-search-input-wrap input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.65rem 2.6rem 0.65rem 2.5rem;
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.mobile-search-input-wrap input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 12px rgba(255, 42, 84, 0.35);
}

.mobile-search-submit-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.mobile-search-submit-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.mobile-search-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s;
}

.mobile-search-close-btn:hover {
  background: rgba(255, 42, 84, 0.15);
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.desktop-nav-search button i,
.nav-search button i,
.desktop-search-go-btn i {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}


/* Fullscreen & Native Player Play/Pause Fixes */
.direct-player-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.direct-player-wrapper video,
#player {
  width: 100%;
  max-height: 580px;
  height: auto;
  background: #000;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

/* Fullscreen Styling across all modern browsers (Chrome, Edge, Safari, Firefox, Mobile) */
:fullscreen video,
:-webkit-full-screen video,
:-moz-full-screen video,
:-ms-fullscreen video,
video:fullscreen,
video:-webkit-full-screen,
video:-moz-full-screen,
.direct-player-wrapper:fullscreen,
.direct-player-wrapper:-webkit-full-screen,
.direct-player-wrapper:-moz-full-screen,
.direct-player-wrapper:fullscreen video,
.direct-player-wrapper:-webkit-full-screen video,
.direct-player-wrapper:-moz-full-screen video,
#player-container:fullscreen video,
#player-container:-webkit-full-screen video {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  object-fit: contain !important;
  background: #000 !important;
  border-radius: 0 !important;
  cursor: pointer !important;
}

/* Universal Fullscreen Fixes for iFrame Player (Byse, Streamtape, Dood, etc.) */
iframe:fullscreen,
iframe:-webkit-full-screen,
iframe:-moz-full-screen,
iframe:-ms-fullscreen,
.iframe-player-wrapper:fullscreen,
.iframe-player-wrapper:-webkit-full-screen,
.iframe-player-wrapper:-moz-full-screen,
.iframe-player-wrapper:fullscreen iframe,
.iframe-player-wrapper:-webkit-full-screen iframe,
.iframe-player-wrapper:-moz-full-screen iframe {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000 !important;
  border-radius: 0 !important;
}


.btn-action {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn-action:active {
  transform: scale(0.93);
}
.btn-action.liked i {
  animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}


/* Phone & Mobile View Like Button Touch Optimizations */
.btn-action {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.btn-action > * {
  pointer-events: none !important;
}

@media (max-width: 768px) {
  .action-btn-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin-top: 0.5rem !important;
  }
  
  .btn-action {
    padding: 0.5rem 1rem !important;
    font-size: 0.88rem !important;
    min-height: 40px !important;
    border-radius: 50px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Visually Hidden SEO Heading (Retains H1 & text for Googlebot / Search Crawlers, but 100% hidden from human visitors) */
.page-seo-intro {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==============================================================
   Global Official Telegram Channel Banner
   ============================================================== */
.telegram-banner-wrapper {
  display: block;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit;
  background: linear-gradient(90deg, #071524 0%, #0c2742 50%, #071524 100%);
  border-top: 1px solid rgba(0, 136, 204, 0.4);
  border-bottom: 1px solid rgba(0, 136, 204, 0.4);
  box-shadow: 0 4px 22px rgba(0, 136, 204, 0.22);
  position: relative;
  overflow: hidden;
  z-index: 100;
  transition: all 0.25s ease;
}

.telegram-banner-wrapper:hover {
  background: linear-gradient(90deg, #091a2e 0%, #0f3052 50%, #091a2e 100%);
  border-top-color: rgba(0, 180, 216, 0.65);
  border-bottom-color: rgba(0, 180, 216, 0.65);
  box-shadow: 0 6px 28px rgba(0, 180, 216, 0.35);
}

.telegram-banner-wrapper:hover .telegram-join-btn {
  background: linear-gradient(135deg, #0099e6 0%, #00c6ff 100%);
  box-shadow: 0 6px 24px rgba(0, 180, 216, 0.85);
  transform: translateY(-2px) scale(1.03);
}

.telegram-banner-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: tgShimmerEffect 4.5s infinite linear;
  pointer-events: none;
}

@keyframes tgShimmerEffect {
  0% { left: -100%; }
  50%, 100% { left: 200%; }
}

.telegram-banner-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.55rem 1rem;
}

.telegram-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.telegram-banner-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.telegram-banner-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0088cc 0%, #00b4d8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 136, 204, 0.8);
  flex-shrink: 0;
  animation: tgPulseGlow 2.4s infinite ease-in-out;
}

@keyframes tgPulseGlow {
  0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(0, 136, 204, 0.7); }
  50% { transform: scale(1.08); box-shadow: 0 0 24px rgba(0, 180, 216, 0.95); }
}

.telegram-banner-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.telegram-banner-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telegram-title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

.telegram-badge-official {
  background: rgba(0, 136, 204, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.5);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.6px;
  flex-shrink: 0;
}

.telegram-banner-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 1px 0 0 0;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.telegram-banner-sub strong {
  color: #e2e8f0;
}

.telegram-banner-action {
  flex-shrink: 0;
}

.telegram-join-btn {
  background: linear-gradient(135deg, #0088cc 0%, #00b4d8 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.84rem;
  padding: 0.48rem 1.15rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 18px rgba(0, 136, 204, 0.5);
  transition: all 0.25s ease;
  text-decoration: none !important;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.telegram-join-btn:hover {
  background: linear-gradient(135deg, #0099e6 0%, #00c6ff 100%);
  box-shadow: 0 6px 24px rgba(0, 180, 216, 0.85);
  transform: translateY(-2px) scale(1.03);
}

@media (max-width: 768px) {
  .telegram-banner-container {
    padding: 0.38rem 0.6rem;
  }
  .telegram-banner-inner {
    gap: 0.45rem;
  }
  .telegram-banner-left {
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
  }
  .telegram-banner-icon-box {
    width: 30px;
    height: 30px;
    font-size: 1.05rem;
  }
  .telegram-badge-official {
    display: none !important; /* Hide badge on mobile so full title fits in one clean line */
  }
  .telegram-banner-title {
    font-size: clamp(0.72rem, 3.2vw, 0.86rem);
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
    gap: 0;
  }
  .telegram-title-text {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }
  .telegram-banner-sub {
    display: none !important; /* Phone me subtitle hide - sirf PC me show hoga */
  }
  .telegram-join-btn {
    padding: 0.36rem 0.75rem;
    font-size: clamp(0.70rem, 2.7vw, 0.78rem);
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 360px) {
  .telegram-banner-container {
    padding: 0.35rem 0.4rem;
  }
  .telegram-banner-left {
    gap: 0.4rem;
  }
  .telegram-banner-icon-box {
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
  }
  .telegram-banner-title {
    font-size: 0.70rem;
  }
  .telegram-join-btn {
    padding: 0.32rem 0.6rem;
    font-size: 0.68rem;
  }
}

