:root {
  --bg: #F0F7F5;
  --card: #FFFFFF;
  --ink: #0F2A2E;
  --muted: #5A7A80;
  --accent: #0D9488;
  --accent-soft: #0D94881a;
  --accent-hover: #0F766E;
  --accent-blue: #0284C7;
  --accent-green: #10B981;
  --border: #C5DED9;
  --danger: #D64545;
  --shadow-sm: 0 3px 10px rgba(15, 42, 46, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 148, 136, 0.16);
  --radius: 16px;
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 12% 0%, #0D948814, transparent 42%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
}

/* Ripple tap feedback — dipasang otomatis lewat JS (lihat app.js addRippleTo) */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.28;
  transform: scale(0);
  animation: rippleAnim 0.5s ease-out;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(2.6); opacity: 0; }
}

.screen { display: none; min-height: 100vh; padding-bottom: 40px; }
.screen.active { display: block; }

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  max-width: 720px;
  margin: 0 auto;
}
.hamburger {
  width: 40px; height: 40px; border: none; background: transparent;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  cursor: pointer; padding: 0; border-radius: 10px;
  transition: background 0.15s ease, transform 0.12s ease;
}
.hamburger:hover { background: rgba(13, 148, 136, 0.08); }
.hamburger:active { transform: scale(0.92); background: rgba(13, 148, 136, 0.14); }
.hamburger span { display: block; width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: background 0.15s ease; }
.by-dasker {
  font-family: 'Poppins', Inter, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding-left: 10px;
}
.by-dasker::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 46px;
  line-height: 1.18;
  margin: 32px auto 40px;
  padding: 0 24px;
  max-width: 720px;
  text-align: center;
  /* fixed block so typing animation tidak geser menu */
  min-height: 2.5em;
  height: 2.5em;
  overflow: hidden;
}
.wave { display: inline-block; }

.tool-list {
  max-width: 720px; margin: 0 auto; padding: 0 20px;
  display: flex; flex-direction: column; gap: 12px;
}

.tool-tile {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.18s ease,
              border-color 0.18s ease,
              background 0.18s ease;
}
.tool-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #9ECFC8;
}
.tool-tile:active {
  transform: scale(0.985) translateY(0);
  box-shadow: var(--shadow-sm);
  background: #FAFFFE;
}
.tool-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tile-icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.tile-icon--tiktok { background: #1A1A1A; color: #fff; }
.tile-icon--youtube { background: #FF0000; color: #fff; }
.tile-icon--instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.tile-icon--emoji { background: #D1FAE5; }
.tile-icon--iqc { background: #E0F2FE; }

.tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.tile-desc { font-size: 12px; color: var(--muted); }
.tile-chevron { font-size: 22px; color: var(--muted); }

.tool-topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 16px 8px; max-width: 720px; margin: 0 auto;
}
.back-btn {
  width: 40px; height: 40px; border: none; background: transparent;
  font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink);
  border-radius: 10px;
  transition: background 0.15s ease, transform 0.12s ease;
}
.back-btn:hover { background: rgba(13, 148, 136, 0.08); }
.back-btn:active { transform: scale(0.92); background: rgba(13, 148, 136, 0.14); }
.tool-topbar-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; }

.tool-body { max-width: 680px; margin: 0 auto; padding: 8px 24px 48px; }
.tool-desc { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.field-label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--ink);
}

.input-row {
  display: flex; gap: 8px; margin-bottom: 14px; align-items: stretch;
}
.input-row .field-input { flex: 1; margin-bottom: 0; }
.field-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  margin-bottom: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.btn-paste {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.btn-paste:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }
.btn-paste:active { transform: scale(0.96); }

.btn-primary {
  width: 100%;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease, opacity 0.15s ease;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.25);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.32);
}
.btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 1px 6px rgba(13, 148, 136, 0.2);
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; transform: none; }

.radio-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.radio-pill {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--card);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 13px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.radio-pill:hover { border-color: var(--accent); background: var(--accent-soft); }
.radio-pill:active { transform: scale(0.97); }
.radio-pill input { accent-color: var(--accent); }

.emoji-row {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 14px;
}
.emoji-slot { position: relative; }
.emoji-input {
  width: 72px; height: 72px; text-align: center; font-size: 32px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--card);
  outline: none; padding: 0;
}
.emoji-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.emoji-input::placeholder { opacity: 0.35; }
.emoji-clear {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card);
  color: var(--muted); font-size: 14px; line-height: 1;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  padding: 0;
}
.emoji-slot:has(.emoji-input:not(:placeholder-shown)) .emoji-clear,
.emoji-slot.has-value .emoji-clear { display: flex; }
.plus { font-size: 22px; color: var(--muted); font-weight: 600; }

