/* -------------------------------------------------------
   SOLIVRE MVP — Unified UI Stylesheet
   Dark-first • Mobile-ready • Clean & Mythic
-------------------------------------------------------- */

/* Dark theme root */
:root {
  --bg: #0b0f1c;
  --bg-alt: #111729;
  --card-bg: #141a2e;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.18);

  --accent: #f97316;
  --accent-hover: #fb923c;

  --danger: #ef4444;
  --success: #22c55e;

  --radius: 14px;
  --radius-full: 999px;

  --shadow: 0 18px 40px rgba(0,0,0,0.35);
  --shadow-soft: 0 14px 30px rgba(0,0,0,0.25);

  --transition: 0.18s ease;
}

/* Light mode */
body.light {
  --bg: #f6f8fc;
  --bg-alt: #eceffd;
  --card-bg: white;
  --text: #1e293b;
  --muted: #475569;
  --border: rgba(30, 41, 59, .12);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* -------------------------------------------------------
   TOP NAV
-------------------------------------------------------- */
.top-nav,
.mvp-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(10, 15, 28, 0.85);
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.light .top-nav,
body.light .mvp-nav {
  background: rgba(250, 250, 255, .75);
}

.logo,
.mvp-logo {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.08em;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.logo span,
.mvp-logo span {
  color: var(--accent);
}

.nav-links a,
.mvp-links a {
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  color: var(--muted);
  border-radius: var(--radius-full);
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-links a:hover,
.mvp-links a:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,0.05);
}

.active {
  color: var(--accent) !important;
  border-color: var(--accent);
}

/* Theme toggle */
.theme-toggle {
  font-size: 1.1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--accent);
}

/* -------------------------------------------------------
   HERO
-------------------------------------------------------- */
hero {
  margin-top: 1rem;
}

h1 {
  margin-top: 1.2rem;
  font-size: 2rem;
  font-weight: 700;
}

/* Intro/Explanation */
.intro {
  color: var(--muted);
  margin-bottom: 1rem;
}

/* -------------------------------------------------------
   CARDS
-------------------------------------------------------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-soft);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Lists */
.explain-list,
.card-list {
  padding-left: 1.25rem;
}

.explain-list li,
.card-list li {
  margin: 0.3rem 0;
}

/* Status */
.status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.valid-text {
  color: var(--success);
}

/* -------------------------------------------------------
   INPUTS
-------------------------------------------------------- */
label {
  display: block;
  margin: 0.75rem 0 0.25rem;
}

textarea {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  padding: 0.75rem;
  font-family: monospace;
  resize: vertical;
  min-height: 130px;
  transition: var(--transition);
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.3);
}

/* -------------------------------------------------------
   BUTTONS
-------------------------------------------------------- */
.btn {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.btn.primary {
  background: var(--accent);
  color: #0f172a;
  font-weight: 600;
}

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

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.btn.ghost:hover {
  color: var(--text);
  border-color: var(--accent);
}

.action-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* JSON output box */
.json-box {
  background: var(--bg-alt);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
  font-family: monospace;
  max-height: 300px;
}

/* -------------------------------------------------------
   FOOTER
-------------------------------------------------------- */
footer {
  margin-top: 2rem;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}


/* -------------------------------------------------------
   RESPONSIVE
-------------------------------------------------------- */
@media (max-width: 650px) {
  h1 {
    font-size: 1.7rem;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .card {
    padding: 1rem;
  }
}
