/* AuraTube Custom Styles */
:root {
  --youtube-red: #ff0000;
  --youtube-red-hover: #cc0000;
  --light-gray: #f8f9fa;
  --medium-gray: #6c757d;
  --dark-gray: #343a40;
  --success-green: #06d6a0;
  --warning-orange: #f7931e;
  --primary-blue: #118ab2;
}

/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-gray);
}

.container-fluid {
  max-width: 1400px;
}

/* Navigation */
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-nav .nav-link {
  font-weight: 500;
  border-radius: 6px;
  margin: 0 4px;
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
  background-color: var(--light-gray);
}

/* Hero Section */
.hero-section {
  padding: 4rem 0;
}

.hero-section .display-4 {
  background: linear-gradient(135deg, var(--youtube-red), var(--warning-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

/* Feature Cards */
.feature-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e9ecef;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.feature-icon {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Step Numbers */
.step-number {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-blue), var(--success-green));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  margin: 0 auto;
}

/* Folder Cards */
.folder-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #e9ecef;
  overflow: hidden;
}

.folder-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.folder-header {
  padding: 1.5rem 1.5rem 1rem;
  position: relative;
}

.folder-icon i {
  font-size: 2rem;
}

.folder-body {
  padding: 0 1.5rem 1rem;
}

.folder-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-gray);
}

.folder-description {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.folder-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-item {
  font-size: 0.85rem;
  color: var(--medium-gray);
}

.folder-preview {
  margin-bottom: 1rem;
}

.channel-thumbnails {
  display: flex;
  gap: 4px;
  align-items: center;
}

.channel-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid white;
  margin-left: -4px;
}

.channel-thumb:first-child {
  margin-left: 0;
}

.more-channels {
  background: var(--medium-gray);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  margin-left: -4px;
}

.folder-footer {
  padding: 1rem 1.5rem;
  background: var(--light-gray);
  border-top: 1px solid #e9ecef;
}

