/* Critical: CSS Variables for instant theme rendering */
:root {
  --background: 0 0% 96%;
  --foreground: 220 10% 10%;
  --card: 0 0% 100%;
  --card-foreground: 220 10% 10%;
  --primary: 207 88% 68%;
  --primary-rgb: 100, 181, 246;
  --primary-foreground: 210 40% 10%;
  --secondary: 220 15% 93%;
  --secondary-foreground: 220 10% 25%;
  --muted: 220 15% 97%;
  --muted-foreground: 220 10% 45%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 10% 10%;
  --accent: 174 41% 51%;
  --accent-foreground: 0 0% 100%;
  --border: 220 10% 90%;
  --input: 220 10% 90%;
  --ring: 207 88% 68%;
  --radius: 0.5rem;
  --link-grad-from: hsl(207, 88%, 68%);
  --link-grad-to: hsl(174, 41%, 51%);
}
.dark {
  --background: 222 47% 11%;
  --foreground: 220 10% 95%;
  --card: 222 47% 13%;
  --card-foreground: 220 10% 95%;
  --primary: 207 88% 68%;
  --primary-rgb: 100, 181, 246;
  --primary-foreground: 210 40% 10%;
  --secondary: 222 47% 15%;
  --secondary-foreground: 220 10% 80%;
  --muted: 222 47% 11%;
  --muted-foreground: 220 10% 65%;
  --popover: 222 47% 13%;
  --popover-foreground: 220 10% 95%;
  --accent: 174 41% 61%;
  --accent-foreground: 210 40% 10%;
  --border: 220 10% 25%;
  --input: 220 10% 25%;
  --ring: 207 88% 68%;
  --link-grad-from: hsl(207, 88%, 68%);
  --link-grad-to: hsl(174, 41%, 61%);
}

/* Critical: Base Layout & Typography */
* { border-color: hsl(var(--border)); }
body { 
  background-color: hsl(var(--background)); 
  color: hsl(var(--foreground));
  font-family: var(--font-roboto), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.font-sans { font-family: var(--font-roboto), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
.flex-grow { flex-grow: 1; }
.pt-14 { padding-top: 3.5rem; }
.min-h-\[40vh\] { min-height: 40vh; }

/* Critical: Header Styles */
#site-header { 
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid hsl(var(--border) / 0.4);
  background-color: hsl(var(--background) / 0.95);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.2s ease;
}
.container { 
  width: 100%; 
  margin: 0 auto; 
  padding-left: 0.5rem; 
  padding-right: 0.5rem; 
}

/* Critical: Hero Section Styles */
.hero-section {
  position: relative;
  padding: 3rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid hsl(var(--border) / 0.2);
  overflow: hidden;
}
.hero-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)), hsl(var(--primary)));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero-description {
  font-size: 1rem;
  color: hsl(var(--muted-foreground));
  max-width: 24rem;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
  min-height: 4.5em;
}

/* Critical: Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 0.5rem 1rem;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

/* Critical: Search Component Styles */
.hero-search {
  max-width: 42rem;
  margin: 0 auto;
}
.search-input {
  width: 100%;
  border-radius: calc(var(--radius));
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: hsl(var(--foreground));
}
.search-input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

/* Critical: Responsive Breakpoints */
@media (min-width: 640px) { 
  .pt-14 { padding-top: 4rem; }
  .hero-section { padding: 4rem 0 5rem; }
  .hero-title { font-size: 3rem; margin-bottom: 1rem; }
  .hero-description { font-size: 1.125rem; max-width: 28rem; margin-bottom: 2rem; min-height: 3em; }
  .container { padding-left: 1rem; padding-right: 1rem; }
}
@media (min-width: 768px) {
  .hero-title { font-size: 3.75rem; }
  .hero-description { font-size: 1.25rem; max-width: 32rem; min-height: 3.5em; }
}
@media (min-width: 1024px) {
  .hero-section { padding: 5rem 0 6rem; }
}

/* Critical: Header Layout Fix */
#site-header .container {
  display: flex;
  height: 3.5rem;
  max-width: 100vw;
  align-items: center;
  justify-content: space-between;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
