:root {
  --bg-main: #0a0b0e;
  --bg-surface: #12131a;
  --bg-surface-glass: rgba(18, 19, 26, 0.85);
  --bg-card: #161822;
  --bg-card-hover: #1e202e;
  --bg-input: #1c1e2a;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-focus: #ff2a54;
  --accent: #ff2a54;
  --accent-gradient: linear-gradient(135deg, #ff2a54 0%, #ff5e3a 100%);
  --accent-glow: rgba(255, 42, 84, 0.35);
  --accent-subtle: rgba(255, 42, 84, 0.12);
  --text-main: #f4f5f8;
  --text-muted: #9ba1b0;
  --text-subtle: #6c7282;
  --badge-bg: rgba(0, 0, 0, 0.75);
  --success: #10b981;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Site Layout */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header with Glassmorphism */
.site-header {
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
  will-change: transform;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

.mobile-header-actions {
  display: none;
}

.mobile-bottom-bar {
  display: none;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

/* Brand Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.7px;
  color: #fff;
  user-select: none;
}

.brand-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 14px rgba(225, 29, 72, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.brand:hover .brand-logo-img {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(225, 29, 72, 0.75);
}

.brand-text-accent {
  background: linear-gradient(135deg, #f43f5e, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.age-logo-img {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 0 35px rgba(225, 29, 72, 0.45), 0 0 65px rgba(168, 85, 247, 0.25);
  display: block;
}

.logo-badge {
  background: var(--accent-gradient);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px var(--accent-glow);
  font-size: 1.2rem;
  font-weight: 900;
}

.brand-text {
  color: #fff;
}

.badge-18 {
  font-size: 0.68rem;
  font-weight: 800;
  background-color: rgba(255, 42, 84, 0.15);
  color: var(--accent);
  border: 1px solid rgba(255, 42, 84, 0.4);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Search Bar */
.search-bar {
  flex: 1;
  max-width: 580px;
  position: relative;
}

.search-form {
  display: flex;
  position: relative;
  width: 100%;
}

.search-icon-wrapper {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-main);
  padding: 0.65rem 4.5rem 0.65rem 2.6rem;
  font-size: 0.92rem;
  font-family: inherit;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--border-focus);
  background-color: #222534;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0 1.2rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.search-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-link-btn {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.admin-link-btn:hover {
  color: #fff;
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* Category & Filter Strip */
.filter-strip {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.25rem;
  position: sticky;
  top: 59px;
  z-index: 90;
}

.filter-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.category-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding: 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  user-select: none;
}

.pill:hover {
  background-color: var(--bg-card-hover);
  color: #fff;
  border-color: var(--border-hover);
}

.pill.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* Top-Trending Quick Sort Tabs (xHamster / Tube standard) */
.sort-tabs {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
  flex-shrink: 0;
}

.sort-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.sort-tab:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

.sort-tab.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sort-select {
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.sort-select:focus {
  border-color: var(--accent);
}

/* Main Container */
.main-container {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  flex: 1;
}

/* Section Titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}

.section-title-icon {
  color: var(--accent);
  font-size: 1.1rem;
}

/* Video Grid System (Optimized for all viewports) */
.video-grid {
  display: grid;
  gap: 1.5rem 1.25rem;
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive Breakpoints */
@media (min-width: 1540px) {
  .video-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1200px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem 1rem;
  }
}

@media (max-width: 820px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 0.75rem;
  }
}

@media (max-width: 768px) {
  /* Mobile Slim Header */
  .site-header {
    padding: 0.5rem 0.85rem;
    height: 52px;
    display: flex;
    align-items: center;
  }

  .header-inner {
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
  }

  .brand {
    font-size: 1.25rem;
    gap: 0.35rem;
  }

  .brand-logo-img {
    width: 30px;
    height: 30px;
  }

  /* Hide desktop header actions - accessible via Bottom Navigation Bar */
  .header-actions {
    display: none !important;
  }

  /* Mobile Header Quick Actions */
  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
  }

  .mobile-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    text-decoration: none;
  }

  .mobile-icon-btn:hover,
  .mobile-icon-btn:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.96);
  }

  .mobile-tg-btn {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
  }

  /* Expandable Search Bar on Mobile */
  .search-bar {
    display: none;
  }

  .search-bar.mobile-search-active {
    display: block;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    padding: 0.55rem 0.85rem;
    background: rgba(12, 14, 22, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8);
    animation: mobileSearchSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 95;
    box-sizing: border-box;
  }

  @keyframes mobileSearchSlide {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Filter Strip Touch Optimization (Scrolls naturally, never overlaps videos) */
  .filter-strip {
    position: static;
    top: auto;
    padding: 0.45rem 0.75rem;
    background: rgba(14, 16, 24, 0.96);
    z-index: 1;
  }

  .filter-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.65rem;
  }

  .filter-inner::-webkit-scrollbar {
    display: none;
  }

  .category-pills {
    flex-shrink: 0;
    gap: 0.35rem;
  }

  .category-pills .pill-telegram {
    display: none; /* Hide redundant Telegram VIP pill on mobile so All Videos is 1st */
  }

  .category-pills .pill {
    padding: 0.32rem 0.75rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .sort-tabs {
    flex-shrink: 0;
  }

  .sort-tab {
    padding: 0.32rem 0.75rem !important;
    font-size: 0.78rem !important;
    white-space: nowrap;
  }

  /* App-Style Bottom Navigation Bar */
  .mobile-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(12, 13, 20, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
    z-index: 998;
  }

  .mobile-nav-item {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #94a3b8;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.18s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
  }

  .mobile-nav-item span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: -0.2px;
  }

  .mobile-nav-item.active {
    color: #ffffff;
  }

  .mobile-nav-item.active svg {
    stroke: #ff2a54;
    transform: scale(1.08);
  }

  .mobile-nav-item:active {
    transform: scale(0.92);
  }

  .mobile-nav-tg {
    color: #38bdf8 !important;
  }

  .mobile-nav-tg-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-tg-icon svg {
    fill: #38bdf8;
  }

  .mobile-tg-label {
    color: #38bdf8 !important;
    font-weight: 800 !important;
  }

  /* Safety bottom padding so bottom bar never obscures content or footer */
  .site-wrapper {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .main-container {
    padding: 0.85rem 0.75rem;
  }
}

