/* ==========================================================================
   ZIBEL INSTAGRAM BUILDER - ULTRA-FUTURISTIC REDESIGN (ZERO VERTICAL SCROLL)
   Matches visual benchmark: Deep Obsidian Glass, Neon Violet/Magenta Accents,
   Cosmic 3D Rocket, 3D Glowing Instagram Icon on Neon Pedestal, Interactive Stepper
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --insta-bg: #050614;
  --insta-card-bg: linear-gradient(180deg, rgba(20, 16, 48, 0.82) 0%, rgba(12, 10, 30, 0.9) 100%);
  --insta-glass-border: rgba(168, 85, 247, 0.35);
  --insta-neon-magenta: #ec4899;
  --insta-neon-purple: #a855f7;
  --insta-neon-violet: #8b5cf6;
  --insta-neon-cyan: #38bdf8;
  --insta-glow-pink: 0 0 20px rgba(236, 72, 153, 0.55);
  --insta-glow-purple: 0 0 22px rgba(168, 85, 247, 0.5);
  --font-vazir: 'Vazirmatn', -apple-system, BlinkMacSystemFont, Tahoma, sans-serif;
}

/* Strict Zero Vertical Scroll Viewport */
html, body.instagram-page {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden !important;
  background-color: var(--insta-bg);
  font-family: var(--font-vazir);
  direction: rtl;
  color: #f8fafc;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Ensure global layout header & bottom nav dock do not appear on this standalone screen */
body.instagram-page .z-bottom-nav,
body.instagram-page .z-app-header {
  display: none !important;
}

/* Cosmic Ambient Background Glows */
body.instagram-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 45% at 50% 10%, rgba(168, 85, 247, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 75%, rgba(236, 72, 153, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 55% 35% at 15% 85%, rgba(56, 189, 248, 0.12) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Main Native App Wrapper (Strictly fits inside 100dvh) */
.z-insta-app {
  position: relative;
  z-index: 1;
  max-width: 440px;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  padding: 8px 14px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  overflow: hidden;
}

/* ==========================================================================
   1. TOP APP HEADER BAR
   ========================================================================== */
.z-insta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 6px;
  flex-shrink: 0;
  height: 48px;
  direction: ltr; /* Keeps avatar on left, brand center, wallet/menu on right as in benchmark */
}

.z-insta-header-left,
.z-insta-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Profile Avatar Pill with Notification Badge */
.z-insta-avatar-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.z-insta-avatar-btn:hover {
  transform: scale(1.06);
}

.z-insta-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #1e1b4b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.z-insta-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.z-insta-avatar-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ec4899;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #050614;
  box-shadow: 0 0 8px #ec4899;
}

/* Center ZIBEL Logo with Neon Bar */
.z-insta-brand-logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.z-insta-brand-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.45);
}

.z-insta-neon-pill {
  width: 52px;
  height: 3.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #ec4899 100%);
  box-shadow: 0 0 10px #38bdf8, 0 0 14px #ec4899;
}

/* Header Square Action Buttons (Wallet & Menu) */
.z-insta-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(24, 20, 52, 0.75);
  border: 1px solid rgba(168, 85, 247, 0.28);
  backdrop-filter: blur(10px);
  color: #c4b5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.z-insta-icon-btn:hover {
  background: rgba(40, 32, 85, 0.9);
  border-color: #ec4899;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.4);
}

/* ==========================================================================
   2. MAIN HERO OBSIDIAN GLASS CARD
   ========================================================================== */
.z-insta-main-card {
  flex: 1;
  background: var(--insta-card-bg);
  border: 1.5px solid var(--insta-glass-border);
  border-radius: 26px;
  backdrop-filter: blur(24px);
  box-shadow: 
    0 12px 36px rgba(0, 0, 0, 0.65),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.18),
    0 0 30px rgba(168, 85, 247, 0.18);
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin: 4px 0 8px;
  box-sizing: border-box;
}

