/* 
  MealTracker AI - Premium SEO Design System (Space OLED Dark Theme)
  Aligned with original app branding, colors (Orange primary), and macro visual presets.
*/

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

:root {
  /* Core Colors */
  --bg-color: #000000; /* True Black OLED Background */
  --bg-card: rgba(9, 9, 13, 0.65);
  --bg-card-hover: rgba(18, 18, 26, 0.8);
  --border-color: #20202C; /* Original Dark Border */
  --border-hover: rgba(249, 115, 22, 0.35); /* Stretched Orange Glow */
  
  /* Text Ratios */
  --text-primary: #F0F0F5; /* Dark Text Primary */
  --text-secondary: #A0A0B0; /* Dark Text Secondary */
  --text-muted: #686878; /* Dark Text Tertiary */
  
  /* Accent Colors */
  --accent-health: #F97316; /* Original App Primary (Orange) */
  --accent-health-glow: rgba(249, 115, 22, 0.25);
  --accent-ai: #8B5CF6; /* Original App Protein/AI Accent (Violet) */
  --accent-ai-glow: rgba(139, 92, 246, 0.25);
  
  /* Macro Specific Accents */
  --macro-carb: #06B6D4;
  --macro-fat: #F59E0B;
  --macro-fiber: #10B981;
  
  /* Gradients */
  --gradient-space: linear-gradient(135deg, #09090D 0%, #000000 100%); /* Original Dark Surface Gradient */
  --gradient-glow: linear-gradient(90deg, var(--accent-health) 0%, var(--accent-ai) 100%);
  
  /* Fonts */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Layout */
  --max-width: 1100px;
  --max-width-article: 800px;
}

/* Reset & Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  background-image: var(--gradient-space);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Glowing Elements */
.glow-container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  height: 100%;
  min-height: 1000px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
}

.glow-1 {
  top: -100px;
  left: 10%;
  width: 400px;
  height: 400px;
  background-color: var(--accent-health);
}

.glow-2 {
  top: 200px;
  right: 5%;
  width: 500px;
  height: 500px;
  background-color: var(--accent-ai);
}

.glow-3 {
  bottom: 20%;
  left: -100px;
  width: 450px;
  height: 450px;
  background-color: var(--accent-health);
}

/* Container & Header Navigation */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.logo img {
  height: 32px;
  width: 32px;
  object-fit: contain;
}

.logo span {
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.cta-button {
  background: var(--gradient-glow);
  color: var(--text-primary);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
  color: #fff;
}

/* Layout Core */
.main-wrapper {
  position: relative;
  z-index: 10;
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 2rem;
}

.article-wrapper {
  position: relative;
  z-index: 10;
  max-width: var(--max-width-article);
  margin: 3rem auto;
  padding: 0 1.5rem;
}

/* Typography elements */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--gradient-glow);
  border-radius: 2px;
}

h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

a.inline-link {
  color: var(--accent-health);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

a.inline-link:hover {
  color: var(--accent-ai);
  border-color: var(--accent-ai);
}

/* Glassmorphic Cards & Layout Panels */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 2rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Author Metadata Box */
.author-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 99px;
  border: 1px solid var(--border-color);
  width: fit-content;
  margin-bottom: 2.5rem;
  font-size: 0.9rem;
}

.author-meta img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-health);
}

.author-meta .author-name {
  color: var(--text-primary);
  font-weight: 600;
}

.author-meta .author-dot {
  width: 4px;
  height: 4px;
  background-color: var(--text-muted);
  border-radius: 50%;
}

.author-meta .author-team {
  color: var(--text-muted);
}

/* Disclaimer Block */
.legal-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  margin-top: 3rem;
  line-height: 1.6;
}

/* SGE Bullet Features (Key Takeaways) */
.takeaways-box {
  background: rgba(139, 92, 246, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-left: 4px solid var(--accent-ai);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
}

.takeaways-box h3 {
  margin-top: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.takeaways-box ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.75rem;
}

.takeaways-box li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.takeaways-box li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent-ai);
  font-weight: bold;
}

/* Styled Lists for Article Body */
.styled-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 2rem;
}

.styled-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.styled-list li strong {
  color: var(--text-primary);
}

.styled-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--accent-health);
  font-size: 1.1rem;
  font-weight: bold;
}

/* Precise Data Tables for SGE/Crawlers */
.seo-table-container {
  overflow-x: auto;
  margin: 2.5rem 0;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
}

.seo-table th, .seo-table td {
  padding: 1rem 1.25rem;
}

.seo-table th {
  background: rgba(9, 9, 13, 0.8);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  font-size: 0.95rem;
}

.seo-table td {
  border-bottom: 1px solid var(--border-color);
}

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

.seo-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

/* Pillar Page Specific Styles */
.hero-section {
  text-align: center;
  padding: 6rem 0 4rem 0;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.25);
  color: var(--accent-health);
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-section h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero-section p.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.app-badges {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.badge-link {
  height: 52px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.badge-link:hover {
  transform: translateY(-2px);
}

.badge-link img {
  height: 100%;
  object-fit: contain;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 4rem 0;
}

.feature-card {
  padding: 2.5rem 2rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.icon-health {
  background: rgba(249, 115, 22, 0.1);
  color: var(--accent-health);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.icon-ai {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-ai);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Footer Section */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 2rem;
  margin-top: 8rem;
  background: rgba(9, 9, 13, 0.95);
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.footer-nav {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: #12121A;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #20202C;
}

/* Responsive Rules */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  .hero-section h1 {
    font-size: 2.6rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  .main-wrapper {
    margin: 2rem auto;
    padding: 0 1rem;
  }
  
  .article-wrapper {
    margin: 2rem auto;
    padding: 0 1rem;
  }
  
  .app-badges {
    gap: 1rem;
  }
  
  .badge-link {
    height: 46px;
  }
}
