/* Best Magnesium Glycinate - Dark Theme Review Site */
:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --text-primary: #e8e8e8;
  --text-secondary: #b8b8b8;
  --accent: #4ecdc4;
  --accent-hover: #45b7aa;
  --orange: #ff6b35;
  --star: #ffc107;
  --border: #2a2a4a;
  --shadow: rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-hover); }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  backdrop-filter: blur(10px);
}

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

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.nav { display: flex; gap: 1.5rem; list-style: none; }
.nav a { color: var(--text-primary); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--accent); }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 800px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 50%, #16213e 100%);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(78,205,196,0.1) 0%, transparent 50%);
}

.hero h1 {
  color: #ffffff;
  font-size: 2.8rem;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
  position: relative;
}

.hero p {
  color: #ffffff;
  font-size: 1.2rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  opacity: 0.9;
}

.hero .updated {
  color: #ffffff;
  opacity: 0.7;
  font-size: 0.9rem;
  margin-top: 1rem;
  position: relative;
}

/* Product Cards */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.product-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--shadow);
}

.product-rank {
  position: absolute;
  top: -10px;
  left: -10px;
  background: var(--accent);
  color: var(--bg-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.product-image {
  width: 100%;
  height: 200px;
  background: var(--bg-secondary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.product-rating {
  color: var(--star);
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pros h4, .cons h4 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pros h4 { color: #4ecdc4; }
.cons h4 { color: #ff6b6b; }

.pros ul, .cons ul {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pros li::before { content: '✓ '; color: #4ecdc4; }
.cons li::before { content: '✗ '; color: #ff6b6b; }

.btn-amazon {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.3s, transform 0.2s;
  text-align: center;
}

.btn-amazon:hover {
  background: #e55a2b;
  color: #fff;
  transform: scale(1.02);
}

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-secondary); }

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.section h3 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: var(--accent);
}

.section p, .section li {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.section ul, .section ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.faq-item h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.faq-item p {
  color: var(--text-secondary);
  margin: 0;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

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

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

.affiliate-disclosure {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin: 2rem auto;
  max-width: 700px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Table of Contents */
.toc {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.toc h3 { margin-bottom: 1rem; color: var(--text-primary); font-size: 1.1rem; }
.toc ol { padding-left: 1.5rem; }
.toc li { margin-bottom: 0.5rem; }
.toc a { color: var(--accent); }

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
}

.comparison-table th, .comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background: var(--bg-secondary);
  color: var(--accent);
  font-weight: 600;
}

.comparison-table td { color: var(--text-secondary); }

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group { margin-bottom: 1.5rem; }

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
}

.form-group textarea { min-height: 150px; resize: vertical; }

.btn-submit {
  background: var(--accent);
  color: var(--bg-primary);
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover { background: var(--accent-hover); }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  
  .product-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .pros-cons { grid-template-columns: 1fr; }
  
  .nav { display: none; }
  .nav.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  
  .mobile-toggle { display: block; }
  
  .comparison-table { font-size: 0.85rem; }
  .comparison-table th, .comparison-table td { padding: 0.6rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .container { padding: 0 1rem; }
  .product-card { padding: 1.5rem; }
}
