/* =========================================================
   DESIGN TOKENS
   ========================================================= */

:root {
  color-scheme: dark;
  --font-ui: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Archivo", var(--font-ui);
  --soft: #070d17;
  --ink: #eef7ff;
  --cream: #f4f9ff;
  --ink-dark: #03101d;
  --muted: #a9bfd5;
  --silver-light: #a9bfd5;
  --gold: #4fa8ff;
  --gold-light: #d8efff;
  --gold-bright: #62b6ff;
  --gold-dark: #236ca8;
  --gold-deep: #123a63;
  --gold-rgb: 79, 168, 255;
  --gold-light-rgb: 216, 239, 255;
  --gold-bright-rgb: 98, 182, 255;
  --gold-dark-rgb: 35, 108, 168;
  --line: rgba(98, 182, 255, 0.30);
  --finished: #8ee0ad;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.52);
  --ds-page: #070d17;
  --ds-surface-0: rgba(12, 23, 39, 0.90);
  --ds-surface-1: rgba(16, 31, 52, 0.94);
  --ds-surface-2: rgba(26, 48, 77, 0.90);
  --ds-glass: rgba(91, 173, 255, 0.09);
  --ds-border: rgba(159, 207, 255, 0.20);
  --ds-border-strong: rgba(91, 173, 255, 0.58);
  --ds-text: #eef7ff;
  --ds-text-muted: #a9bfd5;
  --ds-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --ds-shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.24);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --player-accent: var(--gold);
  --player-accent-light: var(--gold-light);
  --player-accent-dark: var(--gold-dark);
  --player-accent-rgb: var(--gold-rgb);

  /* Added for the Claude Design UI redesign (docs/ROADMAP.md, see .claude/plans/we-can-plan-new-playful-volcano.md) */
  --ds-card-bg: #0e1a2c;
  --ds-border-hairline: rgba(159, 207, 255, 0.13);
  --danger: #ff8fa3;
  --danger-bg: rgba(224, 90, 120, 0.13);
  --danger-bg-strong: rgba(224, 90, 120, 0.3);
  --danger-border: rgba(224, 90, 120, 0.36);
  --warning: #e6c05a;
  --warning-bg: rgba(184, 140, 0, 0.16);
  --text-secondary: #c2d4e5;
  --text-dim: #7e93a9;
}

/* =========================================================
   FONTS
   ========================================================= */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/Archivo-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/Archivo-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/Archivo-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/Archivo-ExtraBold.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/Archivo-Black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* =========================================================
   GLOBAL
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;

  background:
    linear-gradient(180deg,
      rgba(3, 16, 34, 0.72),
      rgba(3, 16, 34, 0.97)),
    url("../assets/backgrounds/bg_img-1600.jpg") center top / cover fixed,
    var(--soft);

  color: var(--ink);
  font-family: var(--font-ui);
  letter-spacing: 0.015em;
  line-height: 1.5;
  overflow-x: clip;
}

body.workspace-active,
body.setup-active {
  background:
    linear-gradient(180deg,
      rgba(3, 16, 34, 0.86),
      rgba(3, 16, 34, 0.98)),
    linear-gradient(90deg,
      rgba(3, 16, 34, 0.3),
      rgba(5, 21, 43, 0.76)),
    url("../assets/backgrounds/bg_img-1600.jpg") center bottom / auto 150% fixed,
    var(--soft);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background:
    linear-gradient(135deg,
      transparent 0 46%,
      rgba(var(--gold-bright-rgb), 0.12) 46.15% 46.45%,
      transparent 46.6% 100%),
    linear-gradient(45deg,
      transparent 0 64%,
      rgba(var(--gold-rgb), 0.08) 64.15% 64.45%,
      transparent 64.6% 100%);

  background-size: 340px 340px, 460px 460px;
  opacity: 0.5;
  mix-blend-mode: screen;
}


/* =========================================================
   FORM ELEMENTS
   ========================================================= */

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0.01em;
}

button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.3;
  padding: 0.88rem 1rem;

  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input,
textarea,
select {
  width: 100%;

  border:
    1px solid rgba(var(--gold-light-rgb), 0.34);

  border-radius: 8px;

  padding: 0.78rem 0.85rem;

  background:
    linear-gradient(180deg,
      rgba(var(--gold-light-rgb), 0.045),
      rgba(var(--gold-light-rgb), 0.018)),
    rgba(5, 21, 43, 0.74);

  color: var(--ink);

  font-size: 1rem;
  line-height: 1.5;

  box-shadow:
    inset 0 1px 0 rgba(var(--gold-light-rgb), 0.045);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;

  border-color:
    rgba(var(--gold-bright-rgb), 0.72);

  box-shadow:
    0 0 0 3px rgba(var(--gold-rgb), 0.12),
    inset 0 1px 0 rgba(var(--gold-light-rgb), 0.06);
}

select {
  min-height: 52px;
  appearance: none;

  background:
    linear-gradient(45deg,
      transparent 50%,
      var(--gold-light) 50%) calc(100% - 18px) 50% / 7px 7px no-repeat,

    linear-gradient(135deg,
      var(--gold-light) 50%,
      transparent 50%) calc(100% - 13px) 50% / 7px 7px no-repeat,

    rgba(5, 21, 43, 0.74);

  padding-right: 2.2rem;
}

input::placeholder,
textarea::placeholder {
  color: rgba(var(--gold-light-rgb), 0.40);
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 0.5rem;

  color: var(--silver-light);

  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 0.58rem;

  color: var(--silver-light);

  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.footer-brand {
  text-align: center;
  margin-bottom: 18px;
}

.footer-brand-logo {
  display: block;
  width: 160px;
  height: auto;
  margin: 0 auto;
}

.footer-brand .version {
  width: 160px;
  margin: 8px auto 0;
  text-align: center;
}