@media (min-width: 640px) {
  #site-header .container {
    height: 4rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Critical: Header Transparency - Increased for more transparency */
#site-header {
  background-color: hsl(var(--background) / 0.4) !important;
  backdrop-filter: blur(12px);
}
.dark #site-header {
  background-color: hsl(222 47% 11% / 0.95) !important;
}
#site-header.shadow-sm {
  background-color: hsl(var(--background) / 0.9) !important;
}
.dark #site-header.shadow-sm {
  background-color: hsl(222 47% 11% / 0.98) !important;
}

/* Critical: Red Color Utilities */
.text-red-500 { color: rgb(239 68 68); }
.text-red-600 { color: rgb(220 38 38); }
.bg-red-50 { background-color: rgb(254 242 242); }
.bg-red-100 { background-color: rgb(254 226 226); }
.bg-red-500 { background-color: rgb(239 68 68); }
.bg-red-600 { background-color: rgb(220 38 38); }
.border-red-300 { border-color: rgb(252 165 165); }
.border-red-500 { border-color: rgb(239 68 68); }
.ring-red-500 { --tw-ring-color: rgb(239 68 68); }

/* Critical: Dark Mode Red Colors */
.dark .text-red-400 { color: rgb(248 113 113); }
.dark .text-red-500 { color: rgb(239 68 68); }
.dark .bg-red-900 { background-color: rgb(127 29 29); }
.dark .bg-red-800 { background-color: rgb(153 27 27); }
.dark .border-red-600 { border-color: rgb(220 38 38); }

/* Critical: Favorite Heart Icon - RED FILLED */
.text-red-500, .text-red-600 { color: rgb(239 68 68) !important; }
.fill-destructive {
  fill: rgb(239 68 68) !important;
}
.fill-transparent { 
  fill: transparent !important; 
}

/* Critical: Form Validation */
.border-red-300, .border-red-500 { border-color: rgb(239 68 68) !important; }
.ring-red-500 { --tw-ring-color: rgb(239 68 68) !important; }

/* Critical: Dropdown Menu Background - Weltklasse Fix */
.dropdown-content, 
[role="menu"], 
[data-radix-popper-content-wrapper],
[data-radix-content],
[data-radix-dropdown-menu-content],
.dropdown-menu-content {
  background-color: hsl(var(--popover)) !important;
  border: 1px solid hsl(var(--border)) !important;
  border-radius: calc(var(--radius) - 2px) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* Navbar Dropdown - Solider Hintergrund (EXAKT wie Original) */
[data-radix-popper-content-wrapper] [role="menu"],
[data-radix-dropdown-menu-content] {
  background-color: hsl(0 0% 100%) !important;
}
.dark [data-radix-popper-content-wrapper] [role="menu"],
.dark [data-radix-dropdown-menu-content] {
  background-color: hsl(220 10% 18%) !important;
}

/* Critical: Badge and Label Styles - Weltklasse Fix */
.badge-red, .label-red {
  background-color: rgb(239 68 68) !important;
  color: white !important;
}
/* AI News Badge - Rot hinterlegt */
.bg-destructive {
  background-color: rgb(239 68 68) !important;
}
.text-destructive-foreground {
  color: white !important;
}
.hover\:bg-destructive\/90:hover {
  background-color: rgb(220 38 38) !important;
}

/* Critical: Required Field Asterisk */
.text-destructive { color: rgb(239 68 68) !important; }

/* Critical: Filter Sidebar - EXAKT wie Original globals.css */
.bg-sidebar {
  background-color: hsl(220 10% 94%) !important;
}
.dark .bg-sidebar {
  background-color: hsl(220 10% 10%) !important;
}
.border-sidebar,
.border-sidebar-border {
  border-color: hsl(220 10% 88%) !important;
}
.dark .border-sidebar,
.dark .border-sidebar-border {
  border-color: hsl(220 10% 22%) !important;
}
.text-sidebar-foreground {
  color: hsl(220 10% 10%) !important;
}
.dark .text-sidebar-foreground {
  color: hsl(220 10% 95%) !important;
}

/* Critical: Error States */
.error-border { border-color: rgb(239 68 68) !important; }
.error-bg { background-color: rgb(254 242 242) !important; }
.error-text { color: rgb(220 38 38) !important; }

/* Critical: Animation Foundations */
.will-animate { opacity: 0; }
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.animate-fade-in-up { animation: fade-in-up 0.5s ease-out both; }
.animate-fade-in { animation: fade-in 0.5s ease-out both; }
.animate-scale-in { animation: scale-in 0.5s ease-out both; }

