/* Natural Healing Videos - Main Stylesheet */
/* Accessible Organic Design for Elderly Users */

/* ========================================
   CSS Variables - Design System
   ======================================== */
:root {
  /* Colors - Nature-Inspired with High Contrast */
  --primary: #4A6C39;           /* Forest Green */
  --primary-hover: #5A7C49;
  --primary-light: #6A8C59;
  
  /* Foundation Colors */
  --bg-warm: #FBF9F4;          /* Warm Parchment */
  --bg-white: #FFFFFF;          /* Pure White */
  --text-dark: #413B34;         /* Dark Charcoal */
  --text-secondary: #8D7A65;    /* Muted Taupe */
  
  /* Semantic Colors */
  --success: #3A8E4E;           /* Healthy Green */
  --warning: #D97706;           /* Amber */
  --error: #C83E4D;             /* Soft Red */
  
  /* Typography Scale */
  --font-heading: 'Lora', serif;
  --font-body: 'Lato', sans-serif;
  
  /* Font Sizes - Large for Accessibility */
  --text-xs: 14px;
  --text-sm: 16px;
  --text-base: 18px;            /* Base size for body text */
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 36px;
  --text-4xl: 56px;
  
  /* Spacing - 8pt Grid System */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-xxl: 64px;
  --space-xxxl: 96px;
  
  /* Layout */
  --container-max: 1280px;
  --border-radius: 16px;
  --shadow: 0 4px 12px rgba(65, 59, 52, 0.15);
  --shadow-hover: 0 8px 24px rgba(65, 59, 52, 0.25);
  
  /* Touch Targets */
  --touch-target: 48px;
  --touch-target-lg: 64px;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --primary: #6A8C59;
  --primary-hover: #7A9C69;
  --primary-light: #8AAC79;
  
  --bg-warm: #1a1a1a;
  --bg-white: #2d2d2d;
  --text-dark: #e8e8e8;
  --text-secondary: #a8a8a8;
  
  --success: #4A8E4E;
  --warning: #F59E0B;
  --error: #DC2626;
  
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.7);
}

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

html {
  font-size: 18px; /* Larger base font size */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--bg-warm);
  overflow-x: hidden;
}

/* ========================================
   Accessibility - Skip Links & Screen Reader
   ======================================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 100;
  font-weight: bold;
}

.skip-link:focus {
  top: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Container & Layout
   ======================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-xl);
  }
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-xl);
}

@media (max-width: 767px) {
  h1 {
    font-size: var(--text-3xl);
  }
  
  h2 {
    font-size: var(--text-2xl);
  }
}

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ========================================
   Theme Toggle Button
   ======================================== */
.theme-toggle {
  background: var(--bg-white);
  border: 2px solid var(--primary-light);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: var(--space-md);
}

.theme-toggle:hover,
.theme-toggle:focus {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-white);
  transform: scale(1.05);
}

.theme-toggle:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.theme-icon {
  transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-icon {
  transform: rotate(180deg);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  min-height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.logo-text {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.nav-link {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-dark);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--primary);
  text-decoration: none;
  background-color: rgba(74, 108, 57, 0.1);
}

.nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.submit-btn {
  background: var(--primary);
  color: var(--bg-white);
  border: none;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-lg);
  font-weight: 700;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: var(--touch-target);
  min-width: 160px;
}

.submit-btn:hover,
.submit-btn:focus {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.submit-btn:active {
  transform: scale(0.97);
}

@media (max-width: 1023px) {
  .nav {
    display: none;
  }
  
  .nav-wrapper {
    flex-wrap: wrap;
  }
  
  .submit-btn {
    order: 3;
    width: 100%;
    margin-top: var(--space-sm);
  }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  color: var(--bg-white);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(74, 108, 57, 0.8), rgba(141, 122, 101, 0.6));
  z-index: -1;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  padding: var(--space-xxxl) 0;
}

.hero-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--bg-white);
  margin-bottom: var(--space-md);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--bg-white);
  line-height: 1.6;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .hero-title {
    font-size: var(--text-2xl);
  }
  
  .hero-description {
    font-size: var(--text-base);
  }
}

/* ========================================
   Search Section
   ======================================== */
.search-section {
  padding: var(--space-xxxl) 0;
  background: var(--bg-white);
}

.search-container {
  max-width: 800px;
  margin: 0 auto var(--space-lg) auto;
  text-align: center;
}

