@import url("https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Manrope:wght@300;400;600;700&display=swap");

:root {
  color-scheme: dark;
  --ink: #e8dfd4;
  --muted: #b7a99a;
  --paper: #171312;
  --accent: #b23a3a;
  --accent-bright: #f4b861;
  --shadow: rgba(0, 0, 0, 0.45);
  --panel: rgba(18, 14, 14, 0.9);
  --stroke: rgba(255, 255, 255, 0.08);
  --glow: rgba(178, 58, 58, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #2b1e1a 0%, #1b1412 40%, #0f0b0a 100%);
}

.atmosphere {
  position: fixed;
  inset: -40vh -20vw;
  background: radial-gradient(circle at 15% 20%, rgba(178, 58, 58, 0.18), transparent 45%),
    radial-gradient(circle at 75% 10%, rgba(244, 184, 97, 0.16), transparent 45%),
    radial-gradient(circle at 40% 80%, rgba(83, 36, 24, 0.4), transparent 55%);
  opacity: 0.8;
  filter: blur(12px);
  pointer-events: none;
  z-index: 0;
}

.studio {
  position: relative;
  z-index: 1;
  padding: 32px clamp(16px, 4vw, 56px) 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 28px;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
}

.studio--single {
  grid-template-columns: 1fr;
}

.studio__nav {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  align-items: center;
  font-size: 0.9rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--ink);
  border-color: var(--stroke);
  transform: translateY(-1px);
}

.controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-self: start;
}

.control-group {
  background: var(--panel);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 30px var(--shadow);
  backdrop-filter: blur(8px);
}

.control-group h2 {
  font-family: "Cinzel Decorative", serif;
  margin: 0 0 12px;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.note {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--muted);
}

.palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.palette button {
  border: none;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4), 0 6px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.palette button.is-selected {
  transform: translateY(-2px) rotate(-1deg) scale(1.02);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.45);
}

.brush-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.toggle {
  flex: 1;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.toggle.is-active {
  background: var(--accent);
  color: #120c0a;
  font-weight: 600;
  transform: translateY(-1px) rotate(-0.6deg);
  box-shadow: 0 10px 18px var(--glow);
}

.slider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.slider input[type="range"] {
  flex: 1;
}

.primary,
.ghost {
  width: 100%;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 12px 18px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary {
  background: var(--accent);
  color: #140c0b;
  box-shadow: 0 16px 26px var(--glow);
}

.ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--stroke);
  color: var(--ink);
}

.primary:hover,
.ghost:hover,
.toggle:hover {
  transform: translateY(-1px);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 18px var(--shadow);
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.status__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2f9b6b;
  box-shadow: 0 0 12px rgba(47, 155, 107, 0.6);
}

.canvas-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
  align-self: start;
}

.canvas-frame {
  background: #120d0b;
  border-radius: 20px;
  padding: clamp(10px, 2vw, 20px);
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 60px var(--shadow);
}

#paint {
  width: min(88vw, 840px);
  height: min(88vw, 840px);
  display: block;
  background: #faf7f1;
  border-radius: 16px;
  cursor: crosshair;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  touch-action: none;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.about-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: clamp(20px, 4vw, 40px);
  box-shadow: 0 30px 50px var(--shadow);
  max-width: 820px;
}

.about-card h1 {
  font-family: "Cinzel Decorative", serif;
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.about-card p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

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

  .studio__nav {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  #paint {
    width: min(94vw, 360px);
    height: min(94vw, 360px);
  }
}
