:root {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #f1f1f5;
  background: #07090e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1c1e26, #07090e 60%);
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 3rem) 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #9cbad3;
}

.app-header h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(2rem, 3vw, 2.7rem);
}

.tagline {
  margin: 0.25rem 0 0;
  color: #a5adc3;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: #b2b8cc;
  gap: 0.25rem;
}

.control select,
header .control select,
.export-card select {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
}

.header-actions .btn,
.btn,
.small-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn {
  background: linear-gradient(135deg, #7df1ff, #5c7cff);
  color: #06070b;
  box-shadow: 0 12px 24px rgba(93, 153, 255, 0.25);
}

.small-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #e3e7ff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn:hover,
.small-btn:hover,
.header-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
}

.canvas-panel {
  position: relative;
  background: #0a0c12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: clamp(1rem, 2vw, 1.5rem);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.35);
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  background: #fefefe;
}

.canvas-hint {
  margin: 0.8rem 0 0;
  font-size: 0.85rem;
  color: #7e8598;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.color-preview {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.swatch.preview {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, #ffffff, #cccccc);
}

.palette-section {
  background: rgba(255, 255, 255, 0.04);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.palette-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  gap: 0.45rem;
}

.palette-swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.palette-swatch:hover {
  transform: translateY(-2px);
}

.palette-swatch.is-selected {
  border-color: #fff;
}

.console-picker {
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.console-picker p {
  margin: 0 0 0.5rem;
  color: #a7b3c7;
}

.console-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
}

.palette-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  padding: 0.55rem 0.8rem;
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.palette-btn.active {
  background: rgba(124, 199, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

.palette-btn:hover {
  transform: translateY(-1px);
}

.export-card {
  background: rgba(255, 255, 255, 0.04);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.export-note {
  margin: 0;
  font-size: 0.85rem;
  color: #97a3c0;
}

.footer-note {
  text-align: center;
  color: #7a8298;
  font-size: 0.85rem;
  margin-bottom: 0;
}

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

  .sidebar {
    order: -1;
  }
}
