@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --background: #212737;
  --background-deep: #1a2030;
  --foreground: #eaedf3;
  --accent: #ff6b01;
  --muted: #343f60bf;
  --border: rgba(171, 75, 8, 0.4);
  --icon-size: 18px;
  --icon-color: #ff6b01;
  --card-radius: 8px;
  --content-width: 1200px;
  --base-font-size: 16px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] {
  --background: #fdfdfd;
  --background-deep: #f1f1f1;
  --foreground: #282728;
  --accent: #006cac;
  --muted: #e6e6e6;
  --border: #ece9e9;
  --icon-color: #006cac;
}

* { box-sizing: border-box; }
html { font-size: var(--base-font-size); }
body {
  margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;  background: linear-gradient(135deg, var(--background-deep), var(--background));
  color: var(--foreground);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.site-shell { max-width: var(--content-width); margin: 0 auto; padding: 24px 16px 48px; }
.glass-card {
  background: rgba(33, 39, 55, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--accent);
}
.glass-card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 6px; height: 6px;
  background: var(--accent);
  opacity: 0.5;
}

.site-header {
  position: sticky; top: 12px; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; margin-bottom: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--foreground); }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; background: linear-gradient(135deg, var(--accent), #ab4b08); color: #fff; border-radius: 8px; font-weight: 700; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 0.95rem; }
.brand-text small { color: var(--muted); font-size: 0.72rem; }
.nav-list { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; }
.nav-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; color: var(--foreground); border-radius: 6px; }
.nav-link:hover, .nav-link:focus-visible { background: rgba(255,107,1,0.1); color: var(--accent); }
.mobile-menu-toggle { display: none; }

.page-section { padding: 24px 0; }
.hero-section { display: grid; gap: 24px; align-items: center; }
.hero-copy h1 { font-size: 2.3rem; line-height: 1.1; margin: 0 0 16px; color: var(--foreground); }
.hero-copy p, .section-heading p, .card-body p, .feature-card p { color: var(--muted); margin: 0 0 16px; }
.hero-actions, .btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary, .btn-ghost, .btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 6px; padding: 10px 16px; font-weight: 600; transition: all 0.3s ease; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 15px rgba(255,107,1,0.3); }
.btn-primary:hover, .btn-ghost:hover, .btn-icon:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-icon { background: transparent; border-color: var(--border); padding: 8px; }
.hero-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-card { min-height: 120px; padding: 16px; }
.hero-card-a { grid-column: 1 / 2; grid-row: 1 / 3; min-height: 220px; }
.hero-card-b { min-height: 140px; }
.hero-card-c { min-height: 140px; }

.section-heading { margin-bottom: 16px; }
.section-heading h1, .section-heading h2 { margin: 0 0 8px; font-size: 1.8rem; }
.category-bar { display: flex; gap: 10px; flex-wrap: wrap; overflow-x: auto; padding-bottom: 6px; }
.cat-pill, .cat-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--foreground); background: rgba(255,255,255,0.04); }
.cat-pill.active { background: rgba(255,107,1,0.2); border-color: var(--accent); color: var(--accent); }

.prompt-grid, .post-grid, .frame-grid, .feature-grid { display: grid; gap: 16px; }
.prompt-card, .post-card, .frame-card, .feature-card, .prompt-box, .post-content-card, .frame-detail { padding: 16px; }
.card-media { width: 100%; height: 180px; object-fit: cover; border-radius: 6px; margin-bottom: 12px; }
.card-body { display: flex; flex-direction: column; gap: 10px; }
.prompt-box pre { background: rgba(0,0,0,0.2); padding: 16px; border-radius: 8px; font-family: 'JetBrains Mono', monospace; white-space: pre-wrap; }
.single-hero-image { width: 100%; height: auto; border-radius: 10px; margin-bottom: 20px; }
.error-illustration { display: grid; grid-template-columns: repeat(4, 16px); gap: 8px; margin-bottom: 16px; }
.error-illustration span { width: 16px; height: 16px; background: var(--accent); }
.site-footer { margin-top: 24px; padding: 16px 18px; }
.footer-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; }
.footer-nav a { color: var(--foreground); }

.divider-pixel, .divider-gradient, .divider-cluster { width: 100%; margin: 32px 0; }
.divider-pixel { height: 1px; border-top: 2px dashed rgba(255,107,1,0.25); position: relative; }
.divider-pixel::before { content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 8px; height: 8px; background: var(--accent); }
.divider-gradient { height: 2px; background: linear-gradient(90deg, transparent 0%, var(--accent) 40%, var(--accent) 60%, transparent 100%); opacity: 0.4; }
.divider-cluster { display: flex; align-items: center; justify-content: center; gap: 8px; }
.px-dot { width: 6px; height: 6px; background: var(--accent); opacity: 0.5; }
.px-dot.large { width: 10px; height: 10px; opacity: 0.8; }
.px-line { width: 80px; height: 1px; background: var(--border); }

.pixel-icon { display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--foreground); opacity: 0.75; transition: color 0.25s ease; image-rendering: pixelated; }
.pixel-icon.active, .nav-link:hover .pixel-icon, .btn-primary:hover .pixel-icon, .btn-ghost:hover .pixel-icon, .btn-icon:hover .pixel-icon { color: var(--accent); opacity: 1; }

.pixel-icon.pixel-loader { animation: spin 3s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes floatUp { from { transform: translateY(100vh); opacity: 0; } to { transform: translateY(-10vh); opacity: 1; } }

.pixel-particle { position: fixed; pointer-events: none; width: 6px; height: 6px; background: rgba(255,107,1,0.1); animation: floatUp 8s linear infinite; z-index: -1; }

@media (min-width: 700px) {
  .hero-section { grid-template-columns: 1.2fr 0.8fr; }
  .prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .frame-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .prompt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .frame-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .site-header { flex-wrap: wrap; }
  .mobile-menu-toggle { display: inline-flex; }
  .site-nav { display: none; width: 100%; margin-top: 14px; }
  .site-nav.menu-open { display: block; }
  .nav-list { flex-direction: column; }
  .nav-link { width: 100%; }
  .theme-toggle { margin-left: auto; }
  .hero-visual { grid-template-columns: 1fr; }
}