/* Modern Video Card */
.video-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  position: relative;
  text-decoration: none;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  color: var(--text-main);
}

.thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #181924 0%, #101117 100%);
  overflow: hidden;
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

/* Hover Preview Video */
.hover-preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.28s ease-in-out;
  pointer-events: none;
  z-index: 1;
}

.hover-preview-video.is-playing {
  opacity: 1;
}

.thumb-wrapper.preview-active .thumb-gradient,
.thumb-wrapper.preview-active .play-hover-btn {
  opacity: 0 !important;
  transition: opacity 0.2s ease;
}

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

.thumb-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 11, 14, 0.85) 0%, rgba(10, 11, 14, 0) 50%);
  pointer-events: none;
}

.play-hover-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  box-shadow: 0 4px 16px var(--accent-glow);
  color: #fff;
}

.video-card:hover .play-hover-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Badges on Thumbnails */
.badge-stack-bottom {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.badge-stack-top {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.duration-badge {
  background-color: var(--badge-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.rating-badge {
  background-color: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.2px;
}

.hd-badge {
  background-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.featured-badge {
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* Card Content Details */
.card-info {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  transition: color 0.15s ease;
}

.video-card:hover .card-title {
  color: var(--accent);
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.card-meta-category {
  color: #d1d5db;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

/* Featured Section */
.featured-section {
  margin-bottom: 2.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

/* Classic Numbered Pagination (1, 2, 3 ... 100) */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 3.5rem 0 2rem;
  flex-wrap: wrap;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.85rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  user-select: none;
}

.page-btn:hover:not(.disabled):not(.active) {
  border-color: var(--accent);
  color: #fff;
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 42, 84, 0.25);
}

.page-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
  cursor: default;
}

.page-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background-color: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
  color: var(--text-muted);
}

.page-arrow {
  gap: 0.4rem;
  padding: 0 1.1rem;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 42px;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
}

@media (max-width: 580px) {
  .pagination-bar {
    gap: 0.35rem;
    margin: 2.5rem 0 1.5rem;
  }

  .page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.65rem;
    font-size: 0.88rem;
  }

  .page-arrow {
    padding: 0 0.75rem;
  }

  .page-arrow span {
    display: none;
  }
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 5rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 0.85rem;
}

.empty-state-title {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 0.95rem;
}

/* Watch Page Layout */
.watch-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
}

@media (max-width: 1080px) {
  .watch-container {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.watch-header {
  margin-top: 1.25rem;
}

.watch-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  letter-spacing: -0.3px;
}

.watch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.watch-stats {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.watch-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.watch-stat-views strong {
  color: #fff;
  font-weight: 700;
}

.watch-rating-badge {
  background-color: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.25);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.watch-hd-badge {
  background: rgba(255, 42, 84, 0.14);
  color: var(--accent);
  border: 1px solid rgba(255, 42, 84, 0.35);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.watch-category-badge {
  background-color: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  transition: var(--transition);
}

.watch-category-badge:hover {
  background-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.watch-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.action-btn-group {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.action-btn-group .action-btn {
  border: none;
  border-radius: 0;
  padding: 0.55rem 0.85rem;
  background: transparent;
}

.action-btn-group .action-btn:first-child {
  border-right: 1px solid var(--border);
}

.action-btn {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition);
  user-select: none;
}

.action-btn svg {
  display: block;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), fill 0.2s ease, stroke 0.2s ease;
}

.action-btn:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.action-btn:active svg {
  transform: scale(0.85);
}

.action-btn.voted-active,
.action-btn-like.voted-active {
  color: var(--accent) !important;
  background: rgba(255, 42, 84, 0.15) !important;
  border-color: rgba(255, 42, 84, 0.35) !important;
}

.action-btn-like.voted-active svg {
  fill: currentColor !important;
}

.action-btn-like.play-pop svg {
  animation: thumbPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.action-btn-dislike.voted-active {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

.action-btn-dislike.voted-active svg {
  fill: currentColor !important;
}

.action-btn-dislike.play-dip svg {
  animation: thumbDip 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.action-btn.fav-active {
  color: #f43f5e !important;
  background: rgba(244, 63, 94, 0.14) !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
}

.action-btn.fav-active svg {
  fill: currentColor !important;
}

.action-btn.fav-active.play-heart svg {
  animation: heartPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Micro-Interaction Keyframes */
@keyframes thumbPop {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.42) rotate(-16deg); }
  65% { transform: scale(0.92) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes thumbDip {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.36) rotate(16deg); }
  65% { transform: scale(0.92) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.45) rotate(-10deg); }
  65% { transform: scale(0.92) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Floating Particle Feedback */
.action-particle {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translate(-50%, 0);
  pointer-events: none;
  font-size: 0.76rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent-gradient);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 10px var(--accent-glow);
  animation: floatParticle 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 100;
}

@keyframes floatParticle {
  0% {
    opacity: 0;
    transform: translate(-50%, 4px) scale(0.6);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -10px) scale(1.15);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -24px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -36px) scale(0.85);
  }
}

.anim-count-pop {
  display: inline-block;
  animation: countPop 0.35s ease;
}

@keyframes countPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); color: var(--accent); }
  100% { transform: scale(1); }
}

.action-btn-accent {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
}

.action-btn-accent:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 10px var(--accent-glow);
}

@media (max-width: 640px) {
  .watch-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .watch-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
  }

  .watch-actions::-webkit-scrollbar {
    display: none;
  }

  .action-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

.watch-info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
}

.watch-info-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.watch-info-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #94a3b8;
}

