/* calmshows Design System - Matching iOS Corporate Colors */

:root {
  /* Corporate Primary Colors */
  --primary: rgb(23, 28, 41); /* #171C29 - Deep charcoal */
  --secondary: rgb(117, 132, 150); /* #758496 - Professional gray */
  --accent: rgb(100, 116, 139); /* #64748B - Muted slate */
  
  /* Corporate Authentication Colors */
  --auth-primary: rgb(71, 85, 105); /* #475569 - Slate gray */
  --auth-secondary: rgb(107, 114, 128); /* #6B7280 - Sage gray */
  --auth-accent: rgb(93, 107, 143); /* #5D6B8F - Muted blue */
  --auth-sage: rgb(107, 125, 115); /* #6B7D73 - Sage green */
  
  /* Corporate Backgrounds */
  --bg-primary: rgb(250, 250, 250); /* #FAFAFA - Warm white */
  --bg-secondary: rgb(248, 250, 252); /* #F8FAFC - Subtle gray */
  --bg-card: rgb(255, 255, 255); /* Pure white */
  --bg-surface: rgb(255, 255, 255); /* Pure white */
  --bg-surface-secondary: rgb(245, 247, 250); /* #F5F7FA - Light surface */
  
  /* Corporate Text Hierarchy */
  --text-primary: rgb(30, 41, 59); /* #1E293B - Professional dark */
  --text-secondary: rgb(71, 85, 105); /* #475569 - Medium gray */
  --text-tertiary: rgb(133, 144, 153); /* #859099 - Light gray */
  --text-muted: rgb(163, 171, 186); /* #A3ABBA - Very light */
  
  /* Corporate Interactive Elements */
  --btn-primary: rgb(71, 85, 105); /* #475569 - Professional */
  --btn-secondary: rgb(100, 116, 139); /* #64748B - Muted */
  --btn-disabled: rgb(181, 193, 202); /* #B5C1CA - Disabled */
  
  /* Status Colors (Muted) */
  --success: rgb(87, 153, 107); /* #57996B - Muted green */
  --warning: rgb(209, 171, 87); /* #D1AB57 - Muted amber */
  --error: rgb(194, 107, 107); /* #C26B6B - Muted red */
  --info: rgb(99, 130, 173); /* #6382AD - Muted blue */
  --rating: rgb(204, 173, 87); /* #CCAD57 - Muted gold */
  
  /* Corporate Borders & Dividers */
  --border: rgb(221, 227, 234); /* #DDE3EA - Subtle border */
  --border-muted: rgb(232, 237, 242); /* #E8EDF2 - Very subtle */
  --divider: rgb(214, 221, 230); /* #D6DDE6 - Divider */
  
  /* Shadow Colors */
  --shadow-light: rgba(0, 0, 0, 0.04);
  --shadow-medium: rgba(0, 0, 0, 0.08);
  --shadow-strong: rgba(0, 0, 0, 0.15);
  
  /* Spacing System */
  --spacing-xxs: 2px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-xxl: 24px;
  --spacing-xxxl: 32px;
  
  /* Corner Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  /* Glass & Material Effects */
  --glass-primary: rgba(255, 255, 255, 0.15);
  --glass-secondary: rgba(255, 255, 255, 0.08);
  --material-light: rgba(255, 255, 255, 0.85);
  --material-dark: rgba(0, 0, 0, 0.05);
}

/* Base styling updates */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Navigation styling */
nav {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px var(--shadow-light);
}

.nav-link {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--auth-accent);
}

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

/* Card styling */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px var(--shadow-light);
}

.card:hover {
  box-shadow: 0 4px 12px var(--shadow-medium);
}