.search-wrapper {
  position: relative;
  margin-bottom: var(--space-sm);
}

.search-input {
  width: 100%;
  height: var(--touch-target-lg);
  padding: 0 var(--space-lg) 0 72px;
  font-size: var(--text-lg);
  border: 2px solid var(--text-secondary);
  border-radius: var(--border-radius);
  background: var(--bg-white);
  color: var(--text-dark);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 108, 57, 0.3);
}

.search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-help {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin: 0;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.filter-tag {
  background: transparent;
  border: 2px solid var(--text-secondary);
  color: var(--text-dark);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: var(--touch-target);
  white-space: nowrap;
}

.filter-tag:hover,
.filter-tag:focus {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(74, 108, 57, 0.1);
}

.filter-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-white);
}

@media (max-width: 767px) {
  .filter-tags {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
  }
}

/* ========================================
   Videos Section
   ======================================== */
.videos-section {
  padding: var(--space-xxxl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xxl);
  color: var(--text-dark);
}

.browse-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xxl);
}

.browse-category {
  background: var(--bg-white);
  padding: var(--space-xl);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.category-title {
  color: var(--primary);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.category-link {
  background: rgba(74, 108, 57, 0.1);
  color: var(--primary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius);
  font-size: var(--text-base);
  font-weight: 600;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.category-link:hover,
.category-link:focus {
  background: var(--primary);
  color: var(--bg-white);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

@media (max-width: 767px) {
  .browse-categories {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Sidebar Layout
   ======================================== */
.sidebar-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: var(--space-xxl);
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 2rem;
  background: var(--bg-white);
  padding: var(--space-xl);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.sidebar-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.sidebar-title {
  color: var(--primary);
  font-size: var(--text-lg);
  margin: 0;
}

.dropdown-group {
  margin-bottom: var(--space-lg);
}

.dropdown-label {
  display: block;
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  font-size: var(--text-base);
}

.category-dropdown {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--primary-light);
  border-radius: var(--border-radius);
  background: var(--bg-warm);
  color: var(--text-dark);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.category-dropdown:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 108, 57, 0.1);
}

.category-dropdown:hover {
  border-color: var(--primary);
}

.main-content {
  flex: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    position: static;
    margin-bottom: var(--space-xl);
  }
  
  .dropdown-group {
    margin-bottom: var(--space-md);
  }
}

/* ========================================
   Video Grid
   ======================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.video-card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.video-card:hover,
.video-card:focus {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  color: inherit;
}

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

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.1);
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay,
.video-card:focus .play-overlay {
  opacity: 1;
}

.play-icon {
  width: 64px;
  height: 64px;
  fill: var(--bg-white);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.video-info {
  padding: var(--space-md);
}

.video-title {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-channel {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.video-tag {
  background: rgba(74, 108, 57, 0.1);
  color: var(--primary);
  padding: 4px var(--space-sm);
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
}

@media (max-width: 767px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .video-card {
    max-width: 100%;
  }
}

/* ========================================
   Loading & No Results
   ======================================== */
.loading {
  text-align: center;
  padding: var(--space-xxl);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(74, 108, 57, 0.3);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-md) auto;
}

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

.no-results {
  text-align: center;
  padding: var(--space-xxl);
  color: var(--text-secondary);
}

/* ========================================
   Info Section
   ======================================== */
.info-section {
  padding: var(--space-xxxl) 0;
  background: var(--bg-white);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.info-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--bg-warm);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.info-card h3 {
  color: var(--primary);
  margin-bottom: var(--space-md);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--text-dark);
  color: var(--bg-white);
  padding: var(--space-xl) 0;
  text-align: center;
}

.footer-content p {
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
}

.footer-content p:last-child {
  margin-bottom: 0;
}

/* ========================================
   Modal
   ======================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.modal-content {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-hover);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid rgba(141, 122, 101, 0.2);
}

.modal-header h2 {
  margin: 0;
  color: var(--text-dark);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
}

.modal-close:hover,
.modal-close:focus {
  color: var(--text-dark);
  background: rgba(141, 122, 101, 0.1);
}

/* ========================================
   Form Styles
   ======================================== */
.submission-form {
  padding: var(--space-lg);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-md);
  font-size: var(--text-base);
  border: 2px solid var(--text-secondary);
  border-radius: var(--border-radius);
  background: var(--bg-white);
  color: var(--text-dark);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: var(--touch-target);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 108, 57, 0.3);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-sm);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--border-radius);
  transition: background-color 0.2s ease;
}

