:root{
      --bg:#0f172a;
      --panel:#111827;
      --card:#1e293b;
      --soft:#334155;
      --primary:#7c3aed;
      --primary-light:#a78bfa;
      --text:#f8fafc;
      --muted:#94a3b8;
      --border:rgba(255,255,255,.08);
      --shadow:0 10px 30px rgba(0,0,0,.35);
      --radius:22px;
      --transition:.25s ease;
    }

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

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

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

    /* ================= HEADER ================= */

    .hero{
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap:20px;
      margin-bottom:28px;
      padding:28px;
      border-radius:var(--radius);
      background:rgba(255,255,255,.05);
      backdrop-filter:blur(14px);
      border:1px solid var(--border);
      box-shadow:var(--shadow);
    }

    .hero a {
      position: absolute;
      top: 10px;
      right: 20px;
      -webkit-text-decoration: none;
      -moz-text-decoration: none;
      text-decoration: none;
      color: #ffffff;
      font-size: 16px;
      z-index: 10;
    }

    .hero h1{
      font-size:2.4rem;
      font-weight:800;
      letter-spacing:-1px;
    }

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

    .badge{
      padding:10px 18px;
      background:linear-gradient(135deg,var(--primary),#06b6d4);
      border-radius:999px;
      font-size:.85rem;
      font-weight:600;
      box-shadow:0 4px 20px rgba(124,58,237,.45);
    }

    /* ================= GRID ================= */

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

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

    /* ================= PANELS ================= */

    .panel{
      background:rgba(255,255,255,.05);
      border:1px solid var(--border);
      border-radius:var(--radius);
      padding:24px;
      backdrop-filter:blur(16px);
      box-shadow:var(--shadow);
    }

    .panel-title{
      display:flex;
      align-items:center;
      justify-content:space-between;
      margin-bottom:22px;
    }

    .panel-title h2{
      font-size:1.1rem;
      font-weight:700;
    }

    .section{
      margin-bottom:26px;
      padding-bottom:22px;
      border-bottom:1px solid rgba(255,255,255,.06);
    }

    .section:last-child{
      border:none;
      margin-bottom:0;
      padding-bottom:0;
    }

    .section h3{
      font-size:.95rem;
      margin-bottom:16px;
      color:var(--primary-light);
    }

    /* ================= INPUTS ================= */

    .field{
      margin-bottom:16px;
    }

    .field label{
      display:block;
      font-size:.82rem;
      margin-bottom:8px;
      color:var(--muted);
    }

    input,
    select,
    textarea{
      width:100%;
      border:none;
      outline:none;
      background:rgba(255,255,255,.06);
      border:1px solid transparent;
      color:white;
      border-radius:14px;
      padding:14px;
      transition:var(--transition);
    }

    input:focus,
    select:focus,
    textarea:focus{
      border-color:var(--primary);
      background:rgba(255,255,255,.08);
    }

    textarea{
      min-height:420px;
      resize:vertical;
      font-family:Consolas, monospace;
      line-height:1.5;
    }

    .row{
      display:flex;
      gap:12px;
    }

    .row .field{
      flex:1;
    }

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

    .checkbox{
      display:flex;
      align-items:center;
      gap:10px;
      margin-top:10px;
    }

    .checkbox input{
      width:auto;
      accent-color:var(--primary);
    }

    /* ================= BUTTONS ================= */

    button{
      border:none;
      cursor:pointer;
      transition:var(--transition);
      font-weight:600;
    }

    .btn{
      width:100%;
      padding:14px;
      border-radius:14px;
      background:linear-gradient(135deg,var(--primary),#06b6d4);
      color:white;
      margin-top:10px;
      font-size:.95rem;
    }

    .btn:hover{
      transform:translateY(-2px);
      opacity:.95;
    }

    .btn-secondary{
      background:rgba(255,255,255,.08);
      color:white;
      border:1px solid var(--border);
    }

    .btn-secondary:hover{
      background:rgba(255,255,255,.12);
    }

    /* ================= ITEMS ================= */

    .items-list{
      display:flex;
      flex-direction:column;
      gap:14px;
      max-height:460px;
      overflow:auto;
      padding-right:6px;
    }

    .item-card{
      background:rgba(255,255,255,.05);
      border:1px solid rgba(255,255,255,.06);
      border-radius:18px;
      padding:16px;
      display:flex;
      justify-content:space-between;
      gap:16px;
      transition:var(--transition);
    }

    .item-card:hover{
      transform:translateY(-3px);
      border-color:rgba(255,255,255,.12);
    }

    .item-info{
      flex:1;
    }

    .item-index{
      color:var(--primary-light);
      font-size:.8rem;
      margin-bottom:8px;
    }

    .item-text{
      font-size:.95rem;
      line-height:1.5;
      word-break:break-word;
    }

    .style-tags{
      display:flex;
      gap:8px;
      margin-top:10px;
      flex-wrap:wrap;
    }

    .tag{
      padding:5px 10px;
      border-radius:999px;
      font-size:.72rem;
      background:rgba(255,255,255,.07);
      color:var(--muted);
    }

    .item-actions{
      display:flex;
      flex-direction:column;
      gap:10px;
    }

    .icon-btn{
      width:42px;
      height:42px;
      border-radius:12px;
      background:rgba(255,255,255,.07);
      color:white;
      font-size:1rem;
    }

    .icon-btn:hover{
      background:var(--primary);
    }

    /* ================= PREVIEW ================= */

    .preview-box{
      min-height:500px;
      border-radius:20px;
      padding:24px;
      background:
        linear-gradient(
          145deg,
          rgba(255,255,255,.06),
          rgba(255,255,255,.03)
        );
      border:1px solid rgba(255,255,255,.08);
      overflow:auto;
    }

    .preview-box ul,
    .preview-box ol{
      padding-left:24px;
    }

    .preview-box li{
      margin:12px 0;
      padding:12px 14px;
      border-radius:12px;
    }

    .preview-box dt{
      font-weight:700;
      margin-top:18px;
    }

    .preview-box dd{
      margin-left:20px;
      color:var(--muted);
      margin-top:6px;
    }

    .preview-actions{
      display:flex;
      gap:12px;
      margin-top:16px;
    }

    /* ================= SCROLLBAR ================= */

    ::-webkit-scrollbar{
      width:8px;
    }

    ::-webkit-scrollbar-thumb{
      background:rgba(255,255,255,.18);
      border-radius:999px;
    }