/* ===================================================
   SCREENSHOT GENERATOR – style.css
   =================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0f18;
  --panel-bg: #13151f;
  --panel-border: #1e2235;
  --input-bg: #191c2a;
  --input-border: #2a2f45;
  --accent: #6c63ff;
  --accent2: #00d4aa;
  --accent-glow: rgba(108,99,255,.35);
  --text: #e8eaf6;
  --text-dim: #7c839e;
  --success: #00c97a;
  --success-light: #e6fff5;
  --success-bg: #001f14;
  --danger: #ff5a5f;
  --dhani-purple: #5b2d8e;
  --dhani-grad: linear-gradient(135deg, #5b2d8e 0%, #7c3fc0 60%, #9c5cf5 100%);
  --font: 'Inter', sans-serif;
  --radius: 14px;
  --phone-w: 360px;
  --phone-h: 760px;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

body {
  display: flex;
  gap: 0;
  height: 100vh;
  overflow: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2f45; border-radius: 99px; }

/* ===================================================
   EDITOR PANEL
   =================================================== */
.editor-panel {
  width: 320px;
  min-width: 300px;
  background: var(--panel-bg);
  border-right: 1px solid var(--panel-border);
  overflow-y: auto;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.editor-header { margin-bottom: 16px; }

.editor-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.editor-logo i {
  color: var(--accent);
  font-size: 22px;
}
.editor-logo strong { color: var(--accent); }

.editor-subtitle {
  font-size: 12px;
  color: var(--text-dim);
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
  position: relative;
}

.form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-label i { color: var(--accent); font-size: 11px; }

.form-input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder { color: #3d4460; }
.form-hint {
  font-size: 10.5px;
  color: #4a5070;
  font-style: italic;
  padding-left: 2px;
}
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236c63ff' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; padding-right: 36px; }

/* Autocomplete */
.autocomplete-wrapper { position: relative; }
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #1a1d2e;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  max-height: 180px;
  overflow-y: auto;
  z-index: 999;
  list-style: none;
  display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.autocomplete-list.open { display: block; }
.autocomplete-list li {
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  border-bottom: 1px solid #1e2235;
  transition: background .15s;
}
.autocomplete-list li:last-child { border-bottom: none; }
.autocomplete-list li:hover, .autocomplete-list li.active { background: rgba(108,99,255,.18); color: #fff; }
.autocomplete-list li mark { background: none; color: var(--accent); font-weight: 700; }

.btn-gen-txn {
  background: #1e2235;
  border: 1px solid #2a2f45;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 11px;
  font-family: var(--font);
  padding: 6px 12px;
  cursor: pointer;
  margin-top: 4px;
  align-self: flex-start;
  transition: background .2s, color .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-gen-txn:hover { background: var(--accent); color: #fff; }

.btn-download {
  margin-top: 16px;
  background: linear-gradient(135deg, var(--accent), #9c5cf5);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 4px 24px rgba(108,99,255,.4);
  letter-spacing: .3px;
}
.btn-download:hover { opacity: .9; box-shadow: 0 6px 30px rgba(108,99,255,.6); }
.btn-download:active { transform: scale(.97); }

.download-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ===================================================
   PREVIEW AREA
   =================================================== */
.preview-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 20px 20px;
  overflow-y: auto;
  background: radial-gradient(ellipse at 60% 20%, rgba(108,99,255,.08) 0%, transparent 60%), var(--bg);
}

.preview-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

/* ===================================================
   PHONE SHELL
   =================================================== */
.phone-shell {
  width: 380px;
  background: #101018;
  border-radius: 52px;
  border: 2.5px solid #2a2f45;
  box-shadow:
    0 0 0 6px #0d0f18,
    0 0 0 8px #1e2235,
    0 40px 80px rgba(0,0,0,.7),
    inset 0 1px 0 rgba(255,255,255,.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Volume + power buttons */
.phone-shell::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 120px;
  width: 4px;
  height: 30px;
  background: #1e2235;
  border-radius: 4px 0 0 4px;
  box-shadow: 0 44px 0 #1e2235, 0 82px 0 #1e2235;
}
.phone-shell::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 155px;
  width: 4px;
  height: 55px;
  background: #1e2235;
  border-radius: 0 4px 4px 0;
}

.phone-top-hardware {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 22px;
  background: #101018;
  position: relative;
  z-index: 10;
}

.phone-earpiece {
  width: 48px;
  height: 4px;
  background: #25283a;
  border-radius: 99px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8);
}

.phone-camera-lens {
  width: 8px;
  height: 8px;
  background: #181a28;
  border: 1.5px solid #2d3348;
  border-radius: 50%;
  box-shadow: inset 0 0 2px rgba(108, 99, 255, 0.25);
}

/* ===================================================
   PHONE SCREEN
   =================================================== */
.phone-screen {
  width: 360px;
  height: 800px;
  background: #f0f2f7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* STATUS BAR */
.screen-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 18px 4px;
  background: var(--dhani-purple);
  color: rgba(255,255,255,.9);
  font-size: 11px;
  font-weight: 600;
}
.s-time { font-weight: 700; font-size: 12px; }
.s-icons { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.s-net { font-size: 9px; font-weight: 800; letter-spacing: .3px; }

/* APP BAR */
.app-bar {
  background: var(--dhani-purple);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px;
  box-shadow: 0 3px 16px rgba(91,45,142,.4);
}
.app-bar-left { display: flex; align-items: center; gap: 10px; }
.app-back { color: rgba(255,255,255,.75); font-size: 16px; cursor: pointer; }
.app-logo { height: 26px; object-fit: contain; }
.app-name-fallback {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -1px;
  font-style: italic;
}
.app-bar-right { display: flex; align-items: center; gap: 12px; }
.app-icon-btn { color: rgba(255,255,255,.8); font-size: 16px; }
.app-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: block;
}

/* ===== SCREEN CONTENT ===== */
.screen-content {
  flex: 1;
  background: #f3f5fb;
  overflow-y: auto;
  padding: 0 0 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.screen-content::-webkit-scrollbar { width: 0; }

/* SUCCESS SECTION */
.success-section {
  background: var(--dhani-grad);
  padding: 28px 20px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.success-section::before {
  content: '';
  position: absolute;
  bottom: -30px; left: -30px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.success-section::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}

.success-ripple {
  position: relative;
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
}
.success-ripple::before, .success-ripple::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  animation: ripple 2s ease-out infinite;
}
.success-ripple::before { width: 80px; height: 80px; animation-delay: 0s; }
.success-ripple::after  { width: 100px; height: 100px; animation-delay: .4s; }

@keyframes ripple {
  0%   { opacity: 1; transform: scale(.8); }
  100% { opacity: 0; transform: scale(1.3); }
}

.success-circle {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #00e676, #00c97a);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,201,122,.45);
  border: 3px solid rgba(255,255,255,.3);
  z-index: 1;
  position: relative;
}
.success-check {
  color: #fff;
  font-size: 26px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}

.success-badge-label {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 100px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 4px 14px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.success-amount {
  color: #fff;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.rupee-sym {
  font-size: 28px;
  font-weight: 700;
  opacity: .9;
}

.success-words {
  color: rgba(255,255,255,.75);
  font-size: 11.5px;
  text-align: center;
  font-style: italic;
  line-height: 1.4;
  max-width: 280px;
}

/* DOTTED DIVIDER */
.divider-dotted {
  border: none;
  border-top: 2px dashed #d0d6ed;
  margin: 6px 20px 0;
  position: relative;
}

/* TXN CARD */
.txn-card {
  background: #fff;
  border-radius: 16px;
  margin: 16px 14px 0;
  box-shadow: 0 2px 16px rgba(91,45,142,.08);
  overflow: hidden;
}
.txn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f2f9;
  font-size: 12.5px;
}
.txn-row:last-child { border-bottom: none; }
.txn-label {
  color: #8891b2;
  font-weight: 500;
  font-size: 11.5px;
  min-width: 90px;
}
.txn-value {
  color: #1a1d2e;
  font-weight: 600;
  font-size: 12px;
  text-align: right;
  flex: 1;
}
.txn-value.mono {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  letter-spacing: .3px;
}
.status-success {
  color: #00c97a;
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
}
.status-success i { font-size: 13px; }

/* CREDIT MSG */
.credit-msg-box {
  background: linear-gradient(135deg, #fffbf0, #fff8e1);
  border: 1px solid #ffd55a;
  border-radius: 12px;
  margin: 12px 14px 0;
  padding: 11px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.credit-icon {
  color: #f59e0b;
  font-size: 15px;
  margin-top: 2px;
  flex-shrink: 0;
}
.credit-msg {
  font-size: 11.5px;
  color: #6b5a00;
  line-height: 1.5;
}
.credit-msg strong { color: #92400e; }
.credit-amount {
  display: inline-block;
  background: rgba(91,45,142,.1);
  color: #5b2d8e;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 12.5px;
  border: 1px solid rgba(91,45,142,.2);
  letter-spacing: .2px;
}

/* ACTION BUTTONS */
.action-btns {
  display: flex;
  gap: 10px;
  margin: 14px 14px 0;
}
.action-btn-outline, .action-btn-solid {
  flex: 1;
  padding: 11px 10px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: .2s;
}
.action-btn-outline {
  background: transparent;
  border: 2px solid var(--dhani-purple);
  color: var(--dhani-purple);
}
.action-btn-outline:hover { background: rgba(91,45,142,.06); }
.action-btn-solid {
  background: var(--dhani-grad);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(91,45,142,.35);
}
.action-btn-solid:hover { opacity: .9; }

/* POWERED BY */
.powered-by {
  text-align: center;
  font-size: 10px;
  color: #a0a8c8;
  margin-top: auto;
  padding-top: 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.powered-by i { color: #00c97a; }
.powered-by strong { color: var(--dhani-purple); }

/* HOME BAR */
.home-bar {
  width: 100%;
  height: 24px;
  background: #f3f5fb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding-bottom: 6px;
  flex-shrink: 0;
}
.home-bar::after {
  content: '';
  width: 120px; height: 5px;
  background: #c8ccdf;
  border-radius: 99px;
}

.phone-bottom-bar {
  height: 20px;
  width: 100%;
}

/* ===================================================
   MOBILE RESPONSIVE  (≤ 768px)
   =================================================== */
@media (max-width: 768px) {

  html, body { overflow: auto; height: auto; }

  body {
    flex-direction: column;
    height: 100%;
    overflow: hidden; /* handled per-section */
  }

  /* ── Preview takes full screen on mobile ── */
  .preview-area {
    flex: 1;
    width: 100%;
    min-height: 100dvh;
    padding: 16px 12px 160px; /* space for lifted FAB & Netlify badge */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  /* Scale phone down on small screens */
  .phone-shell {
    width: min(360px, 94vw);
    transform-origin: top center;
  }
  .phone-screen {
    width: min(340px, 88vw);
  }

  /* ── Editor panel → bottom drawer ── */
  .editor-panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    min-width: unset;
    max-height: 85dvh;
    border-right: none;
    border-top: 1px solid var(--panel-border);
    border-radius: 24px 24px 0 0;
    padding: 0 20px 40px;
    overflow-y: auto;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.32,1.2,.42,1);
    box-shadow: 0 -12px 60px rgba(0,0,0,.6);
  }

  .editor-panel.drawer-open {
    transform: translateY(0);
  }

  /* Drag handle at top of drawer */
  .editor-panel::before {
    content: '';
    display: block;
    width: 44px;
    height: 5px;
    background: #2a2f45;
    border-radius: 99px;
    margin: 14px auto 10px;
    flex-shrink: 0;
  }

  /* ── Backdrop overlay ── */
  .drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
  }
  .drawer-overlay.visible {
    opacity: 1;
    pointer-events: all;
  }

  /* ── Mobile Action Bar (Dual FAB) ── */
  .mobile-action-bar {
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)); /* lifted to comfortably clear Netlify badge */
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - 30px);
    max-width: 380px;
  }
  .mobile-action-bar.hidden { display: none !important; }

  .fab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 50px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    letter-spacing: .2px;
    transition: transform .15s, opacity .2s, box-shadow .2s;
    white-space: nowrap;
    /* Frosted glass backdrop blur so content behind remains visible */
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .fab-btn:active { transform: scale(.95); }

  .fab-edit {
    background: rgba(22, 26, 42, 0.76); /* semi-transparent */
    color: #e8eaf6;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  }
  .fab-edit:active { background: rgba(22, 26, 42, 0.9); }
  .fab-edit i { color: var(--accent); font-size: 14px; }

  .fab-download {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.8), rgba(156, 92, 245, 0.8)); /* semi-transparent */
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 28px rgba(108, 99, 255, 0.38);
  }
  .fab-download:active { background: linear-gradient(135deg, rgba(108, 99, 255, 0.95), rgba(156, 92, 245, 0.95)); }
  .fab-download i { font-size: 14px; }

  /* Drawer close button inside panel */
  .drawer-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #1e2235;
    border: 1px solid #2a2f45;
    border-radius: 12px;
    color: var(--text-dim);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 11px;
    cursor: pointer;
    margin-bottom: 16px;
    margin-top: 4px;
    transition: background .2s;
  }
  .drawer-close-btn:hover { background: #252840; }
  .drawer-close-btn i { font-size: 14px; color: var(--accent); }
}

/* ── Toast Popup (Desktop & Mobile) ── */
.toast-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -80px);
  background: #131726;
  border: 1.5px solid var(--success);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  box-shadow: 0 8px 30px rgba(0,0,0,.65);
  transition: transform .35s cubic-bezier(.175,.885,.32,1.275), opacity .3s;
  opacity: 0;
  pointer-events: none;
}
.toast-popup.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
.toast-popup i {
  color: var(--success);
  font-size: 16px;
}

/* Desktop: hide mobile-only elements */
@media (min-width: 769px) {
  .mobile-action-bar { display: none !important; }
  .drawer-overlay    { display: none !important; }
  .drawer-close-btn  { display: none !important; }
}


