/* ==========================================
   LustVault Premium Design System (style.css)
   ========================================== */

:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #131317;
  --bg-card: #18181f;
  --bg-input: #1f1f27;
  
  --accent-color: #ff3838;
  --accent-glow: rgba(255, 56, 56, 0.4);
  --accent-hover: #ff4d4d;
  
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #62627a;
  
  --border-color: #262630;
  --border-glow: rgba(255, 56, 56, 0.15);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header & Navigation */
header {
  background: rgba(19, 19, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
}

.logo span {
  background: var(--accent-color);
  color: #000;
  padding: 2px 8px;
  border-radius: var(--border-radius-sm);
  font-weight: 900;
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-item {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}

.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.admin-btn {
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
}

.nav-item.admin-btn:hover {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 0 15px var(--accent-glow);
}

/* Layout Container */
main {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 24px;
  flex: 1;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  position: relative;
  padding-left: 12px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--accent-color);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-color);
}

/* Search and Filters Bar */
.filter-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
  margin-bottom: 30px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

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

.btn {
  background: var(--accent-color);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
  outline: none;
}

.btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 15px var(--accent-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.btn-danger {
  background: #dc2626;
}

.btn-danger:hover {
  background: #ef4444;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

/* Video Grid Card Layout */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 25px rgba(255, 56, 56, 0.12);
}

.video-thumb-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
  overflow: hidden;
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

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

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
}

.video-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.video-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: auto;
}

.video-rating {
  color: #10b981;
  font-weight: 600;
}

/* Import Selector Overlay (Admin Mode Only) */
.admin-select-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  cursor: pointer;
}

.admin-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.video-card.imported-state {
  border-color: rgba(16, 185, 129, 0.4);
}

.imported-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #10b981;
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Detail & Watch Page Layout */
.watch-container {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 30px;
}

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

.player-wrapper {
  background: #000;
  aspect-ratio: 16/9;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
}

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

.watch-info {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
}

.watch-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.4;
}

.watch-stats {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.stat-item span {
  color: var(--text-primary);
  font-weight: 600;
}

.watch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition-fast);
}

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

/* Sidebar and Recommendation cards */
.sidebar-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.mini-video-card {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 8px;
  margin-bottom: 16px;
  transition: var(--transition-fast);
}

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

.mini-thumb-container {
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #000;
}

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

.mini-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mini-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-meta {
  font-size: 10px;
  color: var(--text-secondary);
}

/* Admin Specific Panel */
.admin-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.tab-container {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Pagination Style */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.page-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-glow);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Loading Spinner & Status States */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  gap: 16px;
  color: var(--text-secondary);
  grid-column: 1 / -1;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-left-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 8px rgba(255, 56, 56, 0.2);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-lg);
  grid-column: 1 / -1;
  background: var(--bg-card);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Footer styling */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 30px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: auto;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================
   18+ Age Gate & DMCA Compliance Styling
   ========================================== */

/* Age Gate Overlay */
.age-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 8, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.age-gate-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-color);
  box-shadow: 0 15px 50px rgba(255, 56, 56, 0.25);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  animation: modalFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.age-gate-warning-icon {
  font-size: 64px;
  margin-bottom: 20px;
  display: inline-block;
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(255,56,56,0.3)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(255,56,56,0.7)); }
}

.age-gate-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.age-gate-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 30px;
}

.age-gate-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.age-gate-actions .btn {
  flex: 1;
  padding: 14px 20px;
}

/* DMCA & Legal Page Layout */
.legal-container {
  max-width: 800px;
  margin: 40px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 40px;
}

.legal-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.legal-section {
  margin-bottom: 24px;
}

.legal-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal-section p, .legal-section ul {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-section ul {
  padding-left: 20px;
}

.legal-section li {
  margin-bottom: 8px;
}

.legal-contact-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px;
  margin-top: 30px;
}

.legal-contact-item {
  font-size: 14px;
  margin-bottom: 10px;
}

.legal-contact-item strong {
  color: var(--accent-color);
}

/* ==========================================
   Homepage Sidebar & Collection Layouts
   ========================================== */

.homepage-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  margin-top: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .homepage-layout {
    grid-template-columns: 1fr;
  }
}

.sidebar-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-panel-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}

.list-group {
  list-style: none;
}

.list-group-item {
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  margin-bottom: 6px;
}

.list-group-item:hover, .list-group-item.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.list-group-item.active {
  border-left: 3px solid var(--accent-color);
  padding-left: 11px;
  font-weight: 600;
  background: rgba(255, 56, 56, 0.08);
}

.badge-count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
}

.list-group-item.active .badge-count {
  background: var(--accent-color);
  color: #000;
  font-weight: 700;
}

/* Tag Cloud specific */
.tag-cloud-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud-item {
  font-size: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tag-cloud-item:hover, .tag-cloud-item.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
  box-shadow: 0 0 8px var(--accent-glow);
}

.tag-cloud-item.active {
  font-weight: 600;
}

/* Video Source Badge overlay */
.video-source-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  border: 1px solid var(--border-color);
  letter-spacing: 0.5px;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
