:root {
  --bg-primary: #080d1a;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --prism-cyan: #00f2fe;
  --prism-blue: #4facfe;
  --prism-purple: #9d4edd;
  --prism-emerald: #10b981;
  --prism-coral: #f16061;
  --accent-glow: rgba(0, 242, 254, 0.25);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, "Fira Code", monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Ambient Glows */
body::before {
  content: '';
  position: fixed;
  top: -10vw;
  left: 20vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(79, 172, 254, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -15vw;
  right: 10vw;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(157, 78, 221, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header & Nav */
header {
  border-bottom: 1px solid var(--bg-card-border);
  backdrop-filter: blur(12px);
  background: rgba(8, 13, 26, 0.85);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--text-main);
}

.logo-prism {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--prism-cyan), var(--prism-purple));
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

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

.nav-links > li {
  position: relative;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  color: var(--prism-cyan);
  background: rgba(255, 255, 255, 0.05);
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.active .nav-dropdown-toggle {
  color: var(--prism-cyan);
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: rgba(9, 14, 28, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
  list-style: none;
  margin-top: 4px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
  background: rgba(0, 242, 254, 0.08);
}

.dropdown-icon {
  font-size: 1.25rem;
  line-height: 1.2;
}

.dropdown-text h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
  transition: color 0.15s ease;
}

.dropdown-text p {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.nav-dropdown-item:hover .dropdown-text h4 {
  color: var(--prism-cyan);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #030712;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-kofi {
  background: #f16061;
  color: #ffffff;
}

.btn-kofi:hover {
  background: #e04b4c;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(241, 96, 97, 0.4);
}

/* Hero Section */
.hero {
  padding: 80px 0 50px;
  text-align: center;
}

.badge-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge-pill span.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.badge-pill.highlight {
  border-color: rgba(0, 242, 254, 0.35);
  color: var(--prism-cyan);
  background: rgba(0, 242, 254, 0.08);
}

.hero h1 {
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 span.gradient {
  background: linear-gradient(135deg, var(--prism-cyan), var(--prism-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  max-width: 820px;
  margin: 0 auto 36px;
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 45px;
}

/* Showcase Grid */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 30px;
}

.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.preview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.3);
}

.preview-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--bg-card-border);
}

.preview-info {
  padding: 20px 24px;
  text-align: left;
}

.preview-info h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.preview-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Architecture Cards */
.section {
  padding: 75px 0;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 45px;
}

.section-header h2 {
  font-size: 2.3rem;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 28px;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.pillar-card:hover {
  border-color: var(--prism-cyan);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.08);
}

.pillar-card.featured {
  border-color: rgba(0, 242, 254, 0.4);
  background: linear-gradient(180deg, rgba(0, 242, 254, 0.06) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.pillar-card .pillar-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(0, 242, 254, 0.15);
  color: var(--prism-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.pillar-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.pillar-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ==========================================================================
   CRASH SCREEN INTERACTIVE PLAYGROUND (BSOD THEME SELECTOR)
   ========================================================================== */

.bsod-playground {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 18px;
  padding: 32px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 1060px;
  margin: 0 auto;
}

.bsod-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--bg-card-border);
  margin-bottom: 24px;
}

.theme-selector-group, .stopcode-selector-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.control-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.theme-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.theme-pill-btn.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}

.theme-pill-btn .color-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.swatch-midnight {
  background: #0b101b;
  border: 2px solid #38bdf8;
}

.swatch-emerald {
  background: #03251e;
  border: 2px solid #34d399;
}

.swatch-royal {
  background: #0a192f;
  border: 2px solid #60a5fa;
}

.stopcode-dropdown {
  background: #090e1c;
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  outline: none;
  cursor: pointer;
}

.stopcode-dropdown:focus {
  border-color: var(--prism-cyan);
}

/* Simulated Monitor / Framebuffer Window */
.monitor-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-mono);
  position: relative;
}

