/* Core Application Layout Styles */
:root {
  /* Default Theme (Dark) */
  --bg-gradient: linear-gradient(135deg, #090d16 0%, #111827 50%, #1e1b4b 100%);
  --sidebar-bg: rgba(15, 23, 42, 0.4);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  --warning: #f59e0b;
  
  /* Additional theme variables */
  --stacked-card-bg: #191c24;
  --stacked-card-unseen-bg: #1b2030;
  --stacked-card-expanded-bg: #1c2135;
  --stacked-card-footer-border: rgba(255, 255, 255, 0.05);
  --stacked-card-footer-bg: rgba(0, 0, 0, 0.15);
  --header-gradient: linear-gradient(to right, #fff, #94a3b8);
  --thread-card-bg: rgba(255, 255, 255, 0.02);
  --thread-card-hover-bg: rgba(255, 255, 255, 0.04);
  --feed-item-bg: rgba(255, 255, 255, 0.02);
  --iframe-container-bg: #111827;
  
  /* Popover styles */
  --popover-bg: rgba(15, 23, 42, 0.95);
  --popover-border: rgba(255, 255, 255, 0.08);
  --popover-preview-bg: rgba(255, 255, 255, 0.03);
  --popover-preview-border: rgba(255, 255, 255, 0.05);
  --input-bg: rgba(0, 0, 0, 0.2);
  --input-border: rgba(255, 255, 255, 0.1);
  
  /* Snooze modal styles */
  --modal-backdrop: rgba(15, 23, 42, 0.4);
  --modal-card-bg: rgba(30, 41, 59, 0.9);
  --modal-card-border: rgba(255, 255, 255, 0.08);
  --snooze-option-bg: rgba(15, 23, 42, 0.3);
  --snooze-option-border: rgba(255, 255, 255, 0.05);
  
  /* Badge styles */
  --badge-running-bg: rgba(99, 102, 241, 0.15);
  --badge-running-color: #818cf8;
  --badge-running-border: rgba(99, 102, 241, 0.3);
  --badge-completed-bg: rgba(16, 185, 129, 0.15);
  --badge-completed-color: #34d399;
  --badge-completed-border: rgba(16, 185, 129, 0.3);

  /* Bundle section delineation styles */
  --bundle-section-bg: rgba(99, 102, 241, 0.12);
  --bundle-section-border: rgba(99, 102, 241, 0.4);
}

:root[data-theme="light"] {
  --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
  --sidebar-bg: rgba(255, 255, 255, 0.45);
  --card-bg: rgba(248, 250, 252, 0.85);
  --card-border: rgba(15, 23, 42, 0.12);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent: #4f46e5;
  --accent-glow: rgba(79, 70, 229, 0.15);
  --success: #059669;
  --success-glow: rgba(5, 150, 105, 0.15);
  --warning: #d97706;
  
  --stacked-card-bg: #f8fafc;
  --stacked-card-unseen-bg: #f1f5f9;
  --stacked-card-expanded-bg: #e2e8f0;
  --stacked-card-footer-border: rgba(15, 23, 42, 0.08);
  --stacked-card-footer-bg: rgba(0, 0, 0, 0.04);
  --header-gradient: linear-gradient(to right, #0f172a, #475569);
  --thread-card-bg: #f8fafc;
  --thread-card-hover-bg: #f1f5f9;
  --feed-item-bg: rgba(248, 250, 252, 0.85);
  --iframe-container-bg: #f1f5f9;
  
  --popover-bg: rgba(248, 250, 252, 0.98);
  --popover-border: rgba(15, 23, 42, 0.15);
  --popover-preview-bg: rgba(0, 0, 0, 0.02);
  --popover-preview-border: rgba(0, 0, 0, 0.05);
  --input-bg: #ffffff;
  --input-border: rgba(15, 23, 42, 0.2);
  
  --modal-backdrop: rgba(15, 23, 42, 0.3);
  --modal-card-bg: #f8fafc;
  --modal-card-border: rgba(15, 23, 42, 0.15);
  --snooze-option-bg: rgba(0, 0, 0, 0.03);
  --snooze-option-border: rgba(0, 0, 0, 0.06);
  
  --badge-running-bg: rgba(79, 70, 229, 0.08);
  --badge-running-color: #4f46e5;
  --badge-running-border: rgba(79, 70, 229, 0.25);
  --badge-completed-bg: rgba(5, 150, 105, 0.08);
  --badge-completed-color: #059669;
  --badge-completed-border: rgba(5, 150, 105, 0.25);

  /* Bundle section delineation styles */
  --bundle-section-bg: rgba(79, 70, 229, 0.08);
  --bundle-section-border: rgba(79, 70, 229, 0.35);
}

/* Smooth theme transition animation and transitions */
.theme-transition-active,
.theme-transition-active * {
  transition: background 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease, fill 0.4s ease, stroke 0.4s ease !important;
}

@keyframes theme-pulse-glow {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.04) contrast(0.98);
  }
  100% {
    filter: brightness(1);
  }
}

.theme-transition-active body {
  animation: theme-pulse-glow 0.4s ease-in-out;
}

body:not(.admin-body) {
  margin: 0;
  padding: 0;
  background: var(--bg-gradient);
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 24px 32px;
  box-sizing: border-box;
}