.watch-info-dot {
  color: rgba(255, 255, 255, 0.2);
}

.watch-info-cat a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.watch-info-cat a:hover {
  text-decoration: underline;
}

.watch-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #d1d5db;
  white-space: pre-line;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.video-tag {
  font-size: 0.82rem;
  font-weight: 600;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.video-tag:hover {
  color: #fff;
  background-color: var(--accent);
  border-color: var(--accent);
}

/* Related Videos Sidebar */
.related-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.related-card {
  display: flex;
  gap: 0.85rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.related-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  background-color: var(--bg-card-hover);
}

.related-thumb {
  position: relative;
  width: 140px;
  min-width: 140px;
  aspect-ratio: 16 / 9;
  background-color: #1a1a24;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.related-info {
  padding: 0.45rem 0.65rem 0.45rem 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.related-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-meta {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Report Modal / Box */
.report-box {
  background-color: var(--bg-surface);
  border: 1px solid rgba(255, 42, 84, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.report-box h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.4rem;
}

.form-select,
.form-textarea {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.65rem;
  margin-bottom: 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.btn-submit {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.6rem 1.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--success);
  color: #34d399;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--danger);
  color: #f87171;
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: rgba(20, 22, 30, 0.95);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-hover);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==============================================================================
   Age Gate Locked Modal & Blurred Backdrop (Zero CTA Bleed)
   ============================================================================== */
body.age-gate-active {
  overflow: hidden !important;
}

body.age-gate-active .site-header,
body.age-gate-active .site-footer {
  filter: blur(14px) brightness(0.25);
  -webkit-filter: blur(14px) brightness(0.25);
  opacity: 0.25;
  pointer-events: none !important;
  user-select: none !important;
  cursor: default !important;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

body.age-gate-active .site-header *,
body.age-gate-active .site-footer * {
  pointer-events: none !important;
  cursor: default !important;
  tabindex: -1 !important;
}

.age-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  background: radial-gradient(circle at center, rgba(15, 16, 24, 0.88) 0%, rgba(4, 5, 8, 0.97) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.age-card {
  max-width: 520px;
  width: 100%;
  background: rgba(18, 19, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  text-align: center;
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.95), 0 0 50px rgba(225, 29, 72, 0.25);
  position: relative;
  overflow: hidden;
  pointer-events: auto !important;
  animation: ageCardModalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ageCardModalIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(14px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.age-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

.age-logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.age-logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(225, 29, 72, 0.45));
}

.age-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.4);
  border-radius: var(--radius-full);
  color: #fb7185;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  margin-bottom: 1.15rem;
}

.age-title {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
  color: #fff;
  letter-spacing: -0.5px;
}

.age-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.age-affirmation-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.4rem;
  margin-bottom: 1.75rem;
  text-align: left;
}

.age-affirmation-list {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 1.25rem;
  margin: 0;
}

.age-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.btn-enter {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: var(--transition);
}

.btn-enter:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.btn-leave {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.85rem 1.75rem;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: var(--transition);
}

.btn-leave:hover {
  color: #fff;
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.06);
}

/* Legal Pages */
.legal-card {
  max-width: 820px;
  margin: 2rem auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.25rem;
  box-shadow: var(--shadow-sm);
}

.legal-title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  color: #fff;
  letter-spacing: -0.5px;
}

.legal-updated {
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.legal-body {
  font-size: 1rem;
  line-height: 1.75;
  color: #d1d5db;
}

.legal-body p {
  margin-bottom: 1.25rem;
}

/* Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-subtle);
  max-width: 850px;
  line-height: 1.6;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Header Navigation Link & Breadcrumbs
   ========================================================================== */
.header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition);
}