/* Theme Skins for Monitor Frame */
.monitor-frame.theme-midnight {
  background-color: #0b101b;
  border: 1px solid #1e293b;
  color: #94a3b8;
}
.monitor-frame.theme-midnight .bsod-accent { color: #38bdf8; }
.monitor-frame.theme-midnight .bsod-bar-fill { background: #38bdf8; box-shadow: 0 0 10px rgba(56, 189, 248, 0.5); }
.monitor-frame.theme-midnight .bsod-border-accent { border-color: rgba(56, 189, 248, 0.3); }

.monitor-frame.theme-emerald {
  background-color: #03251e;
  border: 1px solid #065f46;
  color: #a7f3d0;
}
.monitor-frame.theme-emerald .bsod-accent { color: #34d399; }
.monitor-frame.theme-emerald .bsod-bar-fill { background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.5); }
.monitor-frame.theme-emerald .bsod-border-accent { border-color: rgba(52, 211, 153, 0.3); }

.monitor-frame.theme-royal {
  background-color: #0a192f;
  border: 1px solid #1e3a8a;
  color: #bfdbfe;
}
.monitor-frame.theme-royal .bsod-accent { color: #60a5fa; }
.monitor-frame.theme-royal .bsod-bar-fill { background: #60a5fa; box-shadow: 0 0 10px rgba(96, 165, 250, 0.5); }
.monitor-frame.theme-royal .bsod-border-accent { border-color: rgba(96, 165, 250, 0.3); }

.monitor-content {
  padding: 36px 40px;
}

.bsod-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.bsod-logo-mark {
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 1rem;
}

.bsod-theme-tag {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid currentColor;
}

.bsod-headline {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 14px;
  color: #ffffff;
}

.bsod-subtext {
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 820px;
  margin-bottom: 24px;
}

.bsod-progress-box {
  margin-bottom: 28px;
}

.bsod-progress-label {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bsod-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.bsod-bar-fill {
  width: 100%;
  height: 100%;
  transition: width 0.3s ease;
}

.bsod-body-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  align-items: start;
}

.bsod-qr-wrap {
  text-align: center;
}

.bsod-qr-wrap svg {
  background: #ffffff;
  padding: 8px;
  border-radius: 8px;
  width: 120px;
  height: 120px;
  display: block;
  margin: 0 auto 10px;
}

.bsod-qr-caption {
  font-size: 0.72rem;
  line-height: 1.3;
}

.bsod-details-pane {
  font-size: 0.88rem;
  line-height: 1.7;
}

.bsod-field-row {
  margin-bottom: 4px;
}

.bsod-label {
  font-weight: 700;
  display: inline-block;
  min-width: 140px;
}

.bsod-reg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 16px;
  border-radius: 6px;
  margin: 14px 0;
  font-size: 0.8rem;
}

.bsod-callstack {
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.5;
}

.bsod-footer-info {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
}

.bsod-reg-note {
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--bg-card-border);
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Terminal Window */
.terminal-window {
  background: #050811;
  border: 1px solid #1e293b;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  max-width: 960px;
  margin: 0 auto;
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-header {
  background: #0f172a;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.terminal-body {
  padding: 24px;
  color: #38bdf8;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  text-align: left;
}

.terminal-body .cmd { color: #f8fafc; font-weight: 700; }
.terminal-body .out { color: #94a3b8; }
.terminal-body .green { color: #34d399; }
.terminal-body .cyan { color: #22d3ee; }

/* Tribute Quote */
.quote-box {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.05), rgba(157, 78, 221, 0.05));
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin: 60px 0;
}

.quote-box blockquote {
  font-size: 1.35rem;
  font-style: italic;
  color: var(--text-main);
  margin-bottom: 16px;
  line-height: 1.6;
}

.quote-author {
  color: var(--prism-cyan);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Stop Code Diagnostic Search Component */
.stopcode-search-box {
  max-width: 600px;
  margin: 0 auto 36px;
  position: relative;
}

.stopcode-input {
  width: 100%;
  padding: 16px 20px;
  border-radius: 10px;
  background: #090e1c;
  border: 1px solid var(--bg-card-border);
  color: #ffffff;
  font-size: 1.05rem;
  font-family: var(--font-mono);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.stopcode-input:focus {
  border-color: var(--prism-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
}

.diag-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 24px;
  transition: all 0.25s ease;
}

.diag-card:hover {
  border-color: var(--prism-cyan);
}

.diag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.diag-code-pill {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--prism-cyan);
  background: rgba(0, 242, 254, 0.1);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.diag-param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}

.diag-param-table th, .diag-param-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--bg-card-border);
}

.diag-param-table th {
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.diag-param-table td:first-child {
  font-family: var(--font-mono);
  color: var(--prism-cyan);
  font-weight: 600;
  width: 140px;
}

/* Footer */
footer {
  border-top: 1px solid var(--bg-card-border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--prism-cyan);
}

@media (max-width: 820px) {
  .hero h1 { font-size: 2.6rem; }
  .preview-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .bsod-body-grid { grid-template-columns: 1fr; }
  .bsod-qr-wrap { display: none; }
}
