:root{
      --bg:#0f172a;
      --panel:#111827cc;
      --panel-border:rgba(255,255,255,.08);
      --text:#f8fafc;
      --muted:#94a3b8;
      --primary:#7c3aed;
      --primary-2:#06b6d4;
      --input:#1e293b;
      --shadow:0 10px 40px rgba(0,0,0,.35);
      --radius:22px;
    }

    *{
      margin:0;
      padding:0;
      box-sizing:border-box;
    }

    body{
      min-height:100vh;
      font-family: Inter, sans-serif;
      background:
        radial-gradient(circle at top left,#312e81 0%,transparent 30%),
        radial-gradient(circle at bottom right,#0891b2 0%,transparent 30%),
        var(--bg);
      color:var(--text);
      padding:32px;
    }

    .app{
      max-width:1600px;
      margin:auto;
    }

    /* HEADER */

    .topbar{
      display:flex;
      justify-content:space-between;
      align-items:center;
      margin-bottom:32px;
      gap:20px;
      flex-wrap:wrap;
    }

    .brand h1{
      font-size:clamp(2rem,4vw,3rem);
      font-weight:800;
      letter-spacing:-1px;
      background:linear-gradient(90deg,#fff,#67e8f9);
      -webkit-background-clip:text;
      -webkit-text-fill-color:transparent;
    }

    .brand p{
      color:var(--muted);
      margin-top:8px;
    }

    .back-btn{
      text-decoration:none;
      color:white;
      padding:14px 22px;
      border-radius:16px;
      background:linear-gradient(135deg,var(--primary),var(--primary-2));
      font-weight:600;
      transition:.3s ease;
      box-shadow:var(--shadow);
    }

    .back-btn:hover{
      transform:translateY(-3px);
    }

    /* GRID */

    .grid{
      display:grid;
      grid-template-columns: 1fr 1fr 2fr 2fr;
      gap:24px;
    }

    .panel{
      background:var(--panel);
      border:1px solid var(--panel-border);
      backdrop-filter:blur(18px);
      border-radius:var(--radius);
      padding:24px;
      box-shadow:var(--shadow);
    }

    .panel h2{
      font-size:1.3rem;
      margin-bottom:20px;
      font-weight:700;
    }

    /* FORM */

    .controls{
      display:grid;
      gap:18px;
    }

    .field{
      display:flex;
      flex-direction:column;
      gap:8px;
    }

    .field label{
      color:#cbd5e1;
      font-size:.92rem;
      font-weight:600;
    }

    input,
    select,
    textarea{
      width:100%;
      border:none;
      outline:none;
      background:var(--input);
      color:white;
      padding:14px 16px;
      border-radius:14px;
      font-size:.95rem;
      transition:.25s ease;
    }

    input:focus,
    select:focus,
    textarea:focus{
      box-shadow:0 0 0 2px #7c3aed;
    }

    input[type="color"]{
      height:54px;
      padding:6px;
      cursor:pointer;
    }

    textarea{
      min-height:220px;
      resize:none;
      font-family:monospace;
      line-height:1.5;
    }

    /* BUTTONS */

    .btn{
      border:none;
      cursor:pointer;
      padding:14px 18px;
      border-radius:16px;
      color:white;
      font-weight:700;
      font-size:.95rem;
      transition:.25s ease;
      background:linear-gradient(135deg,var(--primary),var(--primary-2));
    }

    .btn:hover{
      transform:translateY(-2px) scale(1.01);
    }

    .btn.secondary{
      margin-top:14px;
      width:100%;
    }

    /* PREVIEW */

    .preview{
      min-height:420px;
      border-radius:20px;
      border:2px dashed rgba(255,255,255,.15);
      background:
        linear-gradient(rgba(255,255,255,.02),rgba(255,255,255,.02)),
        #0b1120;
      padding:20px;
      display:flex;
      overflow:hidden;
      transition:.3s ease;
    }

    .item{
      min-width:80px;
      min-height:80px;
      border-radius:18px;
      display:flex;
      justify-content:center;
      align-items:center;
      font-weight:700;
      color:white;
      background:linear-gradient(135deg,#8b5cf6,#06b6d4);
      box-shadow:
        inset 0 1px 1px rgba(255,255,255,.2),
        0 8px 20px rgba(0,0,0,.25);
      transition:.25s ease;
    }

    .item:hover{
      transform:scale(1.05);
    }

    .css-block{
      margin-top:20px;
    }

    @media(max-width:768px){
      body{
        padding:20px;
      }

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