/* Folder Detail Header */
.folder-header-detail {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.folder-stats-inline .badge {
  font-size: 0.8rem;
}

/* Video Cards */
.video-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.video-thumbnail {
  position: relative;
  overflow: hidden;
}

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

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

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-info {
  padding: 1.25rem;
}

.video-title {
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.video-title a {
  color: var(--dark-gray);
  text-decoration: none;
}

.video-title a:hover {
  color: var(--youtube-red);
}

.video-meta {
  margin-bottom: 0.75rem;
}

.channel-info {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.channel-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.channel-name {
  font-size: 0.9rem;
  color: var(--medium-gray);
}

.video-topics .badge {
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

.video-actions {
  display: flex;
  gap: 0.5rem;
}

/* Video Summary Page */
.video-header {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.video-thumbnail-large {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.video-details h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.video-metadata .stat-item {
  display: inline-flex;
  align-items: center;
  color: var(--medium-gray);
}

/* Analysis Tabs */
.nav-tabs {
  border-bottom: 2px solid #e9ecef;
}

.nav-tabs .nav-link {
  border: none;
  border-radius: 8px 8px 0 0;
  font-weight: 500;
  color: var(--medium-gray);
  padding: 1rem 1.5rem;
}

.nav-tabs .nav-link.active {
  background: white;
  color: var(--youtube-red);
  border-bottom: 3px solid var(--youtube-red);
}

/* AI Summary Card */
.ai-summary-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.summary-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.summary-text {
  margin-bottom: 1.5rem;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.topic-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background: var(--light-gray);
  border-radius: 6px;
}

/* Transcript */
.transcript-content {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.transcript-header {
  padding: 1.5rem;
  background: var(--light-gray);
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: between;
  align-items: center;
}

.transcript-text {
  padding: 1.5rem;
  max-height: 600px;
  overflow-y: auto;
}

.transcript-text pre {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
}

/* Chapters */
.chapters-content {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.chapters-header {
  padding: 1.5rem;
  background: var(--light-gray);
  border-bottom: 1px solid #e9ecef;
}

.chapters-list {
  padding: 1rem;
}

.chapter-item {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.chapter-item:hover {
  background: var(--light-gray);
}

.chapter-item:last-child {
  border-bottom: none;
}

.chapter-time {
  min-width: 80px;
  margin-right: 1rem;
}

.time-badge {
  background: var(--primary-blue);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.chapter-content {
  flex: 1;
  margin-right: 1rem;
}

.chapter-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.chapter-description {
  font-size: 0.9rem;
}

/* Entities */
.entities-content {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.entities-header {
  padding: 1.5rem;
  background: var(--light-gray);
  border-bottom: 1px solid #e9ecef;
}

.entities-grid {
  padding: 1.5rem;
}

.entity-category {
  margin-bottom: 2rem;
}

.entity-category:last-child {
  margin-bottom: 0;
}

.entity-category h6 {
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.entity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.entity-tags .badge {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
}

/* Folder Digest */
.folder-digest {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.folder-digest h4 {
  color: white;
  margin-bottom: 1.5rem;
}

.digest-content .lead {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.trending-topics .badge {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.key-insights ul {
  margin: 0;
}

.key-insights li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
}

.recommended-videos {
  background: rgba(255,255,255,0.1);
  padding: 1.5rem;
  border-radius: 8px;
}

.recommendation {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.priority-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.priority-high {
  background: #ff4757;
}

.priority-medium {
  background: #ffa502;
}

.priority-low {
  background: #7bed9f;
}

/* Color Picker */
.color-picker {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.preset-colors {
  display: flex;
  gap: 0.5rem;
}

.color-preset {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-preset:hover,
.color-preset.selected {
  border-color: var(--dark-gray);
  transform: scale(1.1);
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state i {
  opacity: 0.5;
}

.empty-state h4,
.empty-state h5 {
  color: var(--medium-gray);
  margin-bottom: 1rem;
}

/* Processing State */
.processing-state {
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Call to Action Section */
.cta-section {
  background: linear-gradient(135deg, #2c3e50, #34495e) !important;
  border-radius: 16px !important;
}

.cta-section .btn-light {
  background: white;
  border: none;
  color: var(--dark-gray);
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-section .btn-light:hover {
  background: var(--light-gray);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Mission Statement */
.mission-statement {
  border-left: 4px solid var(--primary-blue);
}

/* Vision Step Enhancement */
.vision-step {
  padding: 1rem;
}

.vision-step .step-number {
  background: var(--primary-blue) !important;
  box-shadow: 0 4px 12px rgba(17, 138, 178, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .folder-header-detail {
    padding: 1.5rem;
  }
  
  .folder-actions {
    margin-top: 1rem;
  }
  
  .video-header {
    padding: 1.5rem;
  }
  
  .video-details h1 {
    font-size: 1.5rem;
  }
  
  .nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .chapter-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .chapter-time {
    margin-bottom: 0.5rem;
    margin-right: 0;
  }
  
  .chapter-action {
    margin-top: 0.5rem;
  }
}

/* List View Toggle */
.videos-container.list-view .row {
  display: block;
}

.videos-container.list-view .video-card {
  display: flex;
  margin-bottom: 1rem;
  max-width: none;
}

.videos-container.list-view .video-thumbnail {
  flex-shrink: 0;
  width: 200px;
}

.videos-container.list-view .video-thumbnail img {
  height: 120px;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.folder-card,
.video-card,
.feature-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Custom Scrollbar */
.transcript-text::-webkit-scrollbar {
  width: 8px;
}

.transcript-text::-webkit-scrollbar-track {
  background: var(--light-gray);
  border-radius: 4px;
}

.transcript-text::-webkit-scrollbar-thumb {
  background: var(--medium-gray);
  border-radius: 4px;
}

.transcript-text::-webkit-scrollbar-thumb:hover {
  background: var(--dark-gray);
}
