* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.24), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.2), transparent 30rem),
    #0f1020;
  color: #f8fafc;
}

.app-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  text-align: center;
  margin-bottom: 36px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #a5b4fc;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.header-label {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: white;
  text-shadow:
    3px 3px 0 #000,
    6px 6px 0 rgba(0, 0, 0, 0.35);
}

.subtitle {
  max-width: 520px;
  margin: 18px auto 26px;
  color: #cbd5e1;
  font-size: 1.05rem;
}

.upload-card {
  display: inline-flex;
  justify-content: center;
}

#file-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.download-label {
    display: block;
    margin: 1.5rem auto 0;
    padding: 10px 20px;
    cursor: pointer;
    width: fit-content;
}

#file-input-label,
.download-label,
.link {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.35);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

#file-input-label:hover,
.download-label:hover,
.link:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 40px rgba(236, 72, 153, 0.35);
}

#file-input-label:active,
.download-label:active,
.link:active {
  transform: translateY(0);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.preview-panel,
.controls-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.preview-panel {
  min-height: 420px;
  padding: 20px;
  display: grid;
  place-items: center;
}

#canvas {
  display: block;
  max-width: 100%;
  width: 100%;
  min-height: 320px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.25);
}

.controls-panel {
  padding: 24px;
}

.controls-panel h2 {
  margin: 0 0 20px;
  font-size: 1.35rem;
}

.controls-panel label {
  display: block;
  margin: 16px 0 8px;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 700;
}

.controls-panel input[type="text"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 14px 16px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  font-size: 1rem;
  outline: none;
}

.controls-panel input[type="text"]:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.link {
  width: 100%;
  margin-top: 20px;
}

.tutorial-card {
  margin-top: 24px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  color: #cbd5e1;
}

.tutorial-card p {
  margin: 6px 0;
}

.tutorial-title {
  color: white;
  font-weight: 800;
}

@media (max-width: 820px) {
  .app-shell {
    padding: 32px 0;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    min-height: 320px;
  }
}
