/* PromptStack — Global Styles */
/* Design: Dark developer theme, navy + electric blue */

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a2035;
  --bg-card-hover: #1e2642;
  --bg-code: #0d1117;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #1e293b;
  --border-accent: #3b82f630;
  --success: #22c55e;
  --warning: #f59e0b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.nav-logo span {
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section {
  padding: 5rem 0;
}
.section-sm {
  padding: 3rem 0;
}

/* ===== HERO ===== */
.hero {
  padding: 10rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  position: relative;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.25s;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 700;
}
.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.card-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 500;
  font-family: var(--font-mono);
}
.tag-layer {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}
.tag-free {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* ===== CODE BLOCKS ===== */
.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 1.5rem 0;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.code-block pre {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}
.code-block code {
  font-family: var(--font-mono);
}

/* ===== BLURRED PREVIEW ===== */
.blurred-preview {
  position: relative;
  max-height: 200px;
  overflow: hidden;
}
.blurred-preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(transparent, var(--bg-card));
  pointer-events: none;
}
.blurred-cta {
  text-align: center;
  padding: 1rem 0 0;
}

/* ===== PRICING ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  align-items: start;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.25s;
  position: relative;
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.1);
}
.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.3rem 1rem;
  border-radius: 20px;
}
.pricing-card:hover {
  transform: translateY(-4px);
}
.pricing-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}
.pricing-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}
.pricing-features li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.pricing-features li::before {
  content: '\2713';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.feature-item {
  padding: 1.5rem;
}
.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.feature-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* ===== CATEGORY SECTIONS ===== */
.category-section {
  margin-bottom: 3rem;
}
.category-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ===== GUIDE ===== */
.guide-content {
  max-width: 800px;
  margin: 0 auto;
}
.guide-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 3rem 0 1rem;
}
.guide-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}
.guide-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.guide-content ul, .guide-content ol {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.guide-content li {
  margin-bottom: 0.5rem;
}
.guide-content .tip {
  background: var(--accent-glow);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}
.guide-content .tip p {
  color: var(--text-primary);
  margin: 0;
}

/* ===== STATS BAR ===== */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  padding: 2rem 0;
}
.stat-item {
  text-align: center;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer a {
  color: var(--text-secondary);
}
.footer a:hover {
  color: var(--accent);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  list-style: none;
}

/* ===== TABLE ===== */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  color: var(--text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    gap: 1rem;
  }
  .hero { padding: 8rem 0 4rem; }
  .card-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 2rem; }
  .hero-cta { flex-direction: column; align-items: center; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* highlight.js overrides */
.hljs {
  background: transparent !important;
  padding: 0 !important;
}