/* Top Subtle Ambient Spotlight Inside Card */
.z-insta-main-card::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 120px;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.35) 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* Top Header Group (Rocket + Title + Underline) */
.z-insta-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 2px;
}

/* 3D Floating Cosmic Rocket */
.z-insta-rocket-wrap {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float-rocket 3.5s ease-in-out infinite;
  margin-top: -4px;
}

.z-insta-rocket-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.6));
}

@keyframes float-rocket {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-6px) rotate(-1.5deg) scale(1.03);
  }
}

/* Centered Radiant Title */
.z-insta-card-title {
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
  margin: 2px 0 3px;
  background: linear-gradient(90deg, #f472b6 0%, #ec4899 45%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(236, 72, 153, 0.4));
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Neon Title Underline Bar */
.z-insta-title-bar {
  width: 44px;
  height: 3.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #ec4899 100%);
  box-shadow: 0 0 10px #38bdf8, 0 0 12px #ec4899;
  margin-bottom: 6px;
}

/* ==========================================================================
   3. FOUR-STEP INTERACTIVE PROGRESS STEPPER
   ========================================================================== */
.z-insta-stepper-wrap {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 330px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 8px;
  padding: 0 8px;
}

/* Continuous Connecting Neon Line */
.z-insta-stepper-line {
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 2px;
  background: rgba(168, 85, 247, 0.28);
  transform: translateY(-50%);
  z-index: 0;
}

.z-insta-stepper-line-active {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 0%;
  height: 2px;
  background: linear-gradient(270deg, #ec4899, #a855f7);
  box-shadow: 0 0 10px #ec4899;
  transform: translateY(-50%);
  z-index: 0;
  transition: width 0.35s ease;
}

/* Stepper Node Item (RTL: 1 on Right, 4 on Left) */
.z-step-node {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(22, 18, 48, 0.9);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.z-step-node:hover {
  border-color: #ec4899;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.5);
}

/* Active Highlight Node */
.z-step-node.active {
  background: radial-gradient(circle at 35% 35%, #f43f5e 0%, #d946ef 55%, #8b5cf6 100%);
  border: 2px solid #ffffff;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 
    0 0 18px rgba(236, 72, 153, 0.95),
    0 0 32px rgba(168, 85, 247, 0.65);
  transform: scale(1.12);
}

.z-step-node.completed {
  background: rgba(45, 20, 75, 0.95);
  border: 1.5px solid #10b981;
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   4. CENTRAL STAGE (PEDESTAL & 3D INSTAGRAM SQUIRCLE + ANNOTATION TOOLTIP)
   ========================================================================== */
.z-stage-container {
  position: relative;
  z-index: 1;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Flanking Navigation Arrow Buttons (< and >) */
.z-stage-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(26, 22, 58, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.35);
  backdrop-filter: blur(10px);
  color: #cbd5e1;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.z-stage-arrow-btn:hover {
  background: rgba(45, 36, 95, 0.95);
  border-color: #ec4899;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.5);
  transform: translateY(-50%) scale(1.08);
}

.z-stage-arrow-btn.prev-btn {
  right: 6px; /* Right Arrow in RTL is next/previous */
}

.z-stage-arrow-btn.next-btn {
  left: 6px;  /* Left Arrow in RTL is previous/next */
}

/* Tiered Neon Circular Pedestal (Stage) */
.z-pedestal-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Floating 3D Instagram Squircle Asset */
.z-stage-icon-3d {
  width: 120px;
  height: 120px;
  position: relative;
  z-index: 3;
  margin-bottom: -32px; /* Sits directly on top platform of pedestal */
  animation: float-squircle 4s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.z-stage-icon-3d:hover {
  transform: scale(1.05);
}

.z-stage-icon-3d img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes float-squircle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* The Pedestal Base Structure (Tiered Circular Glass Rings) */
.z-pedestal-stage {
  position: relative;
  width: 170px;
  height: 48px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Tier 1: Bottom Base Ring */
.z-pedestal-base {
  position: absolute;
  bottom: 0;
  width: 160px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #2e1065 0%, #150831 80%);
  border: 2px solid rgba(168, 85, 247, 0.6);
  box-shadow: 
    0 0 24px rgba(168, 85, 247, 0.45),
    0 10px 25px rgba(0, 0, 0, 0.7);
}

/* Tier 2: Middle Elevated Ring */
.z-pedestal-mid {
  position: absolute;
  bottom: 6px;
  width: 140px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #3b0764 0%, #1c0942 90%);
  border: 1.5px solid rgba(236, 72, 153, 0.5);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.4);
}

/* Tier 3: Top Luminous Platform */
.z-pedestal-top {
  position: absolute;
  bottom: 12px;
  width: 120px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #c084fc 0%, #7e22ce 60%, #4c1d95 100%);
  border: 1.5px solid #e9d5ff;
  box-shadow: 
    0 0 20px #c084fc,
    inset 0 0 10px #ffffff;
}

/* Stage Floor Glow Pool */
.z-stage-floor-glow {
  position: absolute;
  bottom: -6px;
  width: 210px;
  height: 45px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.4) 0%, rgba(236, 72, 153, 0.25) 45%, transparent 75%);
  filter: blur(8px);
  z-index: 1;
  pointer-events: none;
}

/* Interactive Annotation Card (Left Side in Persian Layout) */
.z-step-annotation {
  position: absolute;
  left: 12px;
  top: 14px;
  max-width: 140px;
  text-align: right;
  z-index: 6;
  pointer-events: none;
  animation: fadeInAnnotation 0.35s ease;
}

@keyframes fadeInAnnotation {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.z-annot-step-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #ec4899;
  text-shadow: 0 0 8px rgba(236, 72, 153, 0.6);
  margin-bottom: 2px;
}

.z-annot-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 3px;
}

.z-annot-desc {
  font-size: 0.68rem;
  font-weight: 400;
  color: #cbd5e1;
  line-height: 1.35;
}

/* Curved Dashed Pointer Arrow SVG */
.z-annot-arrow-svg {
  position: absolute;
  top: 26px;
  right: -36px;
  width: 44px;
  height: 38px;
  pointer-events: none;
}

/* ==========================================================================
   5. CTA BUTTON ("تأیید و ادامه 🚀")
   ========================================================================== */
.z-cta-btn-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 5;
  margin-top: 4px;
  flex-shrink: 0;
}

.z-insta-cta-btn {
  width: 86%;
  max-width: 320px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-family: var(--font-vazir);
  font-size: 1.02rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 
    0 6px 20px rgba(236, 72, 153, 0.45),
    0 0 16px rgba(168, 85, 247, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.z-insta-cta-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 8px 26px rgba(236, 72, 153, 0.6),
    0 0 24px rgba(168, 85, 247, 0.5);
  filter: brightness(1.08);
}

.z-insta-cta-btn:active {
  transform: translateY(0) scale(0.98);
}

.z-insta-cta-icon {
  font-size: 1.15rem;
  filter: drop-shadow(0 0 6px #ffffff);
}

/* ==========================================================================
   6. BOTTOM BENEFIT DOCK / FEATURE STRIP (4 SLOTS)
   ========================================================================== */
.z-insta-features-strip {
  flex-shrink: 0;
  width: 100%;
  height: 56px;
  background: rgba(18, 14, 42, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.24);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 4px 6px;
  gap: 4px;
  box-sizing: border-box;
}

.z-feature-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  height: 100%;
  box-sizing: border-box;
  text-align: right;
  overflow: hidden;
}

.z-feature-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.z-feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.z-feature-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.z-feature-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  line-height: 1.15;
}

.z-feature-desc {
  font-size: 0.52rem;
  color: #94a3b8;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  line-height: 1.15;
  margin-top: 1px;
}

/* ==========================================================================
   7. LUXURY GLASS HANDLE INPUT MODAL (OPENED ON CTA CLICK)
   ========================================================================== */
.z-insta-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 16, 0.85);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.z-insta-modal-overlay.open,
.z-insta-modal-overlay.active,
.z-modal-overlay.open,
.z-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.z-insta-modal-card {
  width: 100%;
  max-width: 390px;
  background: linear-gradient(180deg, #191438 0%, #0d0a24 100%);
  border: 1.5px solid rgba(168, 85, 247, 0.4);
  border-radius: 24px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(168, 85, 247, 0.3);
  padding: 22px 20px 20px;
  position: relative;
  transform: scale(0.92) translateY(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.z-insta-modal-overlay.open .z-insta-modal-card {
  transform: scale(1) translateY(0);
}

.z-insta-modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.z-insta-modal-close:hover {
  background: rgba(236, 72, 153, 0.2);
  color: #ec4899;
}

.z-insta-modal-header {
  text-align: center;
  margin-bottom: 16px;
}

.z-insta-modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.z-insta-modal-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.z-insta-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.z-insta-modal-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Instagram Input Bar inside Modal */
.z-insta-input-box {
  direction: ltr;
  display: flex;
  align-items: center;
  background: rgba(10, 8, 25, 0.9);
  border: 1.5px solid rgba(168, 85, 247, 0.4);
  border-radius: 14px;
  padding: 4px 12px;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.z-insta-input-box:focus-within {
  border-color: #ec4899;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.35);
}

.z-insta-input-prefix {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  user-select: none;
}

.z-insta-text-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffd84d;
  font-size: 0.96rem;
  font-weight: 700;
  width: 100%;
  padding: 8px 4px;
  font-family: inherit;
}

.z-insta-text-input::placeholder {
  color: #475569;
  font-weight: 400;
}

/* Quick Suggestion Chips */
.z-insta-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.z-insta-chip-label {
  font-size: 0.72rem;
  color: #94a3b8;
}

.z-insta-chip {
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  color: #c4b5fd;
  cursor: pointer;
  transition: all 0.2s;
}

.z-insta-chip:hover {
  background: rgba(236, 72, 153, 0.25);
  border-color: #ec4899;
  color: #fff;
}

/* Modal Submit Button */
.z-insta-modal-submit {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  border: none;
  color: #fff;
  font-family: var(--font-vazir);
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.4);
  transition: all 0.2s;
}

.z-insta-modal-submit:hover {
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.6);
  filter: brightness(1.08);
}

/* Small Screens (e.g. height < 680px) Tweaks to maintain zero scroll */
@media (max-height: 680px) {
  .z-insta-app {
    padding: 4px 10px 6px;
  }
  .z-insta-header {
    height: 42px;
  }
  .z-insta-rocket-wrap {
    width: 52px;
    height: 52px;
  }
  .z-insta-card-title {
    font-size: 1.1rem;
  }
  .z-stage-icon-3d {
    width: 95px;
    height: 95px;
    margin-bottom: -24px;
  }
  .z-pedestal-stage {
    width: 140px;
    height: 40px;
  }
  .z-pedestal-base {
    width: 130px;
  }
  .z-pedestal-mid {
    width: 115px;
  }
  .z-pedestal-top {
    width: 100px;
  }
  .z-insta-cta-btn {
    height: 40px;
    font-size: 0.94rem;
  }
  .z-insta-features-strip {
    height: 50px;
  }
}

/* ==========================================================================
   8. IN-CARD WIZARD STEP PANELS (STEPS 1, 2, 3, 4 & AI DASHBOARD)
   ========================================================================== */
.wizard-step-panel {
  display: none;
  width: 100%;
  height: 100%;
  animation: fadeInStep 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.wizard-step-panel.active {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Template Grid & Cards (Step 2) */
.template-grid-lg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 135px;
  gap: 10px;
  flex: 1;
  min-height: 0;
  max-height: 215px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px;
  width: 100%;
  box-sizing: border-box;
}

.template-card-lg {
  background: rgba(22, 18, 52, 0.85);
  border: 1.5px solid rgba(168, 85, 247, 0.32);
  border-radius: 14px;
  padding: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  text-align: right;
  overflow: hidden;
  height: 135px;
  min-height: 135px;
  flex-shrink: 0;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.template-card-lg:hover {
  border-color: #ec4899;
  background: rgba(35, 28, 80, 0.95);
  transform: translateY(-2px);
}

.template-card-lg.active {
  border-color: #ec4899;
  background: rgba(45, 30, 95, 0.95);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.45);
}

.template-check {
  display: none;
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ec4899;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: 0 0 8px #ec4899;
}

.template-card-lg.active .template-check {
  display: flex;
}

.template-preview-wrap {
  width: 100%;
  height: 65px;
  min-height: 65px;
  max-height: 65px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0f1228;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  position: relative;
}

.template-preview-img {
  width: 100%;
  height: 100%;
  min-height: 65px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.template-card-content {
  display: flex;
  flex-direction: column;
  padding: 2px 4px;
  flex: 1;
  min-height: 0;
}

.template-coin-tag {
  font-size: 0.62rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 2px;
}

.template-coin-tag.premium {
  color: #f59e0b;
}

.template-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-desc {
  font-size: 0.60rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Step 3 & Step 4 Form Styles */
.z-step-panel-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 4px;
  box-sizing: border-box;
}

.z-step-fields-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 2px;
}

.z-form-select, .z-form-textarea {
  background: rgba(10, 8, 25, 0.9);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-vazir);
  font-size: 0.82rem;
  padding: 7px 10px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.z-form-select:focus, .z-form-textarea:focus {
  border-color: #ec4899;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.35);
}

.z-form-textarea {
  resize: none;
}

/* Step Navigation Action Buttons */
.z-wizard-actions-row {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
  flex-shrink: 0;
}

.z-btn-wizard-back {
  flex: 1;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.32);
  color: #cbd5e1;
  font-family: var(--font-vazir);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.z-btn-wizard-back:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.z-btn-wizard-next {
  flex: 2;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  border: none;
  color: #fff;
  font-family: var(--font-vazir);
  font-size: 0.90rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.z-btn-wizard-next:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(236, 72, 153, 0.6);
}

.z-btn-wizard-next.build-btn {
  background: linear-gradient(90deg, #10b981 0%, #6366f1 50%, #ec4899 100%);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4);
}

/* Compact Uploaded Image Cards (Step 4) */
.uploaded-image-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 12, 38, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 10px;
  padding: 6px 8px;
  margin-bottom: 4px;
  width: 100%;
  box-sizing: border-box;
}

.image-preview-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
}

.image-meta-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.image-meta-fields input[type="text"] {
  background: rgba(5, 5, 15, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 6px;
  padding: 4px 6px;
  color: #fff;
  font-family: var(--font-vazir);
  font-size: 0.72rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.image-size-tag {
  font-size: 0.62rem;
  color: #94a3b8;
  direction: ltr;
  text-align: right;
}

.btn-remove-image {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.68rem;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-remove-image:hover {
  background: rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   STORAGE QUOTA BAR (STEP 4)
   ========================================================================== */
.z-storage-quota-card {
  background: rgba(14, 10, 32, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 6px 10px;
  margin-bottom: 8px;
  text-align: right;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.z-storage-quota-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.z-storage-quota-labels {
  display: flex;
  align-items: center;
  gap: 6px;
}

.z-storage-chip {
  font-size: 0.68rem;
  font-weight: 700;
  color: #c084fc;
}

.z-storage-val {
  font-size: 0.70rem;
  font-weight: 800;
  color: #38bdf8;
  direction: ltr;
}

.z-btn-upgrade-storage {
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  border: none;
  border-radius: 999px;
  color: #ffffff;
  font-family: var(--font-vazir);
  font-size: 0.66rem;
  font-weight: 800;
  padding: 3px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.35);
  transition: all 0.2s ease;
}

.z-btn-upgrade-storage:hover {
  transform: scale(1.04);
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.6);
}

.z-storage-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.z-storage-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #38bdf8 60%, #ec4899 100%);
  border-radius: 999px;
  transition: width 0.4s ease, background 0.3s ease;
}

.z-storage-progress-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.z-storage-alert {
  font-size: 0.64rem;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  padding: 3px 6px;
  margin-top: 5px;
}

/* Media Item Badges (Video & PDF) */
.media-preview-badge {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.media-preview-badge.video {
  background: rgba(147, 51, 234, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #c084fc;
}

.media-preview-badge.pdf {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.media-type-tag {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 4px;
}

.media-type-tag.image {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.media-type-tag.video {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.media-type-tag.pdf {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* ==========================================================================
   STORAGE UPGRADE MODAL
   ========================================================================== */
#storage-upgrade-modal {
  z-index: 100050;
}

.z-storage-modal-card {
  background: rgba(16, 12, 38, 0.96);
  border: 1.5px solid rgba(168, 85, 247, 0.45);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(168, 85, 247, 0.25);
  width: 92%;
  max-width: 480px;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  box-sizing: border-box;
  animation: modalScaleIn 0.28s ease-out;
  direction: rtl;
  overflow-y: auto;
}

.z-storage-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.z-storage-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.z-storage-modal-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(236, 72, 153, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.z-storage-modal-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 2px;
}

.z-storage-modal-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  margin: 0;
}

.z-storage-user-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 8, 26, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.72rem;
}

.z-storage-status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.z-storage-status-item .lbl {
  font-size: 0.62rem;
  color: #94a3b8;
}

.z-storage-status-item .val {
  font-size: 0.78rem;
  font-weight: 800;
  color: #38bdf8;
}

.z-storage-status-item .val.text-amber {
  color: #fbbf24;
}

.z-storage-status-divider {
  width: 1px;
  height: 24px;
  background: rgba(168, 85, 247, 0.25);
}

.z-storage-section-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #ec4899;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Coin Plan Card */
.z-coin-plan-card {
  background: linear-gradient(135deg, rgba(30, 20, 60, 0.9), rgba(45, 25, 80, 0.9));
  border: 1.5px solid rgba(236, 72, 153, 0.5);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.2);
}

.z-coin-plan-card::after {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.z-coin-plan-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.z-coin-plan-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.z-coin-plan-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
}

.z-coin-plan-badge {
  font-size: 0.60rem;
  font-weight: 800;
  background: linear-gradient(90deg, #ec4899, #a855f7);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 999px;
}

.z-coin-plan-desc {
  font-size: 0.65rem;
  color: #cbd5e1;
}

.z-coin-plan-btn {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-family: var(--font-vazir);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 7px 14px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.z-coin-plan-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.6);
}

.z-coin-plan-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

/* Toman Plans Grid */
.z-toman-plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.z-toman-plan-card {
  background: rgba(20, 16, 45, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.z-toman-plan-card:hover {
  border-color: #38bdf8;
  background: rgba(30, 24, 65, 0.9);
  transform: translateY(-2px);
}

.z-toman-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.z-toman-plan-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
}

.z-toman-badge {
  font-size: 0.58rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 5px;
  border-radius: 999px;
}

.z-toman-plan-price-row {
  margin: 4px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.z-toman-price {
  font-size: 0.92rem;
  font-weight: 800;
  color: #4ade80;
}

.z-toman-curr {
  font-size: 0.60rem;
  color: #94a3b8;
}

.z-toman-buy-btn {
  width: 100%;
  height: 30px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-vazir);
  font-size: 0.70rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.z-toman-buy-btn:hover {
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.z-storage-modal-footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(168, 85, 247, 0.15);
  text-align: center;
}

.z-storage-footer-note {
  font-size: 0.62rem;
  color: #94a3b8;
}