.checkbox-label:hover {
  background: rgba(74, 108, 57, 0.05);
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-text {
  font-size: var(--text-base);
  color: var(--text-dark);
}

.form-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(141, 122, 101, 0.2);
}

.btn-primary,
.btn-secondary {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  font-weight: 700;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: var(--touch-target);
  min-width: 120px;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg-white);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--text-secondary);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--text-secondary);
  color: var(--bg-white);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 767px) {
  .hero {
    min-height: 50vh;
  }
  
  .nav-wrapper {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .logo {
    justify-content: center;
    margin-bottom: var(--space-sm);
  }
  
  .modal-content {
    width: 95%;
    margin: var(--space-sm);
  }
  
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* ========================================
   Focus Management
   ======================================== */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

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

/* ========================================
   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;
  }
  
  .video-card:hover {
    transform: none;
  }
  
  .video-card:focus {
    transform: none;
  }
}

/* ========================================
   Video Player Modal
   ======================================== */
.video-modal .modal-content {
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
}

.video-player-content {
  display: flex;
  flex-direction: column;
  height: 80vh;
  max-height: 600px;
}

.video-player-container {
  flex: 1;
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  overflow-y: auto;
}

.video-player {
  flex: 2;
  background: var(--text-dark);
  border-radius: var(--border-radius);
  overflow: hidden;
  min-height: 300px;
}

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

.video-info-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.video-title-player {
  font-size: var(--text-xl);
  color: var(--text-dark);
  margin: 0;
  line-height: 1.3;
}

.video-channel-player {
  font-size: var(--text-lg);
  color: var(--primary);
  font-weight: 700;
  margin: 0;
}

.video-description-player {
  font-size: var(--text-base);
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.video-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.video-tags-player {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.video-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: auto;
}

.watch-youtube-btn,
.share-btn {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  font-weight: 700;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: var(--touch-target);
  border: none;
  text-decoration: none;
  text-align: center;
}

.watch-youtube-btn {
  background: var(--primary);
  color: var(--bg-white);
}

.watch-youtube-btn:hover,
.watch-youtube-btn:focus {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--bg-white);
}

.share-btn {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.share-btn:hover,
.share-btn:focus {
  background: var(--primary);
  color: var(--bg-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Make video cards clickable */
.video-card {
  cursor: pointer;
  user-select: none;
}

.video-card:hover,
.video-card:focus {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-hover);
}

.video-card:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Mobile responsive for video modal */
@media (max-width: 767px) {
  .video-player-container {
    flex-direction: column;
    padding: var(--space-md);
  }
  
  .video-player {
    min-height: 250px;
  }
  
  .video-actions {
    flex-direction: row;
  }
  
  .watch-youtube-btn,
  .share-btn {
    flex: 1;
  }
}

/* ========================================
   Collapsible Sidebar Styles
   ======================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 250px;
  background: var(--bg-white);
  border-right: 1px solid rgba(141, 122, 101, 0.2);
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  overflow: hidden;
}

.sidebar.collapsed {
  width: 80px;
}

.sidebar-header {
  padding: var(--space-md);
  border-bottom: 1px solid rgba(141, 122, 101, 0.2);
  display: flex;
  justify-content: flex-end;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: 8px;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background: rgba(74, 108, 57, 0.1);
}

.sidebar-toggle:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.sidebar.collapsed .sidebar-toggle .chevron-icon {
  transform: rotate(180deg);
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  overflow-y: auto;
}

/* Sidebar Links */
.sidebar-link,
.sidebar-dropdown-toggle,
.sidebar-submit-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-dark);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  font-size: var(--text-base);
}

.sidebar-link:hover,
.sidebar-dropdown-toggle:hover,
.sidebar-submit-btn:hover {
  background: rgba(74, 108, 57, 0.1);
  color: var(--primary);
}

.sidebar-link:focus,
.sidebar-dropdown-toggle:focus,
.sidebar-submit-btn:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.sidebar-link.active,
.sidebar-dropdown-toggle.active {
  background: rgba(74, 108, 57, 0.15);
  color: var(--primary);
}

.sidebar-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-label {
  opacity: 0;
  width: 0;
}

.sidebar.collapsed .sidebar-link,
.sidebar.collapsed .sidebar-dropdown-toggle,
.sidebar.collapsed .sidebar-submit-btn {
  justify-content: center;
  padding: var(--space-md);
}

/* Dropdown in Sidebar */
.sidebar-dropdown {
  position: relative;
}

.sidebar-dropdown-menu {
  display: none;
  padding-left: var(--space-xl);
  list-style: none;
  margin-top: var(--space-xs);
}

.sidebar-dropdown.open .sidebar-dropdown-menu {
  display: block;
}

.sidebar-dropdown-item {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  font-size: var(--text-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-dropdown-item:hover,
.sidebar-dropdown-item:focus {
  background: rgba(74, 108, 57, 0.1);
  color: var(--primary);
}

.sidebar.collapsed .sidebar-dropdown-menu {
  position: fixed;
  left: 80px;
  top: auto;
  background: var(--bg-white);
  border: 1px solid rgba(141, 122, 101, 0.2);
  border-radius: 12px;
  padding: var(--space-md);
  box-shadow: var(--shadow);
  min-width: 200px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 200;
}

.dropdown-arrow {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.sidebar-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.sidebar.collapsed .dropdown-arrow {
  display: none;
}

/* Submit Button in Sidebar */
.sidebar-submit-btn {
  margin-top: auto;
  background: var(--primary);
  color: var(--bg-white);
  justify-content: flex-start;
}

.sidebar-submit-btn:hover {
  background: var(--primary-hover);
  color: var(--bg-white);
}

.sidebar.collapsed .sidebar-submit-btn {
  justify-content: center;
}

/* Tooltip for collapsed state */
.sidebar-link::after,
.sidebar-dropdown-toggle::after,
.sidebar-submit-btn::after {
  content: attr(title);
  position: absolute;
  left: 100%;
  margin-left: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--text-dark);
  color: var(--bg-white);
  border-radius: 8px;
  font-size: var(--text-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 300;
}

.sidebar.collapsed .sidebar-link:hover::after,
.sidebar.collapsed .sidebar-dropdown-toggle:hover::after,
.sidebar.collapsed .sidebar-submit-btn:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Main Content with Sidebar */
.main-content {
  flex: 1;
  margin-left: 250px;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed .main-content {
  margin-left: 80px;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

.sidebar-overlay.active {
  display: block;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 150;
  background: var(--bg-white);
  border: none;
  padding: var(--space-sm);
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  color: var(--text-dark);
}

.mobile-menu-btn:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Mobile Sidebar */
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .sidebar.collapsed {
    width: 280px;
  }
  
  .sidebar.collapsed .sidebar-label {
    opacity: 1;
    width: auto;
  }
  
  .sidebar.collapsed .sidebar-link,
  .sidebar.collapsed .sidebar-dropdown-toggle,
  .sidebar.collapsed .sidebar-submit-btn {
    justify-content: flex-start;
  }
  
  .sidebar.collapsed .sidebar-toggle .chevron-icon {
    transform: none;
  }
  
  .sidebar.collapsed .dropdown-arrow {
    display: block;
  }
  
  .sidebar.collapsed .sidebar-dropdown-menu {
    position: static;
    left: auto;
    top: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: var(--space-xl);
    min-width: auto;
    max-height: none;
  }
  
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  body.sidebar-collapsed .main-content {
    margin-left: 0;
  }
}

/* ========================================
   Alphabet Navigation Styles
   ======================================== */
.alphabet-nav {
  margin: var(--space-lg) 0;
  padding: var(--space-md) 0;
  border-top: 1px solid rgba(141, 122, 101, 0.2);
  border-bottom: 1px solid rgba(141, 122, 101, 0.2);
}

.alphabet-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: center;
}

.alpha-btn {
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border: 2px solid rgba(141, 122, 101, 0.3);
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s ease;
}

.alpha-btn:hover:not(:disabled),
.alpha-btn:focus {
  background: rgba(74, 108, 57, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.alpha-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-white);
}

.alpha-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-warm);
}

.alpha-btn:disabled:hover {
  transform: none;
  border-color: rgba(141, 122, 101, 0.3);
}

@media (max-width: 767px) {
  .alphabet-scroll {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .alpha-btn {
    min-width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
}

/* Filter section layout */
.search-section .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Video results with sidebar layout removed */
.video-results {
  width: 100%;
}