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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f0f4ff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a0;
  --accent: #4285F4;
  --accent-light: #8AB4F8;
  --accent-dark: #3367D6;
  --green: #34A853;
  --yellow: #FBBC04;
  --red: #EA4335;
  --border: #e8e8f0;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --card-hover-shadow: 0 8px 24px rgba(0,0,0,0.1);
  --nav-bg: rgba(255,255,255,0.9);
  --hero-gradient: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
  --code-bg: #f5f5f5;
  --quote-border: var(--accent);
  --highlight-bg: #fffde7;
}

[data-theme="dark"] {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0c0;
  --text-muted: #6a6a8a;
  --border: #2a2a40;
  --card-bg: #1a1a2e;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.2);
  --card-hover-shadow: 0 8px 24px rgba(0,0,0,0.3);
  --nav-bg: rgba(15,15,26,0.9);
  --hero-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --code-bg: #1a1a2e;
  --quote-border: var(--accent-light);
  --highlight-bg: #2a2a15;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1100px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  display: block;
}

.nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--accent);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
.sun-icon { display: none; }
.moon-icon { display: block; }

/* === Hero === */
.hero {
  padding: 140px 0 80px;
  background: var(--hero-gradient);
  text-align: center;
  transition: background 0.3s ease;
}

.hero-content {
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.hero-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 36px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.cta-button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66,133,244,0.3);
}

/* === Main Content === */
.main-content {
  padding: 48px 0 64px;
}

.content-section {
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.content-section h2 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  color: var(--text-primary);
  line-height: 1.3;
}

.content-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.content-section p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.content-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.note {
  font-size: 0.9375rem !important;
  color: var(--text-muted) !important;
  font-style: italic;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 3px solid var(--yellow);
}

/* === Pricing Table === */
.pricing-table-wrapper {
  overflow-x: auto;
  margin: 24px 0 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.pricing-table th {
  background: var(--bg-secondary);
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
}

.pricing-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

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

.highlight-row {
  background: var(--bg-tertiary);
}

.highlight-row td {
  color: var(--text-primary);
}

.price {
  font-weight: 700;
  color: var(--accent);
}

/* === Comparison List === */
.comparison-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
}

.comparison-list li {
  padding: 10px 16px;
  margin-bottom: 8px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 3px solid var(--red);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.badge-red {
  font-weight: 600;
  color: var(--red);
}

.strength-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
}

.strength-list li {
  padding: 10px 16px;
  margin-bottom: 8px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 3px solid var(--green);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* === Highlight Quote === */
.highlight-quote {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border-left: 4px solid var(--quote-border);
}

.highlight-quote p {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
  font-style: italic;
}

/* === Model Comparison Cards === */
.model-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.model-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  transition: all 0.2s;
  position: relative;
}

.model-card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-2px);
}

.model-card.highlight {
  border-color: var(--accent);
  background: var(--bg-tertiary);
}

.model-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.model-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--yellow);
  color: #1a1a2e;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.model-card ul {
  list-style: none;
  padding: 0;
}

.model-card li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 4px 0;
  position: relative;
  padding-left: 16px;
}

.model-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.5;
}

/* === I/O Cards === */
.io-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.io-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  transition: all 0.2s;
}

.io-card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-2px);
}

.io-card h3 {
  font-size: 0.9375rem;
  margin-bottom: 8px;
}

.io-card p {
  font-size: 0.875rem !important;
  margin-bottom: 0 !important;
}

/* === FAQ === */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: all 0.2s;
}

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

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--bg-tertiary);
}

.faq-question svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
}

.faq-answer.open {
  max-height: 300px;
  padding: 16px 20px;
}

.faq-answer p {
  font-size: 0.9375rem !important;
  margin-bottom: 0 !important;
}

/* === Share Section === */
.share-section {
  text-align: center;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.share-section p {
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.share-btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.share-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* === References === */
.reference-list {
  list-style: none;
  padding: 0;
}

.reference-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.reference-list li:last-child {
  border-bottom: none;
}

.reference-list a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.reference-list a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* === Recommended Blogs === */
.recommended-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.recommended-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  transition: all 0.2s;
}

.recommended-card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-2px);
}

.rec-category {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.recommended-card h3 {
  font-size: 0.9375rem;
  margin-bottom: 8px;
}

.recommended-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.recommended-card h3 a:hover {
  color: var(--accent);
}

.recommended-card p {
  font-size: 0.8125rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 0 !important;
}

/* === Footer === */
.footer {
  background: var(--bg-secondary);
  padding: 40px 0;
  border-top: 1px solid var(--border);
  transition: background-color 0.3s ease;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left img {
  display: block;
  margin-bottom: 8px;
}

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

.footer-right p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* === Responsive === */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .nav {
    gap: 16px;
  }

  .nav a {
    font-size: 0.75rem;
  }

  .content-section h2 {
    font-size: 1.375rem;
  }

  .content-section p {
    font-size: 0.9375rem;
  }

  .model-comparison {
    grid-template-columns: 1fr 1fr;
  }

  .io-cards {
    grid-template-columns: 1fr;
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-left img {
    margin: 0 auto 8px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .model-comparison {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 10px;
  }

  .header-inner {
    gap: 8px;
  }
}
