:root {
  --bg: #10141a;
  --bg-alt: #141a22;
  --card: #1a212b;
  --border: #29323f;
  --text: #d9e0e8;
  --text-dim: #8e99a8;
  --accent: #2ee6c8;
  --accent-soft: rgba(46, 230, 200, 0.1);
  --danger: #ff6b6b;
}

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

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

.container { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem; }

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  display: flex;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.brand { font-size: 1.15rem; font-weight: 750; color: #fff; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--accent); }
.brand-crumb { color: var(--text-dim); font-weight: 400; font-size: 0.95rem; }

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, var(--accent-soft), transparent);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); color: #fff; letter-spacing: -0.02em; }
.hero-sub { color: var(--text-dim); max-width: 40rem; margin-top: 0.9rem; font-size: 1.05rem; }

.section { padding: 2.5rem 0 4rem; }
.section h2 { color: #fff; font-size: 1.5rem; margin-bottom: 1.5rem; }

/* Tool cards */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.tool-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.tool-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.tool-card h3 { color: #fff; font-size: 1.1rem; margin-bottom: 0.5rem; }
.tool-card p { color: var(--text-dim); font-size: 0.93rem; }
.tool-cta { display: inline-block; margin-top: 0.9rem; color: var(--accent); font-weight: 600; }
.tool-card-soon { opacity: 0.55; }
.tool-card-soon:hover { border-color: var(--border); transform: none; }

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

/* ---------- Prompt Manager ---------- */

.pm-layout {
  display: grid;
  grid-template-columns: 240px 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem 0 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .pm-layout { grid-template-columns: 1fr; }
}

.pm-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
}

.pm-panel h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 0.9rem;
}

/* Saved list */
.pm-list { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.pm-list li { display: flex; }
.pm-list button {
  flex: 1;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  padding: 0.5rem 0.7rem;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-list button:hover { border-color: var(--border); background: var(--bg-alt); }
.pm-list button.active { border-color: var(--accent); background: var(--accent-soft); color: #fff; }
.pm-empty { color: var(--text-dim); font-size: 0.88rem; }

/* Form */
.pm-field { margin-bottom: 0.9rem; }
.pm-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}
.pm-field input,
.pm-field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.55rem 0.7rem;
  resize: vertical;
}
.pm-field input:focus,
.pm-field textarea:focus { outline: none; border-color: var(--accent); }
.pm-field textarea { min-height: 4.2rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #08120f; }
.btn-primary:hover { background: #55efd7; }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.pm-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.4rem; }

/* Preview */
.pm-preview-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  min-height: 12rem;
  max-height: 60vh;
  overflow-y: auto;
  color: var(--text);
}
.pm-preview-empty { color: var(--text-dim); font-style: italic; }

.pm-status {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--accent);
  min-height: 1.3rem;
}

/* Error page */
.error-page { min-height: 70vh; display: flex; align-items: center; text-align: center; }
.error-page .container { max-width: 32rem; }
.error-page h1 { font-size: 4rem; color: #fff; }
