/* ==========================================================================
   YouTube Thumbnail Downloader CSS
   Design: Dark, Sleek, Minimalistic (Linear/Vercel/Stripe Inspired)
   ========================================================================== */

/* Google Fonts Import - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Custom Variables */
:root {
  /* Colors */
  --bg-primary: #0F172A;
  --bg-secondary: #0B0F19;
  --bg-card: #1E293B;
  --bg-card-hover: #24354F;
  --border: #334155;
  --border-hover: #475569;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --accent: #3B82F6;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  
  /* Fonts */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Layout & Spacing */
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px 0 rgba(37, 99, 235, 0.15);
  
  /* Header Height */
  --header-height: 72px;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button, input {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  outline: none;
}

input {
  width: 100%;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Skip to Content Link (A11y) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--text-primary);
  padding: 8px 16px;
  z-index: 1000;
  transition: top 0.2s ease;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus {
  top: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header & Sticky Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.logo-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  fill: currentColor;
  width: 28px;
  height: 28px;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link:hover, 
.nav-link.active {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(248, 250, 252, 0.2);
}

/* Hamburger Menu Mobile */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 40px;
  font-weight: 400;
  line-height: 1.6;
}

/* Downloader Form */
.downloader-form {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.input-group {
  display: flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 8px 8px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  align-items: center;
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.input-icon {
  color: var(--text-muted);
  margin-right: 16px;
  display: flex;
  align-items: center;
}

.input-icon svg {
  width: 20px;
  height: 20px;
}

.input-field {
  color: var(--text-primary);
  font-size: 1.05rem;
  padding: 12px 0;
  background: transparent;
}

.input-field::placeholder {
  color: var(--text-muted);
}

.btn-download {
  background-color: var(--primary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-download:hover {
  background-color: var(--primary-hover);
  box-shadow: 0px 4px 12px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-download:active {
  transform: translateY(0);
}

/* Google AdSense Placeholders */
.adsense-placeholder {
  max-width: 728px;
  height: 90px;
  margin: 40px auto;
  background-color: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow: hidden;
}

/* Results Section */
.results-section {
  padding: 60px 0;
  display: none; /* Controlled by JS */
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 40px;
  text-align: center;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

/* Thumbnail Cards */
.thumbnail-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.thumbnail-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.card-preview-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-secondary);
  overflow: hidden;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.card-preview-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  opacity: 0;
  transition: var(--transition);
  z-index: 1;
}

.card-preview-wrapper::after {
  content: 'Click to Preview';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background-color: rgba(15, 23, 42, 0.85);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
  border: 1px solid var(--border);
}

.card-preview-wrapper:hover::before,
.card-preview-wrapper:hover::after {
  opacity: 1;
}

.card-preview-wrapper:hover::after {
  transform: translate(-50%, -50%) scale(1);
}

.card-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-preview-wrapper:hover .card-preview-img {
  transform: scale(1.05);
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}

.card-quality-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-resolution {
  font-size: 0.85rem;
  color: var(--accent);
  background-color: rgba(59, 130, 246, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: auto;
}

.btn-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  width: 100%;
}

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

.btn-card-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0px 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-card-secondary {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-card-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-card-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* How to Use Section */
.steps-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  background-color: var(--bg-secondary);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.step-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  border-color: var(--accent);
}

.step-number {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(37, 99, 235, 0.15);
  position: absolute;
  top: 16px;
  right: 24px;
  line-height: 1;
}

.step-icon {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.step-icon svg {
  width: 24px;
  height: 24px;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Resolutions Breakdown Section */
.resolutions-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.resolutions-table-wrapper {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--bg-card);
}

.res-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.res-table th, .res-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.res-table th {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.res-table tr:last-child td {
  border-bottom: none;
}

.res-name {
  font-weight: 500;
  color: var(--text-primary);
}

.res-val {
  color: var(--accent);
  font-weight: 600;
}

.res-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* SEO Content Section */
.seo-content-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  background-color: var(--bg-secondary);
}

.seo-content {
  max-width: 800px;
  margin: 0 auto;
}

.seo-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.seo-content p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.7;
}

/* FAQ Accordion Section */
.faq-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.faq-wrapper {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-question-btn {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  gap: 16px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.05rem;
}

.faq-question-text {
  flex-grow: 1;
}

.faq-icon-wrapper {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.faq-icon-wrapper svg {
  width: 20px;
  height: 20px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer-content {
  padding: 0 24px 20px 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* FAQ Active Styles */
.faq-item.active {
  border-color: var(--accent);
}

.faq-item.active .faq-icon-wrapper {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-item.active .faq-answer {
  max-height: 300px; /* Adjust according to contents length */
}

/* About Section */
.about-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  background-color: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
}

.feature-box:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.feature-icon {
  color: var(--accent);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Related Tools Section */
.related-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.related-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.related-card-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.related-card-icon svg {
  width: 24px;
  height: 24px;
}

.related-card:hover .related-card-icon {
  color: var(--accent);
}

.related-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.related-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}

.related-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.related-card-link svg {
  width: 14px;
  height: 14px;
  transition: var(--transition);
}

.related-card:hover .related-card-link svg {
  transform: translateX(3px);
}

/* Footer Section */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--bg-secondary);
  padding: 60px 0 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-link {
  color: var(--text-muted);
  background-color: var(--bg-card);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.social-link:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.footer-column h4 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Modal for Image Preview */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close-btn {
  color: var(--text-secondary);
  background-color: transparent;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
}

.modal-img-wrapper {
  position: relative;
  width: 100%;
  max-height: 60vh;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 420px;
  transform: translateY(100px) scale(0.9);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
}

.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon svg {
  width: 20px;
  height: 20px;
}

.toast-success {
  border-left: 4px solid var(--success);
}
.toast-success .toast-icon {
  color: var(--success);
}

.toast-error {
  border-left: 4px solid var(--error);
}
.toast-error .toast-icon {
  color: var(--error);
}

.toast-info {
  border-left: 4px solid var(--accent);
}
.toast-info .toast-icon {
  color: var(--accent);
}

.toast-content {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Custom Loader Styles */
.spinner-container {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(59, 130, 246, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Responsive Grid & Media Queries
   Testing targets: 320px, 375px, 768px, 1024px, 1440px
   ========================================================================== */

/* 1440px and up (Large desktops) */
@media (min-width: 1440px) {
  :root {
    --max-width: 1320px;
  }
  .hero-title {
    font-size: 4rem;
  }
}

/* 1024px to 1439px (Desktops/Laptops) */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 3.25rem;
  }
}

/* 768px to 1023px (Tablets) */
@media (max-width: 1023px) {
  .hero-title {
    font-size: 2.75rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* 767px and below (Mobile / Small Tablets) */
@media (max-width: 767px) {
  :root {
    --header-height: 64px;
  }

  body {
    font-size: 15px;
  }

  .site-header {
    background-color: var(--bg-primary); /* Remove transparent blur, keep it solid */
  }

  /* Navigation Drawer for Mobile */
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    transform: translateX(100%);
    transition: var(--transition);
    z-index: 99;
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 24px;
    width: 100%;
  }

  .nav-link {
    font-size: 1.15rem;
    display: block;
    width: 100%;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }

  /* Hero Section Mobile */
  .hero-section {
    padding: 48px 0;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  /* Form Stack on Mobile */
  .input-group {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    border-radius: var(--radius-md);
  }

  .input-icon {
    display: none; /* Hide icon to save vertical space if needed */
  }

  .input-field {
    text-align: center;
    padding: 8px 0;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
    padding: 16px;
  }

  /* Layout changes */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .btn-card-group {
    grid-template-columns: 1fr;
  }
}

/* 375px and 320px (Compact Mobile screens) */
@media (max-width: 375px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .card-quality-title {
    font-size: 1rem;
  }
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .toast {
    min-width: calc(100vw - 32px);
    right: 16px;
    left: 16px;
  }
}

/* Hamburger transition helper */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -7px);
}
