    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    :root {
      --bg: #0f172a;
      --panel: rgba(255,255,255,0.08);
      --border: rgba(255,255,255,0.12);
      --text: #ffffff;
      --muted: #94a3b8;
      --accent: #7c3aed;
      --accent-2: #06b6d4;
      --shadow: 0 20px 60px rgba(0,0,0,0.45);
      --radius: 24px;
    }

    body {
      font-family: "Inter", sans-serif;
      min-height: 100vh;
      background:
        radial-gradient(circle at top left, #312e81 0%, transparent 30%),
        radial-gradient(circle at bottom right, #0f766e 0%, transparent 30%),
        var(--bg);
      color: var(--text);
      padding: 32px;
      overflow-x: hidden;
    }

    .app {
      max-width: 1400px;
      margin: auto;
    }

    /* HEADER */

    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 40px;
      gap: 20px;
    }

    .logo {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .logo h1 {
      font-size: clamp(2rem, 4vw, 3.5rem);
      font-weight: 800;
      letter-spacing: -2px;
      background: linear-gradient(90deg, #fff, #94a3b8);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .logo p {
      color: var(--muted);
      font-size: 0.95rem;
    }

    .menu-btn {
      text-decoration: none;
      color: white;
      padding: 14px 20px;
      border-radius: 14px;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      font-weight: 600;
      transition: 0.3s ease;
      box-shadow: 0 10px 30px rgba(124,58,237,0.35);
    }

    .menu-btn:hover {
      transform: translateY(-2px);
    }

    /* LAYOUT */

    .grid {
      display: grid;
      grid-template-columns: 420px 1fr;
      gap: 30px;
    }

    /* PANEL */

    .panel {
      background: var(--panel);
      border: 1px solid var(--border);
      backdrop-filter: blur(18px);
      border-radius: var(--radius);
      padding: 24px;
      box-shadow: var(--shadow);
    }

    .panel-title {
      font-size: 1.1rem;
      font-weight: 700;
      margin-bottom: 24px;
    }

    /* FORM */

    .form-group {
      margin-bottom: 18px;
    }

    label {
      display: block;
      margin-bottom: 10px;
      font-size: 0.9rem;
      color: #e2e8f0;
      font-weight: 600;
    }

    textarea,
    input[type="file"] {
      width: 100%;
      border: 1px solid rgba(255,255,255,0.1);
      background: rgba(255,255,255,0.06);
      color: white;
      border-radius: 16px;
      padding: 14px;
      font-family: inherit;
      outline: none;
      transition: 0.25s ease;
    }

    textarea:focus,
    input[type="file"]:focus {
      border-color: var(--accent-2);
      box-shadow: 0 0 0 4px rgba(6,182,212,0.15);
    }

    textarea {
      resize: vertical;
      min-height: 100px;
    }

    .color-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }

    .color-picker {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    input[type="color"] {
      width: 100%;
      height: 55px;
      border: none;
      border-radius: 14px;
      background: transparent;
      cursor: pointer;
    }

    .generate-btn {
      width: 100%;
      margin-top: 10px;
      border: none;
      padding: 18px;
      border-radius: 18px;
      font-size: 1rem;
      font-weight: 700;
      color: white;
      cursor: pointer;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      transition: 0.3s ease;
      box-shadow: 0 12px 40px rgba(124,58,237,0.35);
    }

    .generate-btn:hover {
      transform: translateY(-3px) scale(1.01);
    }

    /* PREVIEW */

    .preview-wrapper {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 700px;
    }

    .card-scene {
      perspective: 1500px;
    }

    .flip-card {
      width: 340px;
      height: 500px;
      position: relative;
      transform-style: preserve-3d;
      transition: transform 0.9s cubic-bezier(.4,.2,.2,1);
      cursor: pointer;
    }

    .flip-card.flipped {
      transform: rotateY(180deg);
    }

    .card-face {
      position: absolute;
      inset: 0;
      border-radius: 28px;
      overflow: hidden;
      backface-visibility: hidden;
      box-shadow: 0 25px 80px rgba(0,0,0,0.5);
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      padding: 30px;
    }

    .card-front {
      background: linear-gradient(135deg, #ffffff, #dbeafe);
      color: #0f172a;
    }

    .card-back {
      transform: rotateY(180deg);
      background: linear-gradient(135deg, #7c3aed, #06b6d4);
      color: white;
      justify-content: center;
      align-items: center;
      text-align: center;
    }

    .card-image {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0.95;
    }

    .overlay {
      position: absolute;
      inset: 0;
      background:
        linear-gradient(
          to top,
          rgba(15,23,42,0.95) 10%,
          rgba(15,23,42,0.2) 60%,
          rgba(15,23,42,0)
        );
    }

    .front-content {
      position: relative;
      z-index: 2;
    }

    .front-content h2,
    .card-back h2 {
      font-size: 2rem;
      font-weight: 800;
      line-height: 1.1;
      margin-bottom: 10px;
    }

    .card-back p,
    .front-content p {
      font-size: 1rem;
      line-height: 1.6;
      opacity: 0.95;
    }

    .flip-hint {
      position: absolute;
      top: 20px;
      right: 20px;
      padding: 8px 14px;
      border-radius: 999px;
      background: rgba(255,255,255,0.15);
      backdrop-filter: blur(10px);
      font-size: 0.8rem;
      font-weight: 600;
      color: white;
      z-index: 5;
    }

    /* CODE AREA */

    .code-section {
      margin-top: 30px;
    }

    .tabs {
      display: flex;
      gap: 10px;
      margin-bottom: 18px;
    }

    .tab {
      border: none;
      background: rgba(255,255,255,0.08);
      color: white;
      padding: 12px 18px;
      border-radius: 12px;
      cursor: pointer;
      font-weight: 600;
      transition: 0.25s ease;
    }

    .tab.active {
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
    }

    .code-block {
      display: none;
      background: #020617;
      border-radius: 20px;
      padding: 24px;
      overflow-x: auto;
      border: 1px solid rgba(255,255,255,0.08);
    }

    .code-block.active {
      display: block;
    }

    pre {
      color: #cbd5e1;
      font-size: 0.92rem;
      line-height: 1.6;
      white-space: pre-wrap;
    }

    .copy-row {
      display: flex;
      gap: 14px;
      margin-top: 20px;
    }

    .copy-btn {
      flex: 1;
      border: none;
      padding: 15px;
      border-radius: 16px;
      cursor: pointer;
      font-weight: 700;
      color: white;
      background: rgba(255,255,255,0.08);
      transition: 0.25s ease;
    }

    .copy-btn:hover {
      background: rgba(255,255,255,0.14);
    }

    /* RESPONSIVE */

    @media (max-width: 980px) {
      .grid {
        grid-template-columns: 1fr;
      }

      .preview-wrapper {
        min-height: auto;
      }
    }

    @media (max-width: 640px) {
      body {
        padding: 20px;
      }

      .topbar {
        flex-direction: column;
        align-items: flex-start;
      }

      .flip-card {
        width: 300px;
        height: 450px;
      }

      .color-grid {
        grid-template-columns: 1fr;
      }

      .copy-row {
        flex-direction: column;
      }
    }