.result {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.result.loading {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 14px;
}
.result.error { color: var(--danger); font-size: 14px; }
.result img, .result video {
  max-width: 100%; border-radius: 12px; display: block; margin-bottom: 12px;
}
.result video { width: 100%; background: #000; }

.download-link {
  display: inline-flex; align-items: center;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  margin-right: 8px; margin-bottom: 8px;
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.download-link:hover { background: #0D948826; }
.download-link:active { transform: scale(0.97); }

/* Spinner */
.spinner {
  width: 20px; height: 20px; flex-shrink: 0;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.loading-dots span {
  animation: blink 1.2s infinite both;
  opacity: 0.25;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

.ad-slot {
  max-width: 320px;
  width: 100%;
  margin: 24px auto 0;
  min-height: 250px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.site-footer {
  max-width: 720px; margin: 0 auto; padding: 24px 24px 8px;
  color: var(--muted); font-size: 11px; text-align: center;
}

.drawer-overlay {
  position: fixed; inset: 0; background: #00000055;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 20;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
  background: var(--card); z-index: 30;
  transform: translateX(-100%); transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 20px; display: flex; flex-direction: column; gap: 4px;
  box-shadow: 8px 0 32px rgba(15, 42, 46, 0.12);
}
.drawer.open { transform: translateX(0); }

.drawer-close {
  align-self: flex-end; width: 32px; height: 32px; border: none;
  background: var(--bg); border-radius: 50%; font-size: 15px; cursor: pointer; margin-bottom: 8px;
  transition: background 0.15s ease, transform 0.12s ease;
}
.drawer-close:hover { background: #D6EBE6; }
.drawer-close:active { transform: scale(0.9); }

.drawer-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px 16px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  border-bottom: 1px solid var(--border); margin-bottom: 8px;
}

.drawer-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background 0.15s ease, transform 0.12s ease;
}
.drawer-item:hover { background: var(--bg); }
.drawer-item:active { transform: scale(0.98); background: #E5F0ED; }
.drawer-icon { font-size: 18px; width: 22px; text-align: center; }
.drawer-icon--dollar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #16a34a; color: #fff;
  font-size: 13px; font-weight: 800; line-height: 1;
}

@media (max-width: 480px) {
  .headline { font-size: 36px; min-height: 2.6em; height: 2.6em; margin: 24px auto 32px; }
  .tool-body { padding: 8px 16px 48px; }
}

.tile-icon--v2a { background: #CCFBF1; }

button.download-link {
  border: none;
  cursor: pointer;
  font-family: inherit;
}
button.download-link:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

video::-webkit-media-controls-download-button {
  display: none !important;
}
video::-internal-media-controls-download-button {
  display: none !important;
}

.download-link--hd {
  background: #CCFBF1 !important;
  color: #0F766E !important;
}

.ad-gate-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: #00000088;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.ad-gate-card {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}
.ad-gate-card h3 { margin: 0 0 8px; font-family: var(--font-display); }
.ad-gate-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.ad-gate-ad {
  min-height: 120px;
  margin-bottom: 12px;
  display: flex; justify-content: center;
}
.ad-gate-progress {
  height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin-bottom: 8px;
}
.ad-gate-bar {
  height: 100%; width: 0; background: var(--accent); transition: width 0.3s linear;
}
.ad-gate-timer { font-size: 12px; font-weight: 600; color: var(--ink) !important; }

/* Splash */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: #E8F4F1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.splash-hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; box-shadow: 0 8px 28px #00000018;
}
.splash-text {
  font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 0;
}
.splash-bar {
  width: 140px; height: 4px; background: var(--border); border-radius: 99px; overflow: hidden;
}
.splash-bar-fill {
  height: 100%; width: 0; background: var(--accent);
  animation: splashLoad 5s linear forwards;
}
@keyframes splashLoad { to { width: 100%; } }

.typed-cursor {
  display: inline-block; margin-left: 2px;
  animation: blinkCursor 0.9s step-end infinite;
  color: var(--accent-blue); font-weight: 400;
}
@keyframes blinkCursor { 50% { opacity: 0; } }
#typed-welcome { white-space: pre-line; }

.drawer-item-btn {
  border: none; background: transparent; width: 100%; cursor: pointer; text-align: left;
  font-family: inherit;
}
.drawer-item-btn:hover { background: var(--bg); }

/* Official-ish brand icon tiles */
.tile-icon--tiktok { background: #000000; }
.tile-icon--youtube { background: #FF0000; }
.tile-icon--instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.tile-icon svg { display: block; }

/* Social bar: keep near top after load (Adsterra injects its own node) */
body.has-social-bar {
  /* slight top padding so content not fully covered; bar stays top-ish */
  padding-top: 0;
}

.download-link--hd {
  background: #CCFBF1 !important;
  color: #0F766E !important;
  display: block;
  width: 100%;
  margin-bottom: 8px;
  text-align: center;
}
button.download-link {
  border: none; cursor: pointer; font-family: inherit;
  display: block; width: 100%; margin-bottom: 8px; text-align: center;
  transition: background 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
}
button.download-link:active { transform: scale(0.98); }
button.download-link:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ad-slot sizing handled in main rule above */
