/* ============================================================
   nielcansino.com/prompts — hosted prompt library
   Black + electric blue, data-dense prompt cards.
   ============================================================ */

:root {
  --bg:            #000000;
  --bg-soft:       #0a0a0a;
  --bg-card:       #0c0c0c;
  --bg-hover:      #141414;
  --divider:       #1a1a1a;
  --divider-lit:   #262626;

  --accent:        #2D9CFF;
  --accent-hot:    #5cb6ff;
  --accent-dim:    #2D9CFF88;
  --accent-glow:   #2D9CFF22;

  --text:          #ffffff;
  --text-mid:      #9a9a9a;
  --text-muted:    #555555;
  --text-ghost:    #2a2a2a;
  --ok:            #7bd88f;

  --font-heading:  'Inter', -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-body:     'Inter', -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:     'JetBrains Mono', 'Courier New', 'Consolas', monospace;

  --pad-page:      clamp(20px, 6vw, 96px);
  --pad-section:   clamp(56px, 8vw, 120px);
  --accent-bar:    6px;

  --ease-out:      cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out:   cubic-bezier(0.6, 0, 0.2, 1);
}

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

html { background: var(--bg); scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 900px 520px at 15% 8%, var(--accent-glow) 0%, transparent 60%);
  z-index: 0;
}

main, header, footer, section { position: relative; z-index: 2; }

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px var(--pad-page);
  border-bottom: 1px solid var(--divider);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.status-strip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2.4s var(--ease-in-out) infinite;
}

.status-strip .status-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.status-strip .back {
  color: var(--text-muted);
  display: inline-flex;
  gap: 6px;
  transition: color 160ms var(--ease-out);
}
.status-strip .back:hover { color: var(--text); }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
  50%      { opacity: 0.5; box-shadow: 0 0 16px var(--accent); }
}

.page-hero {
  padding: clamp(56px, 8vw, 96px) var(--pad-page) clamp(36px, 5vw, 56px);
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: clamp(56px, 8vw, 96px);
  left: 0;
  width: var(--accent-bar);
  height: clamp(80px, 12vw, 140px);
  background: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  animation: bar-rise 800ms var(--ease-out) both;
}

@keyframes bar-rise {
  from { height: 0; opacity: 0; }
  to   { height: clamp(80px, 12vw, 140px); opacity: 1; }
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.kicker::before { content: '→'; }

.page-h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(40px, 7vw, 96px);
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin-bottom: 14px;
}
.page-h1 .hit { color: var(--accent); }

.page-sub {
  max-width: 780px;
  color: var(--text-mid);
  font-size: clamp(15px, 1.2vw, 18px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--divider-lit);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out), transform 200ms var(--ease-out), background 200ms var(--ease-out);
}
.btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: #000;
}

.section {
  padding: var(--pad-section) var(--pad-page);
  border-top: 1px solid var(--divider);
  position: relative;
}
.section.compact { padding-bottom: clamp(72px, 9vw, 140px); }

.section-tag {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: clamp(28px, 4vw, 56px);
}
.section-tag .num { color: var(--accent); font-weight: 500; }
.section-tag .line {
  flex: 1;
  max-width: 360px;
  height: 1px;
  background: linear-gradient(to right, var(--divider-lit), transparent);
}

.section-h2 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(30px, 4vw, 58px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: clamp(28px, 3vw, 40px);
  max-width: 960px;
}
.section-h2 .hit { color: var(--accent); }

.controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.search-wrap {
  position: relative;
  max-width: 520px;
}
.search-wrap::before {
  content: '/';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  pointer-events: none;
}
.search {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--divider-lit);
  color: var(--text);
  padding: 12px 14px 12px 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: border-color 160ms var(--ease-out);
}
.search:focus { outline: none; border-color: var(--accent); }
.search::placeholder { color: var(--text-muted); text-transform: lowercase; }

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--divider);
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out);
  white-space: nowrap;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab .count {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 2px 6px;
  border: 1px solid var(--divider-lit);
}
.tab.is-active .count { color: var(--accent); border-color: var(--accent-dim); }

.prompt-list {
  border-top: 1px solid var(--divider);
}

.prompt-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 32px);
  padding: clamp(24px, 3vw, 42px) 0;
  border-bottom: 1px solid var(--divider);
  transition: background 240ms var(--ease-out);
}
.prompt-row:hover { background: var(--bg-soft); }

.prompt-row[hidden],
.empty[hidden] {
  display: none !important;
}

.prompt-index {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(32px, 3.6vw, 52px);
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  padding-top: 4px;
}

.prompt-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prompt-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.prompt-head h3 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(24px, 2.4vw, 36px);
  letter-spacing: -0.028em;
  line-height: 1.05;
}

.chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  background: var(--accent-glow);
}

.prompt-use {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.55;
  max-width: 78ch;
}

pre {
  background: #050505;
  border: 1px solid var(--divider-lit);
  border-left: 3px solid var(--accent);
  padding: clamp(18px, 2vw, 24px);
  overflow-x: auto;
  white-space: pre;
}

code {
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}

.prompt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.copy-btn {
  appearance: none;
  border: 1px solid var(--divider-lit);
  background: var(--bg);
  color: var(--text-mid);
  padding: 8px 12px;
  min-width: 86px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.copy-btn.is-copied {
  color: var(--ok);
  border-color: rgba(123, 216, 143, 0.5);
  background: rgba(123, 216, 143, 0.06);
}

.empty {
  padding: 48px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--divider);
  padding: clamp(28px, 3vw, 48px) var(--pad-page);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-footer .mark { color: var(--text); font-weight: 600; }
.site-footer .mark .dot { color: var(--accent); }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

.to-top {
  --lift: 0px;
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: calc(clamp(16px, 3vw, 32px) + var(--lift));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--text);
  border: 1px solid var(--divider-lit);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out),
              border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }
.to-top-arrow { display: inline-block; transition: transform 240ms var(--ease-out); }
.to-top:hover .to-top-arrow { transform: translateY(-3px); }

@media (max-width: 720px) {
  .hide-sm { display: none; }
  .status-strip {
    font-size: 10px;
    letter-spacing: 1.8px;
    gap: 10px;
  }
  .prompt-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .prompt-index {
    font-size: 28px;
    padding-top: 0;
  }
  .prompt-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .copy-btn {
    width: 100%;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .section-tag {
    letter-spacing: 2.5px;
    font-size: 11px;
    flex-wrap: wrap;
  }
  .section-tag .line { display: none; }
  .to-top { padding: 10px 12px; font-size: 10px; letter-spacing: 2px; }
  .to-top-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
