/* ===== Global / Base ===== */

* {
  box-sizing: border-box;
}

:root {
  --bg-1: #0b1020;
  --bg-2: #050814;

  --glass-bg: rgba(9, 17, 35, 0.9);
  --glass-border: rgba(255, 255, 255, 0.08);

  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);

  --btn-grad-a: #4a6aaa;
  --btn-grad-b: #7089c2;
  --btn-shadow: rgba(60, 90, 140, 0.35);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  
  min-height: calc(var(--vh) * 100);

  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
  background: radial-gradient(circle at top left, #121e3a 0, var(--bg-1) 30%, var(--bg-2) 80%);
  color: var(--text-main);
}

/* ===== Background blobs ===== */

.bg-blob-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}

.blob-left {
  width: 420px;
  height: 420px;
  left: -80px;
  top: 40px;
  opacity: 0.45;
  background: radial-gradient(circle, rgba(90, 200, 250, 0.3), transparent 65%);
}

.blob-right {
  width: 520px;
  height: 520px;
  right: -120px;
  bottom: -80px;
  opacity: 0.5;
  background: radial-gradient(circle, rgba(160, 112, 255, 0.32), transparent 60%);
}

/* Background image accent */
.art-accent {
  position: absolute;
  right: 6%;
  top: 8%;
  width: 360px;
  opacity: 0.08;
  filter: blur(1.5px);
}

/* ===== Layout ===== */

.container {
  z-index: 1;
  width: 960px;
  max-width: 96vw;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== Header ===== */

.header {
  display: flex;
  gap: 12px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #324f92, #5a7ec4);
  border-radius: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text h1 {
  margin: 0;
  font-size: 20px;
}

.tagline {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Card ===== */

.card {
  background: radial-gradient(circle at top right, rgba(136, 111, 255, 0.18), transparent 55%),
              radial-gradient(circle at bottom left, rgba(74, 140, 255, 0.2), transparent 60%),
              var(--glass-bg);
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ===== Form ===== */

.controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.label {
  font-size: 13px;
  color: var(--text-muted);
}

.dropdown,
.custom-dim input {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 14, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  font-family: "Poppins", sans-serif;
}

.dropdown optgroup,
.dropdown option {
  background: #050818;
  color: #fff;
}

.custom-dim {
  display: flex;
  gap: 12px;
}

.custom-dim input {
  flex: 1;
}

/* remove # arrows */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
input[type=number] {
  -moz-appearance: textfield;
}

/* ===== Drop area ===== */

.drop-area {
  position: relative;
  margin-top: 4px;
  padding: 24px 18px;
  border-radius: 16px;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  background: rgba(7, 16, 34, 0.85);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden; /* <-- HARD STOP: prevents input leak */
}

.drop-area:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(9, 18, 40, 0.95);
}

/* ONLY THIS AREA IS CLICKABLE */
.drop-area input[type="file"] {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 3; /* stays above text only */
}


/* ===== Preview ===== */

.preview-box {
  display: flex;
  align-items: center;
  justify-content: center;

  margin-top: 4px;
  padding: 14px;
  border-radius: 18px;

  background: radial-gradient(circle at top left, rgba(122, 164, 255, 0.14), transparent 55%), #02040a;
  border: 1px solid rgba(255, 255, 255, 0.15);

  min-height: 120px;
  max-height: 380px;
  overflow: hidden; /* important */

  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.75);
}


.canvas-scroll {
  max-width: 100%;
  max-height: 360px;

  overflow-x: auto;
  overflow-y: auto;

  padding: 4px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);

  /* NEW: center content inside scrollbox */
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Scrollbars */
.canvas-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.canvas-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 8px;
}
.canvas-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.4);
}

canvas {
  display: block;
  image-rendering: pixelated;
}

/* ===== Buttons ===== */

.button-holder {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn {
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.primary {
  background: linear-gradient(135deg, var(--btn-grad-a), var(--btn-grad-b));
  color: white;
  box-shadow: 0 10px 22px var(--btn-shadow);
}

.secondary-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text-muted);
}

/* ===== Footer ===== */

.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
}