/* Button styling */
.btn-primary {
  background-color: var(--btn-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-weight: 500;
  transition: background-color 0.2s ease;
}

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

.btn-secondary {
  background-color: var(--btn-secondary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.btn-secondary:hover {
  background-color: var(--secondary);
}

/* Filter chip styling */
.filter-chip {
  background-color: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.filter-chip:hover {
  background-color: var(--bg-surface-secondary);
}

.filter-chip.active {
  background-color: var(--auth-accent);
  color: white;
  border-color: var(--auth-accent);
}

/* Status badges */
.status-active {
  background-color: var(--success);
  color: white;
}

.status-wishlist {
  background-color: var(--warning);
  color: white;
}

.status-watched {
  background-color: var(--success);
  color: white;
}

/* Content type tags */
.content-type-movie {
  background-color: var(--info);
  color: white;
}

.content-type-tv {
  background-color: var(--auth-accent);
  color: white;
}

.content-type-person {
  background-color: var(--success);
  color: white;
}

.content-type-studio {
  background-color: var(--warning);
  color: white;
}

/* Loading states */
.loading-skeleton {
  background: linear-gradient(90deg, var(--bg-surface-secondary) 25%, var(--border-muted) 50%, var(--bg-surface-secondary) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Material design effects */
.material-surface {
  background: var(--material-light);
  backdrop-filter: blur(10px);
}

.glass-surface {
  background: var(--glass-primary);
  backdrop-filter: blur(20px);
}

/* iOS-inspired date headers */
.date-header {
  border-radius: var(--radius-xl);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.date-header.today {
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
}

.date-header.tomorrow {
  background: linear-gradient(135deg, #10B981, #047857);
}

.date-header.this-week {
  background: linear-gradient(135deg, #8B5CF6, #5B21B6);
}

.date-header.future {
  background: linear-gradient(135deg, #6B7280, #374151);
}

/* Enhanced shadows and depth */
.shadow-corporate {
  box-shadow: 0 4px 12px var(--shadow-medium);
}

.shadow-corporate-strong {
  box-shadow: 0 8px 24px var(--shadow-strong);
}

/* Typography improvements */
.heading-primary {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

.heading-secondary {
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 1.3;
}

.text-body {
  color: var(--text-secondary);
  line-height: 1.6;
}

.text-caption {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Interactive states */
.interactive:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--shadow-medium);
  transition: all 0.2s ease;
}

/* Focus states */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--auth-accent);
}

/* Professional form styling */
.form-input {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px var(--glass-secondary);
}

/* Timeline Card Styles */
.timeline-items {
  display: grid;
  gap: var(--spacing-md);
}

.timeline-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: 0 1px 3px var(--shadow-light);
  transition: all 0.2s ease;
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-medium);
}

.timeline-card.watched {
  opacity: 0.7;
  border-color: var(--success);
}

.timeline-card-layout {
  display: flex;
  gap: var(--spacing-md);
}

.timeline-card-image {
  flex-shrink: 0;
  width: 80px;
  height: 120px;
}

.timeline-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.timeline-placeholder {
  width: 100%;
  height: 100%;
  background-color: var(--bg-surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-tertiary);
}

.timeline-card-content {
  flex: 1;
  min-width: 0;
}

.timeline-header {
  margin-bottom: var(--spacing-sm);
}

.timeline-title {
  margin: 0 0 var(--spacing-xs) 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.timeline-subtitle {
  margin: 0 0 var(--spacing-sm) 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.timeline-meta .media-type {
  background-color: var(--auth-accent);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.timeline-meta .episode {
  background-color: var(--info);
}

.timeline-meta .movie {
  background-color: var(--auth-accent);
}

.timeline-time {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.timeline-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: var(--spacing-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.watched-badge {
  background-color: var(--success);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Timeline Date Sections */
.timeline-date-section {
  margin-bottom: var(--spacing-xl);
}

.timeline-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border);
}

.timeline-date-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-date-header .item-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Responsive design helpers */
@media (max-width: 768px) {
  :root {
    --spacing-lg: 12px;
    --spacing-xl: 16px;
    --spacing-xxl: 20px;
    --spacing-xxxl: 24px;
  }
  
  .timeline-card-layout {
    flex-direction: column;
  }
  
  .timeline-card-image {
    width: 100%;
    height: 160px;
  }
}