:root{
  --bg0:#0b1018;
  --bg1:#141c28;
  --bg2:#0b0f14;

  --cardTop: rgba(255,255,255,.10);
  --cardMid: rgba(255,255,255,.06);
  --cardBot: rgba(0,0,0,.42);
  --cardBorder: rgba(255,255,255,.14);
  --cardBorder2: rgba(0,0,0,.55);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);

  --cyan:#6fd6ff;
  --cyan2:#4ebcff;

  --orange0:#ffb54c;
  --orange1:#ff8a2a;
  --orange2:#e85c18;

  --blueBtn0:#3b6fb3;
  --blueBtn1:#29558e;
  --blueBtn2:#1e3f6a;

  --shadow: 0 22px 70px rgba(0,0,0,.62);
  --inset: inset 0 1px 0 rgba(255,255,255,.06);

  --radius: 14px;
  --radiusLg: 18px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  --accent: #44B0B9;
  --focus-ring: 0 0 0 3px rgba(68,176,185,.35);
}

*{ box-sizing:border-box; }
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  overflow-x:hidden;

  /* Base background like the mock */
  background:
    radial-gradient(1200px 700px at 35% 35%, rgba(90,130,180,.40), transparent 60%),
    radial-gradient(900px 540px at 70% 35%, rgba(160,70,120,.25), transparent 58%),
    radial-gradient(700px 520px at 60% 10%, rgba(220,160,60,.18), transparent 55%),
    radial-gradient(1400px 900px at 50% 60%, rgba(20,30,48,.85), rgba(8,10,14,.98) 68%),
    linear-gradient(180deg, #0b0f14, #0a0d12);
}

/* Grain overlay */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.18;
  mix-blend-mode:overlay;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  background-size:220px 220px;
}

/* Vignette + subtle bloom */
body::after{
  content:"";
  position:fixed;
  inset:-40px;
  pointer-events:none;
  background:
    radial-gradient(900px 500px at 50% 20%, rgba(255,255,255,.10), transparent 55%),
    radial-gradient(1100px 900px at 50% 55%, transparent 45%, rgba(0,0,0,.55) 78%);
  opacity:.9;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
}

.wrap{
  position:relative;
  z-index:1;
  max-width:1500px;
  margin:0 auto;
  padding:44px 42px 34px;
}

/* HERO */
.hero{
  display:grid;
  grid-template-columns: 132px 1fr;
  gap:18px;
  align-items:center;
  margin-bottom:26px;
}

.deck{
  width:132px;
  height:92px;
  border-radius:18px;
  transform: rotate(-12deg);
  background:
    radial-gradient(140px 80px at 30% 30%, rgba(255,255,255,.25), transparent 55%),
    linear-gradient(180deg, #3a4250, #1c222d);
  box-shadow: 0 26px 70px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.12);
  padding:12px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:8px;
}
.deck .key{
  border-radius:10px;
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(255,255,255,.25), transparent 55%),
    linear-gradient(180deg, #0f141c, #0b0f14);
  border:1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  position:relative;
  overflow:hidden;
}
.deck .key::after{
  content:"";
  position:absolute; inset:-10px;
  background: radial-gradient(circle at 35% 25%, rgba(120,200,255,.28), transparent 50%);
  opacity:.8;
}

.title h1{
  margin:0;
  font-size:54px;
  letter-spacing:-.02em;
  line-height:1;
  text-shadow: 0 10px 40px rgba(0,0,0,.55);
}
.title h1 span{
  display:block;
  margin-top:6px;
  font-weight:900;
  letter-spacing:.02em;
  background: linear-gradient(180deg, #a8ecff, #5fcfff 40%, #3db5ff);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-shadow:none;
}
.title p{
  margin:10px 0 0;
  color: rgba(255,255,255,.75);
  font-size:18px;
  letter-spacing:.01em;
  text-shadow: 0 8px 26px rgba(0,0,0,.45);
}

/* GRID like the mock: TL icon picker, BL gradient editor, TR preview, BR exporter */
.grid{
  display:grid;
  grid-template-columns: 520px 1fr;
  grid-template-rows: auto auto;
  gap:22px 22px;
  align-items:start;
}

.card{
  position:relative;
  border-radius: var(--radiusLg);
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06) 40%, rgba(0,0,0,.46));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow), var(--inset);
  overflow:hidden;
}
/* subtle inner texture */
.card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(700px 240px at 50% 0%, rgba(255,255,255,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 55%);
  opacity:.7;
  pointer-events:none;
}
/* edge highlight */
.card::after{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: calc(var(--radiusLg) + 2px);
  pointer-events:none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
  opacity:.8;
}

