/* =======================================================================
   CodeWarrior4Life — Portfolio Site
   Dark-mode, minimal, fast. Shared across all pages.
   ======================================================================= */

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

:root {
  --bg:         #0f0f23;
  --bg-card:    #16213e;
  --bg-hover:   #1a2744;
  --border:     #2a2a4a;
  --text:       #f5f5f7;
  --text-muted: #86868b;
  --text-dim:   #636366;
  --accent:     #4ecca3;
  --accent-dim: rgba(78, 204, 163, 0.15);
  --warn:       #f0a500;
  --danger:     #e74c3c;
  --max-w:      960px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* --- Layout --- */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Nav --- */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

.nav-brand:hover { text-decoration: none; }

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* --- Hero --- */

.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.hero .tagline {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* --- Extension Cards (main page) --- */

.extensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 40px 0 60px;
}

.ext-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  transition: transform 0.2s, border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}

.ext-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(78, 204, 163, 0.1);
  text-decoration: none;
}

.ext-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.ext-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}

.ext-card-title {
  font-size: 18px;
  font-weight: 700;
}

.ext-card-tagline {
  font-size: 14px;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 16px;
}

.ext-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}

.ext-card-cta::after {
  content: '\2192';
  transition: transform 0.2s;
}

.ext-card:hover .ext-card-cta::after {
  transform: translateX(4px);
}

/* --- Extension Detail Page --- */

.ext-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.ext-hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.ext-hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
}

.ext-hero .tagline {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 28px;
}

/* Install buttons */
.install-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.3s;
  text-decoration: none;
}

.btn-install:hover {
  transform: scale(1.03);
  text-decoration: none;
}

.btn-install-chrome,
.btn-install-firefox,
.btn-install-edge {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-install-chrome:hover,
.btn-install-firefox:hover,
.btn-install-edge:hover {
  border-color: var(--accent);
}

/* Applied by JS based on detected browser */
.btn-install-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
  order: -1; /* Move to front */
}

.btn-install-primary:hover {
  border-color: var(--accent);
}

/* Features */
.features-section {
  padding: 40px 0;
}

.features-section h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* How it works */
.how-section {
  padding: 40px 0;
  text-align: center;
}

.how-section h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.how-step {
  text-align: center;
}

.how-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.how-step h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.how-step p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Pro section */
.pro-section {
  padding: 40px 0;
  text-align: center;
}

.pro-box {
  background: linear-gradient(135deg, rgba(78, 204, 163, 0.08), rgba(78, 204, 163, 0.02));
  border: 1px solid rgba(78, 204, 163, 0.25);
  border-radius: 16px;
  padding: 36px 28px;
  max-width: 560px;
  margin: 0 auto;
}

.pro-box h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.pro-box p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.pro-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.pro-price-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.btn-pro {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 14px 36px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.15s;
}

.btn-pro:hover {
  transform: scale(1.03);
  text-decoration: none;
}

/* --- Support / BMAC Section --- */

.support-section {
  text-align: center;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.support-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.support-section p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-bmac {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffdd00;
  color: #0f0f23;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.15s;
}

.btn-bmac:hover {
  transform: scale(1.03);
  text-decoration: none;
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  list-style: none;
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}

/* --- Responsive --- */

@media (max-width: 640px) {
  .hero { padding: 48px 0 36px; }
  .hero h1 { font-size: 28px; }
  .hero .tagline { font-size: 15px; }

  .ext-hero h1 { font-size: 28px; }

  .nav-links { gap: 16px; }

  .features-grid,
  .how-steps {
    grid-template-columns: 1fr;
  }

  .install-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-install { width: 100%; max-width: 280px; justify-content: center; }
}