.header-nav-link:hover {
  background: rgba(255, 42, 84, 0.15);
  border-color: var(--accent);
  color: #ffffff;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb-nav a {
  color: var(--text-muted);
  transition: var(--transition);
}

.breadcrumb-nav a:hover {
  color: var(--accent);
}

.breadcrumb-separator {
  color: var(--text-subtle);
  font-size: 0.75rem;
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 700;
}

/* ==========================================================================
   Categories Directory & Detail Pages
   ========================================================================== */
.categories-directory-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem 0 3rem 0;
}

.directory-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.directory-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.directory-title-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.directory-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.category-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 42, 84, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.category-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.category-card-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.category-card-count {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(255, 42, 84, 0.15);
  color: var(--accent);
  border: 1px solid rgba(255, 42, 84, 0.3);
  white-space: nowrap;
}

.category-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.category-card-footer {
  margin-top: auto;
}

.category-card-link-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.15s ease;
}

.category-card:hover .category-card-link-text {
  transform: translateX(4px);
}

/* Category Detail Banner */
.category-header-banner {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.category-header-main {
  margin-top: 0.25rem;
}

.category-header-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.category-header-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 800px;
}

/* -------------------------------------------------------------------------- */
/* 404 & Error Page Styles                                                    */
/* -------------------------------------------------------------------------- */
.error-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem 5rem;
  min-height: calc(100vh - 280px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.error-hero {
  text-align: center;
  max-width: 580px;
  width: 100%;
  margin: 0 auto 3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 42, 84, 0.08);
}