.card-head{
  position:relative;
  z-index:1;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.14));
}
.card-head .label{
  font-weight:700;
  letter-spacing:.01em;
  font-size:15px;
  color: rgba(255,255,255,.88);
}
.icons{
  display:flex;
  gap:10px;
  opacity:.85;
}
.ico{
  width:18px;height:18px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  cursor: pointer;
  padding: 0;
}
.ico:hover {
  background: rgba(255,255,255,.12);
}

.card-body{
  position:relative;
  z-index:1;
  padding:14px;
}

/* Icon picker UI */
.search{
  height:36px;
  border-radius:10px;
  background: rgba(0,0,0,.30);
  border:1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 12px;
  color: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.search .dot{
  width:10px;height:10px;border-radius:50%;
  background: rgba(255,255,255,.25);
  box-shadow: 0 0 0 3px rgba(255,255,255,.04);
}
.search input{
  all:unset;
  flex:1;
  font-size:14px;
  color: rgba(255,255,255,.86);
}
.icon-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap:10px;
  min-height: 300px;
}
.appicon{
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.20), transparent 55%),
    linear-gradient(180deg, rgba(30,40,60,.55), rgba(0,0,0,.32));
  border:1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.35);
  position:relative;
  overflow:hidden;
  cursor:pointer;
  transition: transform .12s ease, filter .12s ease;
  padding: 0;
  display: grid;
  place-items: center;
}
.appicon:hover{ transform: translateY(-2px); filter: brightness(1.06); }
.appicon.selected{
  outline: 2px solid rgba(111,214,255,.55);
  box-shadow: 0 0 0 4px rgba(111,214,255,.12), inset 0 1px 0 rgba(255,255,255,.06), 0 12px 34px rgba(0,0,0,.45);
}
.appicon .glyph{
  font-weight:900;
  color: rgba(255,255,255,.86);
  text-shadow: 0 10px 30px rgba(0,0,0,.55);
  font-size:16px;
  letter-spacing:.02em;
}
.appicon svg {
  width: 50%;
  height: 50%;
  fill: rgba(255, 255, 255, 0.75);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}
.appicon.badge::after{
  content:"";
  position:absolute; inset:-40px;
  background: radial-gradient(circle at 30% 30%, rgba(255,120,60,.35), transparent 40%);
  transform: rotate(18deg);
  opacity:.8;
  pointer-events:none;
}

/* Gradient editor UI */
.grad-bar{
  height:34px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 28px rgba(0,0,0,.35);
  background: linear-gradient(90deg,
    #ff3d6a 0%,
    #ff9f2c 18%,
    #f8f43e 32%,
    #41e27b 48%,
    #44d2ff 65%,
    #5a78ff 82%,
    #ff3d6a 100%);
  position:relative;
  margin-bottom:12px;
}
.stop{
  position:absolute;
  top:50%;
  transform: translate(-50%,-50%);
  width:16px;height:16px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.92);
  box-shadow: 0 10px 22px rgba(0,0,0,.55), 0 0 0 4px rgba(0,0,0,.18);
  cursor:grab;
}
.stop.dragging {
  cursor: grabbing;
}
.stop[data-active="true"] {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(111,214,255,.3), 0 10px 22px rgba(0,0,0,.55);
}

.stopIndicators {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 1;
}

.stopIndicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85);
  cursor: pointer;
  transition: all .15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.stopIndicator:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
}
.stopIndicator.active {
  box-shadow: 0 0 0 3px rgba(111,214,255,.4), 0 2px 6px rgba(0,0,0,.25);
  border-color: var(--cyan);
  transform: scale(1.1);
}

.row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
}
.tiny{
  width:18px;height:18px;border-radius:6px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  flex-shrink: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,.7);
  letter-spacing: 0;
  line-height: 1;
}
.tiny:hover {
  background: rgba(255,255,255,.12);
}
.tiny svg {
  width: 10px;
  height: 10px;
  stroke: rgba(255,255,255,.6);
}
#toggleStopColor {
  width: 36px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.slider{
  flex:1;
  height:10px;
  border-radius:999px;
  background: rgba(0,0,0,.32);
  border:1px solid rgba(255,255,255,.10);
  position:relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.knob{
  position:absolute; top:50%;
  transform: translate(-50%,-50%);
  width:16px;height:16px;border-radius:50%;
  background: rgba(255,255,255,.80);
  box-shadow: 0 10px 20px rgba(0,0,0,.55);
  left: 55%;
  pointer-events: none;
}
.pill{
  min-width:58px;
  height:28px;
  border-radius:10px;
  display:grid; place-items:center;
  background: rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.80);
  font-weight:700;
  font-size:13px;
  padding:0 10px;
  flex-shrink: 0;
}

.btn{
  height:32px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
  font-weight:700;
  cursor:pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 30px rgba(0,0,0,.25);
  transition: transform .12s ease;
}
.btn:active{ transform: translateY(1px); }
.btn.small{ height:30px; padding:0 10px; font-size:13px; }

