:root {
  --bg-color: #07080b;
  --card-bg: #111319;
  --card-hover: #171a22;
  --accent-gold: #e5b044;
  --accent-gold-gradient: linear-gradient(135deg, #f7d070 0%, #c48b1c 100%);
  --accent-red: #e50914;
  --text-main: #f5f6fa;
  --text-muted: #8e95a5;
  --border-color: #1e222d;
  --header-bg: #0c0e14;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Padauk', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
  user-select: none;
  -webkit-user-select: none;
  min-height: 100vh;
}

/* Header */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
}

.brand-logo-box {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: clamp(1.05rem, 3.2vw, 1.3rem);
  letter-spacing: 1.5px;
  color: #ffffff;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1.5px solid var(--accent-gold);
  background: linear-gradient(180deg, rgba(229, 176, 68, 0.15) 0%, rgba(0, 0, 0, 0.4) 100%);
  box-shadow: 0 0 12px rgba(229, 176, 68, 0.15);
}

.brand-logo-box span {
  background: var(--accent-gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 3px;
}

.menu-toggle-btn {
  background: #171a22;
  border: 1px solid var(--border-color);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
}
.menu-toggle-btn svg { width: 20px; height: 20px; }

/* Right Slide-in Side Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(80vw, 300px);
  background: #0d0f15;
  border-left: 1px solid var(--border-color);
  z-index: 160;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
}
.side-drawer.open {
  transform: translateX(0);
}

.side-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}
.drawer-brand {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
}
.drawer-brand span { color: var(--accent-gold); }
.drawer-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.drawer-close-btn:hover { color: #fff; }

.drawer-category-label {
  padding: 14px 16px 6px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 1px;
}

.drawer-menu-list {
  list-style: none;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.drawer-menu-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  border-left: 3px solid transparent;
  background: #13151e;
}
.drawer-menu-list li a svg { width: 18px; height: 18px; fill: var(--text-muted); }
.drawer-menu-list li a.active, .drawer-menu-list li a:hover {
  color: #fff;
  background: #1c202d;
  border-left-color: var(--accent-gold);
}
.drawer-menu-list li a.active svg, .drawer-menu-list li a:hover svg { fill: var(--accent-gold); }

/* Main Container */
.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 14px;
}

/* Ads Notice Banner */
.ads-banner-link {
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
}
.ads-banner-box {
  background: linear-gradient(90deg, rgba(229, 176, 68, 0.12) 0%, rgba(229, 176, 68, 0.04) 100%);
  border: 1px dashed var(--accent-gold);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ads-banner-box:hover {
  background: rgba(229, 176, 68, 0.18);
}
.ads-banner-box svg {
  width: 18px;
  height: 18px;
  fill: var(--accent-gold);
  flex-shrink: 0;
}
.ads-banner-box span {
  font-weight: 600;
  color: #f7d070;
  line-height: 1.4;
}

/* Search Box */
.search-wrapper {
  display: flex;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--card-bg);
}
.search-wrapper input {
  flex: 1;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}
.search-wrapper button {
  background: var(--accent-gold-gradient);
  border: none;
  padding: 0 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-wrapper button svg { width: 18px; height: 18px; fill: #000; }

/* Section Header */
.section-title-wrap {
  display: flex;
  align-items: center;
  margin: 14px 0;
}
.accent-bar {
  width: 4px;
  height: 20px;
  background: var(--accent-gold);
  border-radius: 2px;
  margin-right: 10px;
}
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

/* Video Grid & Cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}
@media (min-width: 768px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
}

.video-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.video-card:hover {
  border-color: rgba(229, 176, 68, 0.4);
  background: var(--card-hover);
}

.thumbnail-box {
  width: 100%;
  position: relative;
  height: 0;
  padding-bottom: 56.25%;
  background-color: #000;
  overflow: hidden;
}
.thumbnail-box img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.hd-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

.card-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}
.card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.video-card:hover .card-title { color: var(--accent-gold); }

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.card-watermark {
  color: var(--accent-gold);
  font-weight: 600;
}

/* Pagination */
.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 28px 0;
  gap: 6px;
}
.pagination-bar span, .pagination-bar button {
  background: #141722;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.85rem;
}
.pagination-bar button:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.pagination-bar button.active {
  background: var(--accent-gold-gradient);
  border-color: var(--accent-gold);
  color: #000;
  font-weight: 700;
}
.pagination-info {
  border: none !important;
  background: transparent !important;
  color: var(--text-muted);
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  min-height: 56px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #0b0c10;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  border: none;
  background: none;
  flex: 1;
  cursor: pointer;
  padding: 6px 0;
}
.bottom-nav-item svg { width: 20px; height: 20px; fill: currentColor; margin-bottom: 2px; }
.bottom-nav-item:hover, .bottom-nav-item.active { color: var(--accent-gold); }

/* Rich Footer */
.site-footer {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}
.footer-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .footer-main-grid { grid-template-columns: 1.5fr 1fr 1.5fr; }
}

