:root {
  --bg: #0f172a;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.08);
  --accent: #7dd3fc;
  --accent-strong: #22d3ee;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Futura", "Segoe UI", "Helvetica Neue", sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.08), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(125, 211, 252, 0.12), transparent 45%),
    linear-gradient(135deg, #0b1021, #0d162c 60%, #0f172a);
  color: var(--text);
  padding: 32px 18px 48px;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
}

.hero {
  padding: 16px 6px 28px;
}

.hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero .lede {
  color: var(--muted);
  max-width: 680px;
  margin: 0 0 16px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(125, 211, 252, 0.14);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.actions .secondary {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 960px) {
  main {
    grid-template-columns: 1.1fr 1fr;
  }
}

.panel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pill-group {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.pill.active {
  background: rgba(125, 211, 252, 0.22);
  border-color: var(--accent);
  color: #0b1021;
  transform: translateY(-1px);
}

.mode-hint {
  color: var(--muted);
  font-weight: 600;
}

.drop-panel .drop-zone {
  border: 1.5px dashed rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-panel .drop-zone:hover {
  border-color: var(--accent-strong);
  background: rgba(125, 211, 252, 0.06);
  transform: translateY(-1px);
}

.drop-panel .drop-zone.dragging {
  border-color: var(--accent);
  background: rgba(125, 211, 252, 0.12);
}

.drop-panel input[type="file"] {
  display: none;
}

.drop-copy .label {
  font-size: 16px;
  margin: 0;
}

.drop-copy .hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.status {
  margin-top: 14px;
  font-weight: 600;
}

.meta {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.action-row {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  color: #0b1021;
  background: var(--accent);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

button.primary:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.35);
  background: var(--accent-strong);
}

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

button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.preview-panel {
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-header h2 {
  margin: 2px 0 0;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 6px;
}

.palette-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  margin-top: 14px;
}

.swatch {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 120px;
}

.swatch .color-chip {
  height: 72px;
  width: 100%;
}

.swatch .info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
}

.swatch .name {
  font-size: 14px;
}

.swatch .hex {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.swatch .rgb {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.swatch .spacer {
  display: block;
  height: 6px;
}

.mini-actions button {
  padding: 8px 12px;
  border-radius: 10px;
}

@media (max-width: 700px) {
  .drop-panel .drop-zone {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
