/* ============================================
   ENIHS ACADEMY - Videos Page Styles
   Modern Video Learning Platform
   ============================================ */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #f59e0b;
  --secondary-dark: #d97706;
  --accent-color: #10b981;
  --background-light: #f8fafc;
  --background-white: #ffffff;
  --text-dark: #1e293b;
  --text-medium: #475569;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --header-bg: #1e293b;
  --nav-bg: #f59e0b;
  --footer-bg: #0f172a;
  --transition: all 0.3s ease;
  --border-radius: 12px;
}

html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

button, a, .btn, .nav-link, .subject-link, .chapter-card, .video-card, .recent-card, .notice-item,
.filter-btn, .subject-item, .sidebar-toggle-btn, .btn-subscribe {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: var(--background-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top:130px;
}
/* ============================================
   HEADER STYLES
   ============================================ */

/* ============================================
   MAIN CONTENT
   ============================================ */
#main-content {
  flex: 1;
  padding: 30px 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.video-main {
  max-width: 900px;
  margin: 0 auto;
  background: var(--background-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  padding: 30px;
}
.sidebar-toggle-btn {
  position: fixed;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: var(--transition);
  bottom: 100px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1099;
  display: none;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
  display: block;
}
.videos-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}
/* Sidebar */
.video-sidebar {
  background: var(--background-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  padding: 20px;
  position: sticky;
  top: 180px;
  height: fit-content;
}
.sidebar-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.video-search {
  margin-bottom: 15px;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--background-light);
  border-radius: 8px;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
}
.search-box i {
  color: var(--text-light);
  margin-right: 10px;
}
.search-box input {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
}
.class-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 6px 14px;
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
.subject-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.subject-item {
  padding: 12px 15px;
  background: var(--background-light);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}
.subject-item:hover {
  background: var(--primary-color);
  color: white;
}
.subject-item i {
  font-size: 16px;
}
.subject-item span {
  font-size: 14px;
  font-weight: 500;
}
/* Video Main */
.video-header {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}
.video-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 5px;
}
.video-header p {
  font-size: 14px;
  color: var(--text-light);
}
/* Featured Video */
.featured-video {
  background: var(--background-light);
  border-radius: var(--border-radius);
  margin-bottom: 30px;
  overflow: hidden;
}
.video-placeholder {
  height: 300px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}
.video-placeholder:hover {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
}
.video-placeholder i {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.8;
}
.video-placeholder h3 {
  font-size: 18px;
  font-weight: 500;
}
.video-info {
  padding: 20px;
}
.video-class {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-color);
  color: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.video-info h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}
.video-info p {
  font-size: 14px;
  color: var(--text-medium);
  margin-bottom: 15px;
}
.video-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-light);
}
.video-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-subscribe {
  padding: 8px 20px;
  background: var(--secondary-color);
  color: var(--text-dark);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-left: auto;
}
.btn-subscribe:hover {
  background: var(--secondary-dark);
}
/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.video-card {
  background: var(--background-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}
.video-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}
.video-thumbnail {
  height: 160px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.video-thumbnail i {
  font-size: 40px;
  color: white;
  opacity: 0.8;
}
.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.video-card-body {
  padding: 15px;
}
.video-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}
.video-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
}
/* ============================================
   FOOTER
   ============================================ */

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .videos-container {
    grid-template-columns: 250px 1fr;
  }
}
@media (max-width: 768px) {
  body {
    padding-top: 85px;
  }

  .header-top {
    padding: 10px 15px;
  }

  .menu-toggle {
    display: block;
  }

  #main-nav {
    display: none;
    position: absolute;
    top: 100%;
  }

  #main-nav.active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
  }

  .videos-container {
    grid-template-columns: 1fr;
  }

  .video-sidebar {
    position: fixed;
    top: var(--header-h, 130px);
    left: 0;
    z-index: 1100;
    width: min(300px, 85vw);
    height: calc(100vh - var(--header-h, 130px));
    transform: translateX(-110%);
    transition: transform 0.3s ease;
  }

  .video-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle-btn {
    display: flex;
  }

  .video-placeholder {
    height: 220px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .brand-info p {
    display: none;
  }
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary-color: #f59e0b;
  --secondary-dark: #d97706;
  --accent-color: #10b981;
  --background-light: #0f1117;
  --background-white: #1a1d27;
  --surface-raised: #21253a;
  --surface-hover: #272b40;
  --text-dark: #e8eaf0;
  --text-medium: #9da5b4;
  --text-light: #636b7a;
  --border-color: #2a2f45;
  --header-bg: #0d1117;
  --nav-bg: #1a1d27;
  --footer-bg: #0a0d14;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] body {
  background: #0f1117 !important;
  color: #e8eaf0;
}

[data-theme="dark"] .video-sidebar,
[data-theme="dark"] .video-main,
[data-theme="dark"] .featured-video,
[data-theme="dark"] .video-card,
[data-theme="dark"] .filter-btn {
  background: #1a1d27;
  border-color: #2a2f45;
  color: #e8eaf0;
}

[data-theme="dark"] .subject-item {
  background: #21253a;
  color: #c9cdd6;
}

[data-theme="dark"] .subject-item:hover {
  background: var(--primary-color);
  color: #fff;
}

[data-theme="dark"] .search-box input {
  color: #e8eaf0;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] .video-card-title {
  color: #e8eaf0;
}

[data-theme="dark"] p,
[data-theme="dark"] .video-card-meta,
[data-theme="dark"] .video-meta {
  color: #9da5b4;
}

[data-theme="dark"] #main-nav {
  background-color: #1a1d27;
  border-bottom: 1px solid #2a2f45;
}

[data-theme="dark"] .nav-link {
  color: #c9cdd6;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #21253a;
  color: #e8eaf0;
  border-color: #2a2f45;
}

[data-theme="dark"] input::placeholder {
  color: #636b7a;
}

[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #0f1117;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #2a2f45;
  border-radius: 4px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}
