:root {
   --bg: #0b0b0b; 
  --card: #0f1112; 
  --muted: #d0d0d0; 
  --accent: #ffffff; 
  --muted-2: #9a9a9a; 
  --radius: 8px;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, Roboto, system-ui, -apple-system, "Segoe UI", Arial;
  background: var(--bg);
  color: #e6eef6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.app {
  max-width: 1100px;
  margin: 28px auto;
  padding: 20px;
}
header h1 {
  margin: 0 0 6px;
  font-size: 20px;
}
header p {
  margin: 0 0 18px;
  color: var(--muted);
}
.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.zoom-controls {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.file-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  cursor: pointer;
}
.file-label input {
  display: none;
}
.btn {
  background: var(--accent);
  border: none;
  color: #042028;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.viewer {
  display: flex;
  gap: 18px;
}
.canvas-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius);
  padding: 12px;
}
canvas {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  background: #fff;
}
.info {
  width: 350px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 10px;
}
.swatch {
  height: 80px;
  border-radius: 6px;
  background: linear-gradient(45deg, #fff, #000);
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.values div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  color: var(--muted);
}
.copy {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.crosshair {
  position: fixed;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  pointer-events: none;
  mix-blend-mode: overlay;
  transform: translate(-50%, -50%);
}
.zoom {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.06);
  background: #011018;
}
.zoom canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.zoom-info {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 12px;
  border-radius: 6px;
}
footer {
  margin-top: 18px;
  color: var(--muted);
}

@media (max-width: 880px) {
  .viewer {
    flex-direction: column;
  }
  .info {
    width: 100%;
  }
}
