/* ai-curator-web Playground — shared base styles
 * Imported by every demo HTML in /public/playground/{category}/{demo}.html
 * Brand tokens aligned with ~/ai-curator-tw/DESIGN.md
 */

:root {
  --accent: #D4623B;
  --accent-hover: #B8502F;
  --accent-light: #FEF3EF;
  --text: #0F172A;
  --text-2: #64748B;
  --bg: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --success: #22C55E;
  --border: #E2E8F0;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

::selection {
  background: var(--accent-light);
  color: var(--accent);
}

/* ============ Hero / Scenario header ============ */
.demo-hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  text-align: left;
}

.demo-category {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.demo-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  color: var(--text);
}

.demo-scenario {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ============ Demo body container ============ */
.demo-body {
  max-width: 1080px;
  margin: 32px auto;
  padding: 0 24px;
}

/* ============ Prompt block ============ */
.demo-prompt {
  max-width: 760px;
  margin: 48px auto 32px;
  padding: 32px 24px;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
}

.demo-prompt h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.demo-prompt > p {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 16px;
}

.prompt-block {
  position: relative;
  background: var(--text);
  color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 20px 16px 16px;
  box-shadow: var(--shadow-md);
}

.prompt-block pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Menlo', 'Consolas', 'Liberation Mono', monospace;
  font-size: 13.5px;
  line-height: 1.6;
  color: #e2e8f0;
  margin: 0;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ============ Footer ============ */
.demo-footer {
  max-width: 760px;
  margin: 32px auto 64px;
  padding: 24px;
  text-align: center;
  color: var(--text-2);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

.demo-footer strong {
  color: var(--text);
  font-weight: 700;
}

.demo-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.demo-footer a:hover {
  text-decoration: underline;
}

.demo-footer .cite {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-2);
}

/* ============ Generic UI helpers — demos can use ============ */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 999px;
}

/* ============ Responsive ============ */
@media (max-width: 640px) {
  .demo-hero {
    padding: 32px 20px 24px;
  }
  .demo-hero h1 {
    font-size: 26px;
  }
  .demo-scenario {
    font-size: 16px;
  }
  .demo-prompt {
    margin: 32px 16px 24px;
    padding: 24px 18px;
  }
  .demo-body {
    padding: 0 16px;
  }
}
