 /* =========================================================
       RESET
    ========================================================== */
    *,
    *::before,
    *::after {
      box-sizing: border-box;
    }

    :root {
      --bg: #0f172a;
      --surface: rgba(15, 23, 42, 0.7);
      --surface-light: rgba(255, 255, 255, 0.05);

      --text: #f8fafc;
      --muted: #94a3b8;

      --primary: #7c3aed;
      --primary-light: #8b5cf6;

      --border: rgba(255, 255, 255, 0.08);

      --radius: 1.2rem;

      --shadow:
        0 10px 40px rgba(0, 0, 0, 0.35);

      --transition: 220ms ease;
    }

    body {
      margin: 0;

      min-height: 100vh;

      font-family:
        Inter,
        system-ui,
        sans-serif;

      background:
        radial-gradient(
          circle at top left,
          #1e293b,
          #0f172a 55%
        );

      color: var(--text);
    }

    button,
    input,
    select {
      font: inherit;
    }

    /* =========================================================
       APP
    ========================================================== */
    .app-shell {
      width: min(1400px, 95%);
      margin-inline: auto;
      padding: 2rem 0 4rem;
    }

    .hero {
      margin-bottom: 2rem;
    }

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

    .hero__title {
      margin: 0;

      font-size: clamp(2rem, 5vw, 3.5rem);
      font-weight: 800;

      letter-spacing: -0.04em;
    }

    .hero__text {
      margin-top: 0.75rem;

      max-width: 700px;

      color: var(--muted);
      line-height: 1.7;
    }

    /* =========================================================
       LAYOUT
    ========================================================== */
    .layout {
      display: grid;
      grid-template-columns: 360px 1fr;
      gap: 1.5rem;
      align-items: start;
    }

    .card {
      background: var(--surface);

      backdrop-filter: blur(18px);

      border: 1px solid var(--border);

      border-radius: var(--radius);

      box-shadow: var(--shadow);
    }

    /* =========================================================
       SIDEBAR
    ========================================================== */
    .editor {
      padding: 1.5rem;
      position: sticky;
      top: 1rem;
    }

    .editor__title {
      margin: 0 0 1.5rem;

      font-size: 1.4rem;
      font-weight: 700;
    }

    /* =========================================================
       TABS
    ========================================================== */
    .tabs {
      display: flex;
      gap: 0.5rem;

      margin-bottom: 1.5rem;
      padding: 0.35rem;

      background: rgba(255, 255, 255, 0.04);

      border-radius: 999px;
    }

    .tab-btn {
      flex: 1;

      border: none;
      border-radius: 999px;

      padding: 0.8rem 1rem;

      background: transparent;

      color: var(--muted);

      cursor: pointer;

      transition: var(--transition);
    }

    .tab-btn.active {
      background: var(--primary);
      color: white;
    }

    .tab-panel {
      display: none;

      animation: fade 0.25s ease;
    }

    .tab-panel.active {
      display: block;
    }

    @keyframes fade {
      from {
        opacity: 0;
        transform: translateY(8px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* =========================================================
       FORM
    ========================================================== */
    .field {
      margin-bottom: 1.25rem;
    }

    .field label {
      display: block;

      margin-bottom: 0.55rem;

      font-size: 0.92rem;
      font-weight: 600;
    }

    .input,
    .select {
      width: 100%;

      padding: 0.85rem 1rem;

      border: 1px solid var(--border);
      border-radius: 0.9rem;

      background: rgba(255, 255, 255, 0.04);

      color: var(--text);

      transition: var(--transition);
    }

    .input:focus,
    .select:focus {
      outline: none;

      border-color: var(--primary);

      box-shadow:
        0 0 0 4px rgba(124, 58, 237, 0.15);
    }

    .radio-group {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .radio-option {
      display: flex;
      align-items: center;
      gap: 0.5rem;

      padding: 0.8rem 1rem;

      border-radius: 999px;

      background: rgba(255, 255, 255, 0.05);

      cursor: pointer;
    }

    /* =========================================================
       BUTTONS
    ========================================================== */
    .btn {
      border: none;
      border-radius: 0.9rem;

      padding: 0.9rem 1.2rem;

      font-weight: 600;

      cursor: pointer;

      transition: var(--transition);
    }

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

    .btn-primary {
      background:
        linear-gradient(
          135deg,
          var(--primary),
          var(--primary-light)
        );

      color: white;
    }

    .btn-secondary {
      background: rgba(255, 255, 255, 0.08);
      color: white;
    }

    .btn-danger {
      background: #ef4444;
      color: white;
    }

    .button-row {
      display: flex;
      gap: 0.75rem;
      flex-wrap: wrap;
    }

    /* =========================================================
       LINKS LIST
    ========================================================== */
    .links-list {
      list-style: none;

      margin: 1rem 0 0;
      padding: 0;

      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .link-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;

      padding: 0.85rem 1rem;

      border-radius: 1rem;

      background: rgba(255, 255, 255, 0.04);
    }

    .link-item strong {
      display: block;
    }

    .link-item small {
      color: var(--muted);
    }

    /* =========================================================
       PREVIEW
    ========================================================== */
    .workspace {
      padding: 1.5rem;
    }

    .workspace__header {
      margin-bottom: 1.5rem;
    }

    .workspace__title {
      margin: 0;

      font-size: 1.5rem;
      font-weight: 700;
    }

    .workspace__text {
      margin-top: 0.5rem;

      color: var(--muted);
    }

    .preview-box {
      padding: 2rem;

      min-height: 220px;

      border-radius: var(--radius);

      background:
        linear-gradient(
          145deg,
          rgba(255, 255, 255, 0.05),
          rgba(255, 255, 255, 0.02)
        );

      border: 1px solid var(--border);
    }

    /* =========================================================
       GENERATED NAVBAR
    ========================================================== */
    .generated-navbar {
      display: flex;
      align-items: center;
      gap: 1rem;

      padding: 1rem 1.2rem;

      border-radius: 1rem;

      transition: var(--transition);
    }

    .generated-navbar.vertical {
      flex-direction: column;
      align-items: stretch;
      max-width: 280px;
    }

    .brand {
      text-decoration: none;

      font-weight: 800;
      letter-spacing: -0.03em;
    }

    .nav-links {
      display: flex;
      gap: 0.5rem;

      margin: 0;
      padding: 0;

      list-style: none;

      flex-wrap: wrap;
    }

    .generated-navbar.vertical .nav-links {
      flex-direction: column;
    }

    .nav-link {
      text-decoration: none;

      padding: 0.7rem 1rem;

      border-radius: 0.8rem;

      transition: var(--transition);
    }

    .nav-link:hover {
      background: rgba(255, 255, 255, 0.12);
    }

    /* =========================================================
       CODE AREA
    ========================================================== */
    .code-area {
      margin-top: 1.5rem;
    }

    .code-toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;

      margin-bottom: 1rem;
    }

    .code-output {
      position: relative;
    }

    pre {
      margin: 0;

      padding: 1.5rem;

      overflow-x: auto;

      border-radius: 1rem;

      background: #020617;

      border: 1px solid rgba(255, 255, 255, 0.06);

      color: #e2e8f0;

      line-height: 1.6;
    }

    /* =========================================================
       RESPONSIVE
    ========================================================== */
    @media (max-width: 980px) {
      .layout {
        grid-template-columns: 1fr;
      }

      .editor {
        position: static;
      }
    }