.error-badge-glow {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.error-code {
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: -3px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  text-shadow: 0 8px 32px var(--accent-glow);
}

.error-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.error-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.error-path {
  background: var(--accent-subtle);
  border: 1px solid rgba(255, 42, 84, 0.25);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  color: #ff5e3a;
  font-family: monospace;
  font-size: 0.9em;
  font-weight: 600;
  word-break: break-all;
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.error-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: var(--transition);
}

.error-actions .btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
}

.error-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.error-actions .btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.error-suggested-section {
  margin-top: 1.5rem;
}

.suggested-header {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  text-align: center;
}

.suggested-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.error-video-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.error-video-grid .video-card {
  width: 100%;
  max-width: 320px;
}

/* ==========================================================================
   Telegram Community & Trending Cross-Promotion Enhancements
   ========================================================================== */

/* Header Navigation Additions */
.header-trending-link {
  color: #ff8c42 !important;
  border-color: rgba(255, 140, 66, 0.3) !important;
}

.header-trending-link:hover {
  background: rgba(255, 140, 66, 0.18) !important;
  border-color: #ff8c42 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(255, 140, 66, 0.35);
}

.header-telegram-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.95rem;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(34, 158, 217, 0.4);
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}

.header-telegram-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(34, 158, 217, 0.6);
  color: #ffffff !important;
}

.tg-live-dot {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  display: inline-block;
  animation: tgPulse 2s infinite ease-in-out;
}

@keyframes tgPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #22c55e; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Category Filter Strip: Pinned Telegram VIP Pill */
.pill-telegram {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  background: linear-gradient(135deg, rgba(42, 171, 238, 0.22) 0%, rgba(34, 158, 217, 0.15) 100%) !important;
  border: 1px solid rgba(42, 171, 238, 0.45) !important;
  color: #38bdf8 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(42, 171, 238, 0.2) !important;
}

.pill-telegram:hover {
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 3px 14px rgba(42, 171, 238, 0.5) !important;
}

/* Watch Page: Action Buttons for Telegram */
.action-btn-telegram {
  background: rgba(42, 171, 238, 0.12) !important;
  border-color: rgba(42, 171, 238, 0.35) !important;
  color: #38bdf8 !important;
}

.action-btn-telegram:hover {
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 10px rgba(42, 171, 238, 0.45) !important;
}

.action-btn-tg-share {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(42, 171, 238, 0.25);
  color: #93c5fd;
}