.footer-logo {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 8px;
}
.footer-logo span { color: var(--accent-gold); }
.footer-subheading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--accent-gold); }

.telegram-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1b212f;
  color: #fff;
  border: 1px solid rgba(229, 176, 68, 0.4);
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
}
.telegram-btn svg { width: 18px; height: 18px; fill: var(--accent-gold); }
.telegram-btn:hover { background: #22293a; border-color: var(--accent-gold); }

.footer-disclaimer-box {
  margin-top: 24px;
  padding: 14px;
  background: #0f1118;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* Player Overlay */
.player-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 999;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}
.player-overlay.open { display: flex; }
.video-view-container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.back-btn-bar {
  padding: 12px 16px;
  background: #0a0c10;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border-color);
  color: #fff;
}
.back-btn-bar svg { width: 18px; height: 18px; fill: #fff; margin-right: 8px; }
.back-btn-bar:hover { color: var(--accent-gold); }
.back-btn-bar:hover svg { fill: var(--accent-gold); }

.video-stage {
  position: relative;
  width: 100%;
  background: #000;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
}
.video-stage video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}

.playback-spinner-box {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  background: rgba(0, 0, 0, 0.85);
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.spinner-ring {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.playback-spinner-box span { color: #fff; font-size: 0.82rem; }

/* Custom Controls */
.custom-controls {
  background: #111319;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
}

.seek-container {
  position: relative;
  width: 100%;
  height: 5px;
  background: #252936;
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 8px;
}
.seek-progress {
  height: 100%;
  background: var(--accent-red);
  border-radius: 3px;
  width: 0%;
  position: relative;
}
.seek-handle {
  position: absolute;
  right: -5px;
  top: -3.5px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
}

.ctrl-buttons-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ctrl-group-left, .ctrl-group-right { display: flex; align-items: center; }
.ctrl-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ctrl-group-right .ctrl-btn { margin-right: 0; margin-left: 12px; }
.ctrl-btn svg { width: 18px; height: 18px; fill: #fff; }
.ctrl-btn:hover svg { fill: var(--accent-gold); }
.time-display { font-family: monospace; font-size: 0.8rem; color: var(--text-muted); }

.settings-wrapper { position: relative; }
.quality-menu {
  display: none;
  position: absolute;
  bottom: 30px;
  right: 0;
  background: #1a1e2b;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  list-style: none;
  padding: 4px 0;
  z-index: 20;
}
.quality-menu.open { display: block; }
.quality-menu li {
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
}
.quality-menu li:hover, .quality-menu li.selected {
  background: var(--accent-gold-gradient);
  color: #000;
  font-weight: 700;
}

/* Player Title & Download */
.player-title-box {
  padding: 14px 16px;
  background: #0c0e14;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 600px) {
  .player-title-box { flex-direction: row; justify-content: space-between; align-items: center; }
}
.player-video-title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent-gold-gradient);
  color: #000;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.download-btn svg { width: 16px; height: 16px; fill: #000; }
.download-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.similar-section { padding: 18px 14px; }
