/* Cosmixon Design Trends Showcase — shared shell (layout, tabs, phone chrome).
   Per-theme visual language lives in themes/<slug>.css — this file must stay
   theme-agnostic so any panel can be swapped/added without touching layout. */

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

:root {
  --shell-bg: #0a0c14;
  --shell-text: #e6ebf5;
  --shell-dim: #6b7688;
  --shell-border: rgba(255,255,255,.08);
  --shell-accent: #00cfff;
}

html { scroll-behavior: smooth; }

body {
  background: var(--shell-bg);
  color: var(--shell-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; }

/* ── Header ───────────────────────────────────────────────────────────── */
.shell-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--shell-border);
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,12,20,.86);
  backdrop-filter: blur(10px);
}
.shell-title { display: flex; align-items: baseline; gap: 10px; }
.shell-title h1 { font-size: 17px; font-weight: 800; letter-spacing: .3px; }
.shell-title span { font-size: 12px; color: var(--shell-dim); }

/* Inline Hub link pill — Cosmixon Hub Interconnect Standard (never fixed/floating) */
.hub-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 9px; font-size: 12px;
  color: var(--shell-dim); background: rgba(127,127,127,.12);
  border: 1px solid rgba(127,127,127,.22); text-decoration: none;
  transition: .2s;
}
.hub-link:hover { color: var(--shell-accent); border-color: rgba(0,207,255,.5); box-shadow: 0 0 14px rgba(0,207,255,.25); }

/* ── Tab bar ──────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex; gap: 8px; padding: 14px 22px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--shell-border);
  position: sticky; top: 61px; z-index: 19;
  background: rgba(10,12,20,.86);
  backdrop-filter: blur(10px);
}
.tab-bar::-webkit-scrollbar { height: 0; }
.tab-btn {
  flex: 0 0 auto;
  padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,.05); color: var(--shell-dim);
  border: 1px solid var(--shell-border); cursor: pointer;
  transition: .18s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--shell-text); border-color: rgba(255,255,255,.22); }
.tab-btn.active {
  background: var(--shell-accent); color: #041018; border-color: var(--shell-accent);
  box-shadow: 0 0 18px rgba(0,207,255,.35);
}

/* ── Theme panel + demo-block grid (layout only — visuals are per-theme) ── */
.theme-panel { padding: 34px 22px 70px; min-height: 60vh; }
.theme-panel[hidden] { display: none; }

.panel-head { max-width: 720px; margin: 0 auto 34px; text-align: center; }
.panel-head h2 { font-size: 26px; font-weight: 900; margin-bottom: 8px; }
.panel-head .panel-desc { font-size: 14px; opacity: .85; line-height: 1.6; }

.demo-block {
  max-width: 960px; margin: 0 auto 44px;
}
.demo-block h3 {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  opacity: .55; margin-bottom: 14px;
}

.demo-buttons { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.demo-form {
  display: flex; flex-direction: column; gap: 14px; max-width: 360px;
}

.demo-card { max-width: 360px; }

.demo-usage { max-width: 400px; }

/* ── Phone mock (device chrome shared across all themes) ────────────────── */
.phone-mock {
  width: 260px; height: 540px;
  border-radius: 40px;
  background: #0a0a0c;
  padding: 14px;
  box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.06);
  position: relative;
}
.phone-notch {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px; border-radius: 12px; background: #0a0a0c;
  z-index: 5;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 26px;
  overflow: hidden;
  position: relative;
}

/* ── Tab-switch loading transition (shared, theme-agnostic) ─────────────── */
#panels { position: relative; }
.panel-loading-overlay {
  position: absolute; inset: 0; z-index: 15;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,12,20,.55); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.panel-loading-overlay.active { opacity: 1; pointer-events: auto; }
.panel-loading-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15); border-top-color: var(--shell-accent);
  animation: shellSpin .7s linear infinite;
}
@keyframes shellSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .panel-loading-spinner { animation-duration: 1.4s; }
}

/* ── Themed Alert dialog — backdrop/box structure shared, visuals per-theme ── */
.theme-alert-backdrop {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.theme-alert-backdrop[hidden] { display: none; }

/* ── Loading demo block — spinner/skeleton/result states, visuals per-theme ── */
.demo-loading { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.loading-panel { width: 100%; max-width: 360px; }
.loading-result[hidden] { display: none; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .shell-header { padding: 14px 16px; }
  .tab-bar { padding: 12px 16px; top: 57px; }
  .theme-panel { padding: 24px 16px 56px; }
  .panel-head h2 { font-size: 21px; }
  .demo-block { margin-bottom: 34px; }
  .phone-mock { width: 220px; height: 460px; border-radius: 32px; }
}