.action-btn-tg-share:hover {
  background: rgba(42, 171, 238, 0.2);
  color: #ffffff;
  border-color: #38bdf8;
}

/* Watch Page: Official Telegram Channel Banner Card */
.watch-telegram-card {
  position: relative;
  background: linear-gradient(135deg, rgba(22, 24, 34, 0.95) 0%, rgba(14, 21, 33, 0.95) 100%);
  border: 1px solid rgba(42, 171, 238, 0.3);
  border-radius: var(--radius-md);
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(42, 171, 238, 0.12);
}

.watch-tg-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(42, 171, 238, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.watch-tg-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.watch-tg-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.watch-tg-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(42, 171, 238, 0.45);
}

.watch-tg-headline {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.watch-tg-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.watch-tg-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(42, 171, 238, 0.18);
  border: 1px solid rgba(42, 171, 238, 0.4);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.watch-tg-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

.btn-watch-tg-join {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.86rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(42, 171, 238, 0.45);
  transition: var(--transition);
}

.btn-watch-tg-join:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(42, 171, 238, 0.65);
  filter: brightness(1.08);
}

@media (max-width: 640px) {
  .watch-tg-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
  .btn-watch-tg-join {
    width: 100%;
    justify-content: center;
  }
}

/* Categories Directory: VIP Telegram Community Card */
.category-directory-tg-card {
  position: relative;
  background: linear-gradient(135deg, #161822 0%, #101626 100%);
  border: 1px solid rgba(42, 171, 238, 0.35);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.category-directory-tg-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 50%, rgba(42, 171, 238, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.tg-dir-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(42, 171, 238, 0.15);
  border: 1px solid rgba(42, 171, 238, 0.35);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.45rem;
}

.tg-dir-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.tg-dir-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  max-width: 700px;
  line-height: 1.45;
}

.btn-join-tg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(42, 171, 238, 0.45);
  transition: var(--transition);
}

.btn-join-tg:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(42, 171, 238, 0.65);
  filter: brightness(1.08);
}

@media (max-width: 768px) {
  .category-directory-tg-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
  }
  .btn-join-tg {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Floating Telegram Community Bubble Widget (Speed-Dial / Interactive Bubble)
   ========================================================================== */
.tg-bubble-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font);
}

/* 1. Teaser Speech Bubble Callout */
.tg-speech-bubble {
  position: relative;
  background: rgba(18, 20, 30, 0.95);
  border: 1px solid rgba(42, 171, 238, 0.45);
  color: #f1f5f9;
  padding: 0.55rem 0.95rem 0.55rem 0.85rem;
  border-radius: 12px;
  font-size: 0.82rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 15px rgba(42, 171, 238, 0.25);
  backdrop-filter: blur(12px);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: speechFloat 3s ease-in-out infinite alternate;
  user-select: none;
}

@keyframes speechFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.tg-speech-bubble:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.tg-speech-fire {
  font-size: 1rem;
}

.tg-speech-text strong {
  color: #38bdf8;
}

.tg-speech-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
  margin-left: 0.25rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.tg-speech-close:hover {
  color: #ffffff;
}

.tg-speech-tail {
  position: absolute;
  bottom: -6px;
  right: 22px;
  width: 10px;
  height: 10px;
  background: rgba(18, 20, 30, 0.95);
  border-right: 1px solid rgba(42, 171, 238, 0.45);
  border-bottom: 1px solid rgba(42, 171, 238, 0.45);
  transform: rotate(45deg);
}

/* Hide speech bubble when widget is open */
.tg-bubble-widget.is-open .tg-speech-bubble {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.9);
}

/* 2. Expandable Bubble Card */
.tg-bubble-card {
  position: absolute;
  bottom: 64px;
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: linear-gradient(135deg, rgba(20, 24, 38, 0.98) 0%, rgba(13, 16, 26, 0.98) 100%);
  border: 1px solid rgba(42, 171, 238, 0.4);
  border-radius: 16px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(42, 171, 238, 0.25);
  backdrop-filter: blur(16px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}

.tg-bubble-widget.is-open .tg-bubble-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tg-bubble-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tg-card-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tg-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(42, 171, 238, 0.45);
  flex-shrink: 0;
}