.btn-style {
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.75);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s ease;
  flex-shrink: 0;
}
.btn-style:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
}
.btn-style:active {
  transform: translateY(1px);
}

.chipgroup {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s ease;
}
.chip:hover {
  background: rgba(255,255,255,.12);
}
.chip.active {
  background: rgba(111,214,255,.15);
  border-color: rgba(111,214,255,.4);
  color: rgba(255,255,255,.95);
}

/* Preview card */
.previewShell{
  height: 350px;
  border-radius: 16px;
  background:
    radial-gradient(520px 260px at 50% 30%, rgba(255,255,255,.06), transparent 58%),
    linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.35));
  border:1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  display:grid;
  place-items:center;
  position:relative;
  overflow:hidden;
}
.checker{
  position:absolute; inset:24px;
  border-radius:14px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%) 0 0/22px 22px,
    linear-gradient(-45deg, rgba(255,255,255,.07) 25%, transparent 25%) 0 0/22px 22px,
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.07) 75%) 0 0/22px 22px,
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.07) 75%) 0 0/22px 22px;
  opacity:.55;
  filter: contrast(1.1);
}
.keycap{
  width: 210px;
  height: 210px;
  border-radius: 34px;
  position:relative;
  z-index:2;
  background:
    radial-gradient(120px 120px at 50% 50%, rgba(0,0,0,.30), transparent 55%),
    linear-gradient(180deg, #ff3a3a, #d31616);
  box-shadow:
    0 26px 70px rgba(0,0,0,.65),
    inset 0 2px 0 rgba(255,255,255,.22);
  border:1px solid rgba(255,255,255,.14);
  display: grid;
  place-items: center;
}
.keycap::after{
  content:"";
  position:absolute; inset:-18px;
  border-radius: 40px;
  background: radial-gradient(circle at 40% 35%, rgba(255,170,60,.42), transparent 52%);
  filter: blur(10px);
  opacity:.8;
  z-index:-1;
}
.keycap .innerGlow{
  position:absolute; inset:0;
  border-radius:34px;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.18), transparent 55%);
  opacity:.9;
  pointer-events: none;
}
canvas {
  width: 100%;
  height: 100%;
  border-radius: 34px;
}
.previewFoot{
  text-align:center;
  margin-top:10px;
  font-weight:800;
  letter-spacing:.02em;
  color: rgba(255,255,255,.86);
  text-shadow: 0 10px 30px rgba(0,0,0,.55);
}

/* Export panel */
.field{
  height:34px;
  border-radius:10px;
  background: rgba(0,0,0,.30);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 12px;
  color: rgba(255,255,255,.86);
  font-weight:700;
  margin-bottom:12px;
}
.checks{
  display:grid;
  gap:8px;
  margin: 8px 0 14px;
  color: rgba(255,255,255,.80);
  font-weight:700;
}
.checks label{
  display:flex;
  align-items:center;
  gap:10px;
  user-select:none;
  cursor: pointer;
}
.checks input{
  width:16px;height:16px;
  accent-color: var(--cyan);
  cursor: pointer;
}

.exportRow{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-top:10px;
}
.btnPrimary{
  height:36px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.35);
  background: linear-gradient(180deg, var(--orange0), var(--orange1) 50%, var(--orange2));
  color: rgba(0,0,0,.88);
  font-weight:900;
  letter-spacing:.01em;
  box-shadow: 0 12px 34px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.28);
  cursor:pointer;
  transition: transform .12s ease;
  padding: 0;
}
.btnBlue{
  height:36px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.35);
  background: linear-gradient(180deg, rgba(90,140,205,.95), rgba(50,105,170,.92) 50%, rgba(32,70,120,.95));
  color: rgba(255,255,255,.92);
  font-weight:900;
  letter-spacing:.01em;
  box-shadow: 0 12px 34px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.16);
  cursor:pointer;
  transition: transform .12s ease;
  padding: 0;
}
.btnPrimary:active, .btnBlue:active{ transform: translateY(1px); }

/* Footer divider like the mock */
.footer{
  margin:22px auto 0;
  max-width:1500px;
  border-top: 1px solid rgba(255,255,255,.16);
  padding-top:14px;
  text-align:center;
  color: rgba(255,255,255,.75);
  letter-spacing:.02em;
  font-weight:800;
  text-shadow: 0 10px 30px rgba(0,0,0,.55);
  font-size: 14px;
}
.footer span{
  opacity:.9;
  margin:0 12px;
}

/* Responsive */
@media (max-width: 1100px){
  .grid{
    grid-template-columns: 1fr;
  }
  .hero{
    grid-template-columns: 1fr;
  }
  .deck{ transform:none; }
  .title h1{ font-size:44px; }
}
