:root {
      --bg: #0f0f10;
      --surface: #18181a;
      --card: #222224;
      --border: rgba(255,255,255,0.08);
      --text: #f0f0f2;
      --text-2: #a0a0aa;
      --text-3: #60606a;
      --accent: #c084fc;
      --accent-2: #818cf8;
      --accent-grad: linear-gradient(135deg, #c084fc, #818cf8);
      --red: #f87171;
      --green: #4ade80;
    }
    * { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 36px 16px 80px;
      overflow-x: hidden;
    }

    /* ── Floating deco ── */
    .deco {
      position: fixed;
      pointer-events: none;
      user-select: none;
      font-size: 22px;
      opacity: 0.18;
      animation: floatDeco linear infinite;
    }
    .deco-one { top:8%; left:6%; animation-duration:5s; }
    .deco-two { top:14%; right:8%; animation-duration:7s; animation-delay:1s; }
    .deco-three { top:55%; left:3%; animation-duration:6s; animation-delay:2s; }
    .deco-four { top:70%; right:5%; animation-duration:8s; animation-delay:0.5s; }
    @keyframes floatDeco {
      0%   { transform: translateY(0) rotate(0deg); }
      50%  { transform: translateY(-18px) rotate(10deg); }
      100% { transform: translateY(0) rotate(0deg); }
    }

    /* ── Hero ── */
    .hero { text-align: center; margin-bottom: 28px; position: relative; }
    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 14px;
      background: rgba(192,132,252,0.12);
      border: 1px solid rgba(192,132,252,0.25);
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
      color: var(--accent);
      margin-bottom: 18px;
    }
    .hero h1 {
      font-size: 30px;
      font-weight: 900;
      letter-spacing: -1px;
      margin-bottom: 10px;
      line-height: 1.15;
    }
    .hero h1 .grad { background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .hero p { font-size: 14px; color: var(--text-2); line-height: 1.65; max-width: 320px; margin: 0 auto; }

    /* ── Card ── */
    .card {
      width: 100%;
      max-width: 420px;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 22px;
      padding: 22px 20px;
    }

    /* ── Tabs ── */
    .tabs {
      display: flex;
      background: var(--surface);
      border-radius: 14px;
      padding: 4px;
      margin-bottom: 20px;
      gap: 4px;
    }
    .tab-btn {
      flex: 1;
      padding: 9px 8px;
      border-radius: 11px;
      border: none;
      background: transparent;
      color: var(--text-2);
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
    }
    .tab-btn.active {
      background: var(--accent-grad);
      color: #fff;
      box-shadow: 0 2px 12px rgba(192,132,252,0.3);
    }

    /* ── Form fields ── */
    .form-group { margin-bottom: 12px; }
    .form-label {
      display: block;
      font-size: 11px;
      font-weight: 700;
      color: var(--text-3);
      text-transform: uppercase;
      letter-spacing: 0.6px;
      margin-bottom: 6px;
    }
    .input-field {
      width: 100%;
      padding: 11px 14px;
      background: var(--surface);
      border: 1.5px solid var(--border);
      border-radius: 11px;
      color: var(--text);
      font-family: inherit;
      font-size: 14px;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .input-field:focus {
      border-color: rgba(192,132,252,0.5);
      box-shadow: 0 0 0 3px rgba(192,132,252,0.08);
    }
    .input-field::placeholder { color: var(--text-3); }
    .input-hint {
      font-size: 11px;
      color: var(--text-3);
      margin-top: 5px;
      line-height: 1.5;
    }
    .form-subtle { color:var(--text-3); font-weight:400; text-transform:none; letter-spacing:0; }
    .is-hidden { display:none; }

    /* ── Button ── */
    .btn-primary {
      width: 100%;
      padding: 12px;
      border: none;
      border-radius: 12px;
      background: var(--accent-grad);
      color: #fff;
      font-family: inherit;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      margin-top: 4px;
      transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      box-shadow: 0 4px 16px rgba(192,132,252,0.25);
    }
    .btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
    .btn-primary:not(:disabled):active { transform: scale(0.97); }

    /* ── Alert ── */
    .alert {
      padding: 9px 12px;
      border-radius: 10px;
      font-size: 12px;
      margin-top: 10px;
      display: none;
      line-height: 1.45;
      font-weight: 500;
    }
    .alert.error { background: rgba(248,113,113,0.1); color: var(--red); display: block; border: 1px solid rgba(248,113,113,0.2); }
    .alert.success { background: rgba(74,222,128,0.1); color: var(--green); display: block; border: 1px solid rgba(74,222,128,0.2); }

    /* ── Success card ── */
    .success-card {
      width: 100%;
      max-width: 420px;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 22px;
      padding: 28px 20px;
      text-align: center;
      display: none;
    }
    .success-card.show { display: block; animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1); }
    @keyframes popIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

    .success-emoji { font-size: 44px; margin-bottom: 14px; display: block; }
    .success-card h2 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
    .success-card p { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 20px; }
    .link-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 11px;
      padding: 11px 14px;
      font-size: 13px;
      color: var(--accent);
      font-family: 'SF Mono','Consolas',monospace;
      margin-bottom: 12px;
      word-break: break-all;
      text-align: left;
    }
    .btn-row { display: flex; gap: 8px; flex-direction: column; }
    .btn-copy-big {
      width: 100%;
      padding: 11px;
      border: none;
      border-radius: 11px;
      background: var(--accent-grad);
      color: #fff;
      font-family: inherit;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: opacity 0.2s;
      box-shadow: 0 4px 16px rgba(192,132,252,0.25);
    }
    .btn-inbox-link {
      display: block;
      width: 100%;
      padding: 11px;
      border-radius: 11px;
      border: 1.5px solid var(--border);
      background: transparent;
      color: var(--text-2);
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      text-align: center;
      text-decoration: none;
      transition: background 0.15s;
    }
    .btn-inbox-link:hover { background: var(--surface); }

    /* ── Spinner ── */
    .spinner { width:15px; height:15px; border:2px solid rgba(255,255,255,0.3); border-top-color:#fff; border-radius:50%; animation:spin 0.7s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── Preview URL badge ── */
    #previewUrl {
      background: rgba(192,132,252,0.12);
      color: var(--accent);
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 11px;
    }