.tg-card-name {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
}

.tg-verified-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #38bdf8;
  color: #0b1120;
  font-size: 10px;
  font-weight: 900;
  border-radius: 50%;
}

.tg-card-sub {
  font-size: 0.75rem;
  color: #94a3b8;
}

.tg-bubble-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.2rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.tg-bubble-close-btn:hover {
  color: #ffffff;
}

.tg-bubble-card-body {
  padding: 1rem 1.15rem 1.15rem;
}

.tg-bubble-info-text {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 0.85rem;
}

.tg-bubble-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tg-bubble-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #f1f5f9;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tg-bubble-action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(42, 171, 238, 0.4);
  color: #ffffff;
  transform: translateX(3px);
}

.tg-bubble-action-btn.tg-action-primary {
  background: linear-gradient(135deg, rgba(42, 171, 238, 0.25) 0%, rgba(34, 158, 217, 0.15) 100%);
  border-color: rgba(42, 171, 238, 0.5);
  box-shadow: 0 2px 10px rgba(42, 171, 238, 0.2);
}

.tg-bubble-action-btn.tg-action-primary:hover {
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(42, 171, 238, 0.55);
}

.tg-bubble-action-btn.tg-action-primary:hover .tg-action-desc {
  color: rgba(255, 255, 255, 0.85);
}

.tg-action-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  color: #38bdf8;
}

.tg-action-primary .tg-action-icon {
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  color: #ffffff;
}

.tg-action-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tg-action-title {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}

.tg-action-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

.tg-action-arrow {
  color: #64748b;
  font-size: 0.95rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.tg-bubble-action-btn:hover .tg-action-arrow {
  color: #38bdf8;
  transform: translateX(2px);
}

.tg-action-primary:hover .tg-action-arrow {
  color: #ffffff;
}

/* 3. Main Floating Circular Bubble Launcher Button */
.tg-bubble-launcher {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(42, 171, 238, 0.5), 0 0 20px rgba(42, 171, 238, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  outline: none;
  animation: bubblePulse 2.8s infinite ease-in-out;
}

@keyframes bubblePulse {
  0% { box-shadow: 0 6px 20px rgba(42, 171, 238, 0.45), 0 0 0 0 rgba(42, 171, 238, 0.5); }
  50% { box-shadow: 0 8px 28px rgba(42, 171, 238, 0.65), 0 0 0 10px rgba(42, 171, 238, 0); }
  100% { box-shadow: 0 6px 20px rgba(42, 171, 238, 0.45), 0 0 0 0 rgba(42, 171, 238, 0); }
}

.tg-bubble-launcher:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 30px rgba(42, 171, 238, 0.75);
}

.tg-bubble-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ff2a54 0%, #ff5e3a 100%);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 0.12rem 0.42rem;
  border-radius: var(--radius-full);
  border: 2px solid #0a0b0e;
  box-shadow: 0 2px 8px rgba(255, 42, 84, 0.6);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tg-launcher-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.tg-launcher-close-icon {
  display: none;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.tg-bubble-widget.is-open .tg-launcher-icon {
  display: none;
}

.tg-bubble-widget.is-open .tg-launcher-close-icon {
  display: block;
}

.tg-bubble-widget.is-open .tg-bubble-badge {
  display: none;
}

@media (max-width: 768px) {
  /* On mobile/tablet, hide floating bubble entirely because VIP is in the Bottom Navigation Bar */
  .tg-bubble-widget,
  .tg-speech-bubble {
    display: none !important;
  }
}

.footer-tg-link {
  color: #38bdf8 !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.footer-tg-link:hover {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(42, 171, 238, 0.6);
}
