:root {
  --bg-black: #070707;
  --panel-black: #121212;
  --panel-black-2: #1a1a1a;
  --grid-line: rgba(255, 255, 255, 0.08);
  --teal: #0ff0c6;
  --teal-strong: #00d8b0;
  --teal-deep: #007c77;
  --yellow: #ffe41e;
  --yellow-deep: #ffb400;
  --white: #f7f7f2;
  --muted: #c8d2cf;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  background: #00e1a2;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-family: "canada-type-gibson", "Segoe UI", sans-serif;
  color: var(--white);
  background: #00e1a2;
}

body::before {
  content: none;
}

.page-glow {
  display: none;
}

.page-glow-left {
}

.page-glow-right {
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 0;
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.controls-panel,
.preview-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.02) 0 6px,
      rgba(0, 0, 0, 0.02) 6px 12px
    ),
    linear-gradient(180deg, var(--panel-black-2) 0%, var(--panel-black) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.controls-panel::before,
.preview-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 2px solid rgba(15, 240, 198, 0.18);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.controls-panel {
  padding: 24px;
  position: sticky;
  top: 24px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.preview-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.panel-chrome {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.panel-chrome span {
  display: block;
  width: 46px;
  height: 8px;
  background: linear-gradient(90deg, var(--yellow) 0%, var(--yellow-deep) 100%);
  box-shadow: 54px 0 0 rgba(15, 240, 198, 0.9);
}

.panel-copy {
  position: relative;
  padding: 18px 18px 16px;
  margin-bottom: 18px;
  background:
    linear-gradient(90deg, rgba(255, 228, 30, 0.18), rgba(255, 228, 30, 0) 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 50%),
    rgba(0, 0, 0, 0.22);
  border-left: 6px solid var(--teal);
}

.panel-copy::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: 0;
  width: 72px;
  height: 6px;
  background: var(--yellow);
  box-shadow: 0 0 18px rgba(255, 228, 30, 0.45);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--yellow);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(2.1rem, 3vw, 2.8rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.control-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-title::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--teal);
  box-shadow: 0 0 0 2px rgba(15, 240, 198, 0.2);
  transform: rotate(45deg);
}

input[type="text"],
input[type="file"] {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.1)),
    #1a1a1a;
  color: var(--white);
  font: inherit;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}

input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 10px 14px;
  border: 0;
  background: linear-gradient(180deg, var(--yellow) 0%, var(--yellow-deep) 100%);
  color: #251900;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.slider-grid {
  display: grid;
}

.button-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

button {
  min-height: 52px;
  padding: 12px 18px;
  border: 0;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 8px 50%);
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.primary-button {
  background: linear-gradient(180deg, var(--teal) 0%, var(--teal-strong) 100%);
  color: #061d1b;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2);
}

.ghost-button {
  background: linear-gradient(180deg, #3f3f3f 0%, #232323 100%);
  color: var(--white);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.28);
}

.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 4px 0;
  width: 100%;
}

.preview-kicker {
  margin: 0 0 6px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.preview-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.preview-counter {
  min-width: 76px;
  padding: 10px 12px 8px;
  background: linear-gradient(180deg, var(--white) 0%, #d6dbd8 100%);
  color: #111;
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.canvas-stage {
  position: relative;
  width: 100%;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.02) 0 5px,
      rgba(0, 0, 0, 0.02) 5px 10px
    ),
    #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.canvas-stage::before,
.canvas-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background:
    linear-gradient(90deg, var(--teal) 0 42%, transparent 42% 50%, var(--yellow) 50% 100%);
}

.canvas-stage::before {
  top: 0;
}

.canvas-stage::after {
  bottom: 0;
}

.stage-mark {
  position: absolute;
  top: 18px;
  width: 14px;
  bottom: 18px;
  background:
    linear-gradient(180deg, var(--teal) 0 34%, transparent 34% 44%, var(--yellow) 44% 70%, transparent 70% 80%, var(--teal) 80% 100%);
  opacity: 0.9;
}

.stage-mark-left {
  left: 0;
}

.stage-mark-right {
  right: 0;
}

.canvas-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

canvas {
  width: min(100%, 1000px);
  height: auto;
  display: block;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .controls-panel {
    position: static;
  }

  .preview-panel {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100vw - 16px, 100%);
    padding: 8px 0 16px;
    gap: 14px;
  }

  .controls-panel,
  .preview-panel {
    padding: 16px;
  }

  .preview-head {
    align-items: center;
  }

  .preview-counter {
    min-width: 64px;
    font-size: 1.6rem;
  }

  .canvas-stage {
    padding: 14px;
  }

  .button-row {
    flex-direction: column;
  }
}
