  :root {
      --bg: #f5f5f7;
      --card: #ffffff;
      --primary: #0071e3;
      --success: #0071e3;
      --text: #1d1d1f;
      --text-light: #86868b;
      --radius: 24px;
  }

  body {
      font-family: 'Plus Jakarta Sans', sans-serif;
      background-color: var(--bg);
      color: var(--text);
      margin: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
  }

  .container {
      width: 90%;
      max-width: 650px;
      background: var(--card);
      padding: 40px;
      border-radius: 32px;
      /* box-shadow: 0 20px 60px rgba(0,0,0,0.08); */
      border: 1px solid #e5e5e7;
      text-align: center;
  }

  header {
      margin-bottom: 32px;
  }

  h1 {
      font-weight: 600;
      font-size: 2.2rem;
      margin: 0;
      letter-spacing: -1px;
  }

  p {
      color: var(--text-light);
      margin-top: 8px;
      font-size: 1rem;
  }

  /* Workspace Layout */
  .workspace {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
      margin-bottom: 32px;
  }

  .canvas-box {
      background: #fbfbfd;
      border-radius: var(--radius);
      aspect-ratio: 1/1;
      position: relative;
      border: 1px solid #e5e5e7;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  /* PDF Preview Canvas */
  #pdf-preview {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      z-index: 2;
      display: none;
  }

  .placeholder-text {
      font-size: 2.5rem;
      font-weight: 800;
      color: #e5e5e7;
      letter-spacing: 2px;
      position: absolute;
      z-index: 1;
  }

  /* Labels */
  .label {
      position: absolute;
      top: 16px;
      left: 16px;
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(8px);
      padding: 5px 12px;
      border-radius: 10px;
      font-size: 0.7rem;
      font-weight: 700;
      color: var(--text-light);
      z-index: 3;
      border: 1px solid rgba(0, 0, 0, 0.05);
  }

  /* Result Icons */
  #success-icon {
      display: none;
      flex-direction: column;
      align-items: center;
      color: var(--success);
      z-index: 5;
  }

  /* Loading State */
  #magic-loader {
      display: none;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      z-index: 4;
  }

  .spinner {
      width: 35px;
      height: 35px;
      border: 4px solid #e5e5e7;
      border-top: 4px solid var(--primary);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
  }

  @keyframes spin {
      100% {
          transform: rotate(360deg);
      }
  }

  /* Controls */
  .controls {
      display: flex;
      justify-content: center;
      gap: 12px;
  }

  .btn {
      flex: 1;
      padding: 16px 24px;
      border-radius: 16px;
      border: none;
      font-family: inherit;
      font-weight: 600;
      font-size: 1rem;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .btn-upload {
      background: #f2f2f7;
      color: var(--text);
      position: relative;
  }

  .btn-upload:hover {
      background: #e5e5ea;
  }

  .btn-upload input {
      position: absolute;
      opacity: 0;
      width: 100%;
      height: 100%;
      cursor: pointer;
  }

  .btn-primary {
      background: var(--primary);
      color: white;
      display: flex;
  }

  .btn-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 20px rgba(0, 113, 227, 0.25);
  }

  .btn-primary:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
  }

  .btn-download {
      background: var(--success);
      color: white;
      display: none;
  }

  .btn-download:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 20px rgba(0, 113, 227, 0.25);
  }

  @media (max-width: 600px) {
      .workspace {
          grid-template-columns: 1fr;
      }

      .controls {
          flex-direction: column;
      }

      .container {
          width: 100%;
          padding: 24px 16px;
          border-radius: 24px;
      }

      .canvas-box {
          aspect-ratio: 4/3;
      }
  }

  @media (max-width: 600px) {
      body {
          padding: 16px;
          align-items: flex-start;
          /* Better for long content on mobile */
      }

      .container {
          width: 100%;
          padding: 24px 16px;
          border-radius: 24px;
      }

      h1 {
          font-size: 1.5rem;
      }

      .workspace {
          grid-template-columns: 1fr;
          gap: 16px;
          margin-bottom: 24px;
      }

      .canvas-box {
          aspect-ratio: 4/2.5;
          /* Slightly shorter to fit both on one screen view */
      }

      .controls {
          flex-direction: column;
          width: 100%;
          gap: 10px;
      }

      .btn {
          width: 100%;
          padding: 16px;
          /* Larger hit area for fingers */
      }

      p {
          font-size: 0.7rem;
      }
  }