/* ========================================
   MODERN PROFESSIONAL VIDEYNE THEME
   Dark/Light Mode Support
======================================== */

/* CSS Variables untuk Theme Switching */
:root[data-theme="dark"] {
  /* Background Colors */
  --bg-primary: #0a0e27;
  --bg-secondary: #151b3d;
  --bg-tertiary: #1e2749;
  --bg-card: #1a1f3a;
  --bg-hover: #252d52;
  
  /* Text Colors */
  --text-primary: #e8eaed;
  --text-secondary: #a8b0d3;
  --text-tertiary: #6b7280;
  
  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-hover: #7c3aed;
  
  /* Border & Shadow */
  --border-color: rgba(99, 102, 241, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
}

:root[data-theme="light"] {
  /* Background Colors */
  --bg-primary: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f3f9;
  --bg-card: #ffffff;
  --bg-hover: #e5e7eb;
  
  /* Text Colors */
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-tertiary: #9ca3af;
  
  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-hover: #4f46e5;
  
  /* Border & Shadow */
  --border-color: rgba(99, 102, 241, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

/* Header Styles */
header {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo i {
  font-size: 2rem;
}

.logo-text {
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

nav a:hover {
  color: var(--accent-primary);
  background: var(--bg-hover);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transition: all 0.3s ease;
  position: relative;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  transform: scale(1.05);
}

.theme-toggle i {
  font-size: 1.2rem;
  position: absolute;
  transition: all 0.3s ease;
}

[data-theme="dark"] .light-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

[data-theme="dark"] .dark-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: var(--accent-primary);
}

[data-theme="light"] .light-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: var(--accent-primary);
}

[data-theme="light"] .dark-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

/* Container */
.container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.page-header h1 i {
  color: var(--accent-primary);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 400;
}

/* Search Bar */
.search-wrap {
  position: relative;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 1.2rem;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.5rem;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.search-wrap input::placeholder {
  color: var(--text-tertiary);
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow-md);
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Card Styles */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.card:hover::before {
  transform: scaleX(1);
}

.card a.thumb-link {
  display: block;
  position: relative;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: scale(1.1);
}

.card .meta {
  padding: 1.25rem;
}

.card .title {
  font-size: 0.95rem;
  line-height: 1.5;
  height: 3rem;
  overflow: hidden;
  color: var(--text-primary);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

/* Buttons */
.btn {
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  justify-content: center;
}

.btn-ghost {
  background: transparent;
  color: var(--accent-primary);
  border: 1.5px solid var(--accent-primary);
}

.btn-ghost:hover {
  background: var(--accent-primary);
  color: white;
}

.btn-embed {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
  flex: 1;
}

.btn-embed:hover {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-download {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  flex: 1;
}

.btn-download:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Pagination */
.pagination {
  margin-top: 3rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.page-btn {
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 44px;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.page-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Detail Page Styles */
.detail .back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.detail .back:hover {
  background: var(--bg-hover);
  transform: translateX(-4px);
}

.video-header {
  text-align: center;
  margin-bottom: 2rem;
}

.video-header h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-weight: 700;
}

.video-meta {
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.video-meta i {
  color: var(--accent-primary);
}

/* Player Wrapper */
.player-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Default Desktop (bisa diubah ke 56.25% untuk 16:9) */
  background: #000;
}

.player-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Action Area */
.action-area {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-action {
  padding: 1rem 2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 200px;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.btn-action i {
  font-size: 1.25rem;
}

.btn-action:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.btn-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Technical Note */
.technical-note {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.technical-note i {
  color: var(--info);
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.technical-note div {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.technical-note strong {
  color: var(--text-primary);
}

.technical-note em {
  color: var(--accent-primary);
  font-style: normal;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 4rem;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

/* Ad Banner */
.ad-banner {
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin: 3rem 0;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all 0.3s ease;
}

.ad-banner:hover {
  border-color: var(--accent-primary);
}

.ad-banner img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 12px;
}

/* Telegram Float Button */
.telegram-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(34, 158, 217, 0.4);
  z-index: 998;
  transition: all 0.3s ease;
  text-decoration: none;
  animation: float-pulse 3s ease-in-out infinite;
}

.telegram-float:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 30px rgba(34, 158, 217, 0.6);
}

.telegram-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

@keyframes float-pulse {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.05);
  }
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-content p {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: 0 1rem;
  }
  
  nav {
    gap: 0.75rem;
  }
  
  nav a span {
    display: none;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .card img {
    height: 160px;
  }
  
  .card-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn {
    width: 100%;
  }
  
  .action-area {
    flex-direction: column;
  }
  
  .btn-action {
    width: 100%;
    min-width: auto;
  }
  
  .telegram-float {
    width: 50px;
    height: 50px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
  
  .telegram-float svg {
    width: 26px;
    height: 26px;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .video-header h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .player-wrap {
      padding-top: 0 !important; 
      height: 500px; 
  }
  .page-header h1 {
    font-size: 1.75rem;
    flex-direction: column;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  nav a {
    padding: 0.5rem;
    font-size: 0;
  }
  
  nav a i {
    font-size: 1.25rem;
    margin: 0;
  }
  
  .logo-text {
    font-size: 1.25rem;
  }
}