:root {
      --bg: #000000;
      --card: rgba(255, 255, 255, .03);
      --card-hover: rgba(255, 255, 255, .05);
      --border: rgba(255, 255, 255, .08);
      --text: #ffffff;
      --muted: #86868b;
      --accent: #007aff;
      --glow: rgba(0, 122, 255, .4);
      --ease: cubic-bezier(.4, 0, .2, 1);
      --spring: cubic-bezier(.34, 1.56, .64, 1);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.6;
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    body::before {
      content: '';
      position: fixed;
      top: 50%;
      left: 50%;
      width: 900px;
      height: 900px;
      background: radial-gradient(circle, var(--glow), transparent 70%);
      transform: translate(-50%, -50%);
      opacity: .12;
      animation: pulse 8s ease-in-out infinite;
      pointer-events: none;
    }

    @keyframes pulse {
      0%, 100% { opacity: .12; transform: translate(-50%, -50%) scale(1); }
      50% { opacity: .2; transform: translate(-50%, -50%) scale(1.08); }
    }

    .loading {
      position: fixed;
      inset: 0;
      background: var(--bg);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      opacity: 1;
      transition: opacity .6s var(--ease);
    }

    .loading.fade {
      opacity: 0;
      pointer-events: none;
    }

    .loading-logo {
      width: 100px;
      height: 100px;
      border-radius: 22px;
      margin-bottom: 1.5rem;
      box-shadow:
        0 8px 32px rgba(0, 0, 0, .4),
        0 0 0 .5px rgba(255, 255, 255, .1);
      animation: float 3s ease-in-out infinite;
    }

    @keyframes float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-8px); }
    }

    .loading-text {
      font-size: 2rem;
      font-weight: 600;
      margin-bottom: 1.5rem;
      letter-spacing: -.02em;
    }

    .loading-dots {
      display: flex;
      gap: 10px;
    }

    .loading-dot {
      width: 12px;
      height: 12px;
      background: var(--accent);
      border-radius: 50%;
      animation: bounce 1.4s ease-in-out infinite;
    }

    .loading-dot:nth-child(2) { animation-delay: .2s; }
    .loading-dot:nth-child(3) { animation-delay: .4s; }

    @keyframes bounce {
      0%, 80%, 100% { transform: scale(.8); opacity: .5; }
      40% { transform: scale(1.2); opacity: 1; }
    }

    nav {
      position: sticky;
      top: 0;
      background: rgba(0, 0, 0, .7);
      backdrop-filter: blur(20px) saturate(180%);
      border-bottom: 1px solid var(--border);
      z-index: 1000;
      transition: background .3s var(--ease);
    }

    nav.scrolled {
      background: rgba(0, 0, 0, .85);
    }

    .nav-content {
      max-width: 1200px;
      margin: 0 auto;
      padding: 1rem 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: .75rem;
      text-decoration: none;
      color: var(--text);
      font-weight: 600;
      font-size: 1.1rem;
      transition: transform .3s var(--ease);
    }

    .logo:hover {
      transform: translateY(-1px);
    }

    .logo img {
      width: 40px;
      height: 40px;
      border-radius: 10px;
    }

    .nav-links {
      display: flex;
      gap: .5rem;
      list-style: none;
    }

    .nav-links a {
      color: var(--muted);
      text-decoration: none;
      padding: .65rem 1rem;
      border-radius: 10px;
      font-size: .95rem;
      font-weight: 500;
      transition: all .3s var(--ease);
      position: relative;
    }

    .nav-links a:hover {
      color: var(--text);
      background: rgba(255, 255, 255, .06);
    }

    .nav-links a.active {
      color: #fff;
      background: var(--accent);
    }

    .main {
      max-width: 1200px;
      margin: 0 auto;
      padding: 3rem 2rem;
      display: grid;
      grid-template-columns: 280px 1fr 380px;
      gap: 2rem;
      position: relative;
    }

    .sidebar {
      background: var(--card);
      backdrop-filter: blur(40px) saturate(180%);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 1.5rem;
      height: fit-content;
    }

    .sidebar-title {
      font-size: 1.2rem;
      font-weight: 700;
      margin-bottom: 1.5rem;
      display: flex;
      align-items: center;
      gap: .75rem;
    }

    .sidebar-title i {
      color: var(--accent);
    }

    .sidebar-tabs {
      display: flex;
      flex-direction: column;
      gap: .5rem;
    }

    .sidebar-tab {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 1rem 1.25rem;
      color: var(--text-secondary);
      text-decoration: none;
      border-radius: 14px;
      font-weight: 500;
      transition: all .3s var(--ease);
      cursor: pointer;
      border: none;
      background: none;
      text-align: left;
    }

    .sidebar-tab:hover {
      background: rgba(255, 255, 255, .05);
      color: var(--text);
    }

    .sidebar-tab.active {
      background: var(--accent);
      color: white;
    }

    .sidebar-tab i {
      width: 20px;
      text-align: center;
      font-size: 1.1rem;
    }

    .editor-panel {
      background: var(--card);
      backdrop-filter: blur(40px) saturate(180%);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 2rem;
      height: fit-content;
    }

    .tab-content {
      display: none;
    }

    .tab-content.active {
      display: block;
      animation: fadeIn .3s var(--ease);
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .section {
      margin-bottom: 2.5rem;
    }

    .section:last-child {
      margin-bottom: 0;
    }

    .section-title {
      font-size: 1.1rem;
      font-weight: 700;
      margin-bottom: 1.5rem;
      display: flex;
      align-items: center;
      gap: .75rem;
    }

    .section-title i {
      color: var(--accent);
      font-size: 1rem;
    }

    .form-group {
      margin-bottom: 1.5rem;
    }

    .form-group:last-child {
      margin-bottom: 0;
    }

    label {
      display: block;
      font-size: .9rem;
      font-weight: 500;
      color: var(--muted);
      margin-bottom: .75rem;
    }

    input[type="text"],
    input[type="url"],
    input[type="color"],
    textarea {
      width: 100%;
      background: rgba(255, 255, 255, .04);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1rem;
      color: var(--text);
      font-size: .95rem;
      font-family: inherit;
      transition: all .3s var(--ease);
    }

    input[type="text"]:focus,
    input[type="url"]:focus,
    textarea:focus {
      outline: none;
      border-color: var(--accent);
      background: rgba(255, 255, 255, .06);
      box-shadow: 0 0 0 4px rgba(0, 122, 255, .1);
    }

    textarea {
      resize: vertical;
      min-height: 120px;
      font-family: inherit;
      line-height: 1.5;
    }

    input[type="color"] {
      height: 56px;
      cursor: pointer;
      padding: .5rem;
    }

    input[type="color"]::-webkit-color-swatch-wrapper {
      padding: 4px;
    }

    input[type="color"]::-webkit-color-swatch {
      border: none;
      border-radius: 8px;
    }

    .color-presets {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: .75rem;
      margin-top: 1rem;
    }

    .color-preset {
      aspect-ratio: 1;
      border-radius: 10px;
      cursor: pointer;
      border: 2px solid transparent;
      transition: all .2s var(--spring);
    }

    .color-preset:hover {
      transform: scale(1.1);
      border-color: rgba(255, 255, 255, .3);
    }

    .add-item-btn {
      width: 100%;
      padding: 1.25rem;
      background: rgba(255, 255, 255, .05);
      border: 2px dashed var(--border);
      border-radius: 14px;
      color: var(--text-secondary);
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: all .3s var(--ease);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .75rem;
      margin-top: 1rem;
    }

    .add-item-btn:hover {
      background: rgba(255, 255, 255, .08);
      border-color: var(--accent);
      color: var(--accent);
    }

    .item-list {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .item-card {
      background: rgba(255, 255, 255, .04);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1.5rem;
      position: relative;
      transition: all .3s var(--ease);
    }

    .item-card:hover {
      border-color: rgba(255, 255, 255, .15);
      background: rgba(255, 255, 255, .06);
    }

    .item-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1.25rem;
    }

    .item-title {
      font-size: .95rem;
      font-weight: 700;
      color: var(--text);
    }

    .item-remove {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      background: #ff3b30;
      color: white;
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all .2s var(--spring);
    }

    .item-remove:hover {
      background: #cc0000;
      transform: scale(1.1);
    }

    .inline-toggle {
      display: flex;
      align-items: center;
      gap: .75rem;
      margin-top: 1rem;
    }

    .toggle {
      position: relative;
      width: 52px;
      height: 32px;
      background: rgba(255, 255, 255, .1);
      border-radius: 16px;
      cursor: pointer;
      transition: background .3s var(--ease);
    }

    .toggle.active {
      background: #34c759;
    }

    .toggle-handle {
      position: absolute;
      top: 3px;
      left: 3px;
      width: 26px;
      height: 26px;
      background: white;
      border-radius: 50%;
      transition: transform .3s var(--spring);
    }

    .toggle.active .toggle-handle {
      transform: translateX(20px);
    }

    .style-selector {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: .75rem;
    }

    .style-option {
      padding: .75rem;
      border-radius: 10px;
      border: 2px solid transparent;
      cursor: pointer;
      text-align: center;
      font-size: .85rem;
      font-weight: 600;
      transition: all .2s var(--spring);
    }

    .style-option.blurple { background: #5865f2; color: white; }
    .style-option.green { background: #3ba55d; color: white; }
    .style-option.gray { background: #4f545c; color: white; }
    .style-option.red { background: #ed4245; color: white; }
    
    .style-option.active {
      border-color: white;
      transform: scale(1.05);
      box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    }

    .preview-panel {
      position: sticky;
      top: 100px;
      height: fit-content;
    }

    .preview-container {
      background: var(--card);
      backdrop-filter: blur(40px) saturate(180%);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 2rem;
      margin-bottom: 2rem;
    }

    .preview-title {
      font-size: 1.2rem;
      font-weight: 700;
      margin-bottom: 1.5rem;
      display: flex;
      align-items: center;
      gap: .75rem;
    }

    .preview-title i {
      color: var(--accent);
    }

    .discord-embed {
      background: #2b2d31;
      border-left: 4px solid var(--accent);
      border-radius: 4px;
      padding: 1rem;
      font-family: 'Whitney', 'Helvetica Neue', sans-serif;
    }

    .embed-author {
      display: flex;
      align-items: center;
      gap: .5rem;
      margin-bottom: .5rem;
      font-size: .875rem;
      font-weight: 600;
    }

    .embed-author-icon {
      width: 20px;
      height: 20px;
      border-radius: 50%;
    }

    .embed-title {
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: .5rem;
      color: #00b0f4;
    }

    .embed-title a {
      color: inherit;
      text-decoration: none;
    }

    .embed-title a:hover {
      text-decoration: underline;
    }

    .embed-description {
      font-size: .875rem;
      color: #dcddde;
      white-space: pre-wrap;
      line-height: 1.4;
      margin-bottom: 1rem;
    }

    .embed-fields {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: .75rem;
      margin-bottom: 1rem;
    }

    .embed-field {
      font-size: .875rem;
    }

    .embed-field-name {
      font-weight: 600;
      color: #fff;
      margin-bottom: .25rem;
    }

    .embed-field-value {
      color: #dcddde;
    }

    .embed-image {
      max-width: 100%;
      border-radius: 4px;
      margin-bottom: 1rem;
    }

    .embed-thumbnail {
      float: right;
      max-width: 80px;
      max-height: 80px;
      border-radius: 4px;
      margin-left: 1rem;
      margin-bottom: .5rem;
    }

    .embed-footer {
      display: flex;
      align-items: center;
      gap: .5rem;
      font-size: .75rem;
      color: #99aab5;
      margin-top: 1rem;
      padding-top: .5rem;
      border-top: 1px solid rgba(255, 255, 255, .1);
    }

    .embed-footer-icon {
      width: 16px;
      height: 16px;
      border-radius: 50%;
    }

    .export-section {
      background: rgba(0, 122, 255, .1);
      border: 1px solid rgba(0, 122, 255, .2);
      border-radius: 20px;
      padding: 2rem;
    }

    .export-title {
      font-size: 1.1rem;
      font-weight: 700;
      margin-bottom: 1.5rem;
      display: flex;
      align-items: center;
      gap: .75rem;
    }

    .export-title i {
      color: var(--accent);
    }

    .export-actions {
      display: flex;
      gap: 1rem;
      margin-bottom: 1.5rem;
    }

    .export-btn {
      flex: 1;
      padding: 1rem 1.5rem;
      border-radius: 14px;
      border: none;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: all .3s var(--ease);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .75rem;
    }

    .export-btn.primary {
      background: var(--accent);
      color: white;
    }

    .export-btn.primary:hover {
      background: #0066cc;
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(0, 122, 255, .3);
    }

    .export-btn.secondary {
      background: rgba(255, 255, 255, .08);
      color: var(--text);
    }

    .export-btn.secondary:hover {
      background: rgba(255, 255, 255, .12);
      transform: translateY(-2px);
    }

    .code-preview {
      background: rgba(0, 0, 0, .3);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1.5rem;
      font-family: 'Monaco', 'Courier New', monospace;
      font-size: .85rem;
      line-height: 1.5;
      max-height: 300px;
      overflow-y: auto;
      white-space: pre-wrap;
      word-break: break-all;
    }

    .code-preview .json-key { color: #ff7b72; }
    .code-preview .json-string { color: #79c0ff; }
    .code-preview .json-number { color: #a5d6ff; }
    .code-preview .json-boolean { color: #ffa657; }

    footer {
      margin-top: 6rem;
      padding: 3rem 2rem;
      border-top: 1px solid var(--border);
      background: rgba(255, 255, 255, .02);
    }

    .footer-content {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      gap: 3rem;
    }

    .footer-section {
      flex: 1;
    }

    .footer-logo {
      display: flex;
      align-items: center;
      gap: .75rem;
      margin-bottom: .75rem;
    }

    .footer-logo img {
      width: 50px;
      height: 50px;
      border-radius: 12px;
    }

    .footer-logo span {
      font-size: 1.3rem;
      font-weight: 600;
    }

    .footer-by {
      color: var(--muted);
      font-size: .9rem;
      margin-bottom: 1rem;
    }

    .footer-heading {
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: 1rem;
      color: rgba(255, 255, 255, .6);
    }

    .footer-links {
      display: flex;
      flex-direction: column;
      gap: .5rem;
    }

    .footer-links a {
      color: var(--muted);
      text-decoration: none;
      font-size: .95rem;
      transition: color .3s var(--ease);
      display: flex;
      align-items: center;
      gap: .5rem;
    }

    .footer-links a:hover {
      color: var(--text);
    }

    .footer-links i {
      width: 16px;
      font-size: .85rem;
    }

    .footer-bottom {
      text-align: center;
      margin-top: 2rem;
      padding-top: 2rem;
      border-top: 1px solid var(--border);
      color: var(--muted);
      font-size: .9rem;
    }

    @media (max-width: 1200px) {
      .main {
        grid-template-columns: 1fr;
        gap: 2rem;
      }
      
      .preview-panel {
        position: static;
      }
      
      .sidebar-tabs {
        flex-direction: row;
        flex-wrap: wrap;
      }
      
      .sidebar-tab {
        flex: 1;
        min-width: 140px;
        justify-content: center;
      }
    }

    @media (max-width: 768px) {
      .nav-content {
        flex-direction: column;
        gap: 1rem;
      }
      
      .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
      }
      
      .main {
        padding: 2rem 1rem;
      }
      
      .sidebar, .editor-panel, .preview-container {
        padding: 1.5rem;
      }
      
      .export-actions {
        flex-direction: column;
      }
      
      .footer-content {
        flex-direction: column;
        text-align: center;
      }
    }