/* Reset and Base Styles */
@font-face {
  font-family: "Space Grotesk";
  src: url(/font/Space-Grotesk.ttf) format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* {
  font-family: "Space Grotesk" !important;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background: 245 247 250;
  --foreground: 20 23 30;
  --card: 255 255 255;
  --card-foreground: 20 23 30;
  --popover: 255 255 255;
  --popover-foreground: 20 23 30;
  --primary: 14 165 233;
  --primary-foreground: 255 255 255;
  --secondary: 234 236 240;
  --secondary-foreground: 20 23 30;
  --muted: 234 236 240;
  --muted-foreground: 100 116 139;
  --accent: 14 165 233;
  --accent-foreground: 255 255 255;
  --destructive: 220 38 38;
  --destructive-foreground: 255 255 255;
  --border: 222 226 230;
  --input: 222 226 230;
  --ring: 14 165 233;
  --radius: 0.75rem;
  --search: 255 255 255;
}

.dark {
  --background: 14 17 22;
  --foreground: 230 230 230;
  --card: 26 29 36;
  --card-foreground: 230 230 230;
  --popover: 26 29 36;
  --popover-foreground: 230 230 230;
  --primary: 34 211 238;
  --primary-foreground: 14 17 22;
  --secondary: 42 47 58;
  --secondary-foreground: 230 230 230;
  --muted: 42 47 58;
  --muted-foreground: 156 163 175;
  --accent: 34 211 238;
  --accent-foreground: 14 17 22;
  --destructive: 127 29 29;
  --destructive-foreground: 248 250 252;
  --border: 42 47 58;
  --input: 42 47 58;
  --ring: 14 165 233;
  --search: 26 29 36 / 50%;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: rgb(var(--background));
  color: rgb(var(--foreground));
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
  padding-top: 0;
}

.min-h-screen {
  min-height: 100vh;
}

.bg-background {
  background-color: rgb(var(--background));
}

/* Added news-specific styles */

/* Header Styles */
.search-header {
  border-bottom: 1px solid rgb(var(--border));
  background-color: rgba(var(--background), 0.95);
  backdrop-filter: blur(8px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dark .search-header {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.search-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 1.5rem;
}

.search-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: rgb(var(--foreground));
}

.search-logo-text {
  font-size: 1.5rem;
  font-weight: 600;
}

.search-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  color: rgb(var(--foreground));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(1);
}

.settings-btn:hover {
  background-color: rgb(var(--muted));
  transform: scale(1.05);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-small {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Search Navigation */
.search-nav {
  padding: 0 1.5rem 0.75rem;
}

.search-nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.search-nav-btn {
  background: none;
  border: none;
  padding: 0 0 0.5rem 0;
  cursor: pointer;
  color: rgb(var(--muted-foreground));
  transition: color 0.2s ease;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.search-nav-btn:hover {
  color: rgb(var(--foreground));
}

.search-nav-btn.active {
  color: rgb(var(--primary));
  border-bottom-color: rgb(var(--primary));
}

/* Main Content */
.search-results-main {
  padding-top: 1.5rem;
  margin-top: 120px;
}

/* Settings Card (used for articles and forms) */
.settings-card {
  background-color: rgb(var(--card));
  border: 1px solid rgb(var(--border));
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-card-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgb(var(--border));
}

.settings-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.settings-card-description {
  font-size: 0.875rem;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

.settings-card-content {
  padding: 1.5rem;
}

.setting-group {
  margin-bottom: 1.5rem;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-label {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.setting-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(var(--border));
  border-radius: 0.375rem;
  background-color: rgb(var(--background));
  color: rgb(var(--foreground));
  font-size: 0.875rem;
}

/* Article Image Styles */
.article-image-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: rgb(var(--muted));
}

.article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-card:hover .article-image {
  transform: scale(1.05);
}

/* Buttons */
.search-result-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  background-color: rgb(var(--primary));
  color: rgb(var(--primary-foreground));
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.search-result-btn:hover {
  opacity: 0.9;
}

.search-result-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Border Short (for source tags) */
.border-short {
  display: inline-block;
  position: relative;
  padding: 4px 8px 6px;
  color: rgb(var(--foreground));
  background-color: rgb(var(--secondary));
  border-radius: var(--radius);
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid rgb(var(--border));
}

.footer-content {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: rgb(var(--muted-foreground));
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: rgb(var(--muted-foreground));
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: rgb(var(--foreground));
}

/* Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in {
  animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Responsive Design */
@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .search-header-content {
    padding: 0.75rem 1rem;
  }

  .search-logo-text {
    font-size: 1.25rem;
  }

  .search-nav {
    padding: 0 1rem 0.75rem;
  }

  .search-nav-links {
    padding-top: 10px;
  }

  .search-results-main {
    margin-top: 110px;
  }
}
