/* ══════════════════════════════════════════════════════════════════
   SADAF OPTOMETRY — CYBER LUXURY 3.0 STYLES
   High-Tech AI Biometric Face Detector Theme
   ══════════════════════════════════════════════════════════════════ */

:root {
  --cyber-gold: #ffbe3b;
  --cyber-gold-light: #ffe57f;
  --cyber-gold-dark: #d39d4e;
  --cyber-cyan: #00f2fe;
  --cyber-emerald: #00ff87;
  --cyber-violet: #8a2be2;
  --cyber-magenta: #ff007f;
  --cyber-dark-base: #060709;
  --cyber-card-bg: rgba(14, 16, 22, 0.78);
  --cyber-border-glow: rgba(255, 190, 59, 0.25);
  --cyber-laser-glow: 0 0 20px #00f2fe, 0 0 40px rgba(255, 190, 59, 0.6);
}

/* ── ۱. پس‌زمینه کهکشانی بیومتریک (Interactive Background Canvas) ── */
.ambient-constellation-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

/* لایه‌بندی محتوا روی کانواس */
.container,
.back-btn-container,
.top-nav-bar {
  position: relative;
  z-index: 2;
}

/* ── ۲. نوار ابزار بالای صفحه و دکمه کنترل صدا ── */
.top-nav-bar {
  max-width: 1100px;
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.top-nav-bar .back-btn-container {
  margin: 0;
}

.cyber-btn-audio {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c7c7d4;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.cyber-btn-audio:hover {
  background: rgba(255, 190, 59, 0.08);
  border-color: var(--cyber-gold);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 190, 59, 0.2);
  transform: translateY(-2px);
}

.cyber-btn-audio.muted {
  opacity: 0.6;
  border-color: rgba(255, 255, 255, 0.05);
}

.cyber-btn-audio.muted i {
  color: #888;
}

.cyber-btn-audio:not(.muted) i {
  color: var(--cyber-gold);
  text-shadow: 0 0 8px rgba(255, 190, 59, 0.6);
}

/* ── ۳. هدر و تایپوگرافی انیمیشنی ── */
.header-badge.cyber-pulse-badge {
  background: linear-gradient(135deg, rgba(255, 190, 59, 0.12) 0%, rgba(0, 242, 254, 0.06) 100%);
  border: 1px solid rgba(255, 190, 59, 0.25);
  box-shadow: 0 0 20px rgba(255, 190, 59, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-radar-dot {
  width: 8px;
  height: 8px;
  background-color: var(--cyber-emerald);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--cyber-emerald);
  animation: radarBlink 1.8s infinite ease-in-out;
}

@keyframes radarBlink {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px var(--cyber-emerald); }
  50% { opacity: 0.4; transform: scale(0.85); box-shadow: 0 0 4px var(--cyber-emerald); }
}

/* متن درخشان هولوگرافیک */
.shimmer-text {
  background: linear-gradient(90deg, #ffe57f 0%, #00f2fe 35%, #ffbe3b 70%, #ffe57f 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: cyberShimmer 5s linear infinite;
  filter: drop-shadow(0 0 15px rgba(255, 190, 59, 0.4));
  font-weight: 900;
}

@keyframes cyberShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* نوار تله‌متری سنسور زیر هدر */
.cyber-telemetry-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px auto 0 auto;
  max-width: 850px;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 11.5px;
  color: #a6a6b8;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.telemetry-item i {
  color: var(--cyber-gold);
  font-size: 11px;
}

.t-dot.live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff87;
  box-shadow: 0 0 8px #00ff87;
  display: inline-block;
}

.telemetry-separator {
  color: rgba(255, 255, 255, 0.15);
  font-size: 10px;
}

/* ── ۴. مراحل سه‌گانه شیشه‌ای با افکت پالس ── */
.step-item {
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.step-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 190, 59, 0.3);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 190, 59, 0.1);
}

.step-item.active {
  border-color: var(--cyber-gold) !important;
  background: radial-gradient(circle at top, rgba(255, 190, 59, 0.12) 0%, rgba(22, 22, 26, 0.8) 100%) !important;
  box-shadow: 0 10px 40px rgba(255, 190, 59, 0.15), inset 0 0 15px rgba(255, 190, 59, 0.06) !important;
}

.step-item.active .step-number {
  background: linear-gradient(135deg, #ffe57f 0%, #ffbe3b 100%);
  color: #060709;
  box-shadow: 0 0 15px rgba(255, 190, 59, 0.5);
  animation: numberPulse 2s infinite ease-in-out;
}

@keyframes numberPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ── ۵. قاب اسکنر دوربین سایبرپانک و کروشه‌های HUD ── */
.video-wrapper {
  position: relative;
  border: 1px solid rgba(255, 190, 59, 0.18) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.08), inset 0 0 60px rgba(0, 0, 0, 0.85) !important;
}

/* ۴ کروشه هدف‌گیری در گوشه‌های کادر دوربین */
.hud-bracket {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 7;
  transition: all 0.3s ease;
}

.hud-bracket.hud-tl {
  top: 10px;
  right: 10px;
  border-top: 3px solid var(--cyber-gold);
  border-right: 3px solid var(--cyber-gold);
  border-top-right-radius: 6px;
  filter: drop-shadow(0 0 6px var(--cyber-gold));
}

.hud-bracket.hud-tr {
  top: 10px;
  left: 10px;
  border-top: 3px solid var(--cyber-gold);
  border-left: 3px solid var(--cyber-gold);
  border-top-left-radius: 6px;
  filter: drop-shadow(0 0 6px var(--cyber-gold));
}

.hud-bracket.hud-bl {
  bottom: 10px;
  right: 10px;
  border-bottom: 3px solid var(--cyber-gold);
  border-right: 3px solid var(--cyber-gold);
  border-bottom-right-radius: 6px;
  filter: drop-shadow(0 0 6px var(--cyber-gold));
}

.hud-bracket.hud-br {
  bottom: 10px;
  left: 10px;
  border-bottom: 3px solid var(--cyber-gold);
  border-left: 3px solid var(--cyber-gold);
  border-bottom-left-radius: 6px;
  filter: drop-shadow(0 0 6px var(--cyber-gold));
}

.video-wrapper:hover .hud-bracket {
  width: 28px;
  height: 28px;
  border-color: var(--cyber-cyan);
  filter: drop-shadow(0 0 8px var(--cyber-cyan));
}

/* رتیکل هدف‌گیری در مرکز کادر */
.hud-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  pointer-events: none;
  z-index: 6;
  opacity: 0.35;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hud-reticle.active {
  opacity: 0.85;
  animation: reticleSpin 20s linear infinite;
}

.hud-reticle.hidden {
  opacity: 0;
  pointer-events: none;
}

.hud-reticle-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(0, 242, 254, 0.4);
  border-radius: 50%;
}

.hud-reticle-inner {
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255, 190, 59, 0.3);
  border-radius: 50%;
}

.hud-reticle-cross {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
}

.hud-reticle-cross::before,
.hud-reticle-cross::after {
  content: '';
  position: absolute;
  background: var(--cyber-cyan);
  box-shadow: 0 0 6px var(--cyber-cyan);
}

.hud-reticle-cross::before {
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
}

.hud-reticle-cross::after {
  top: 0;
  left: 7px;
  width: 2px;
  height: 16px;
}

@keyframes reticleSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* اشعه لیزری دو رنگه و ردپای نوری */
.scanner-line.active {
  height: 3px !important;
  background: linear-gradient(90deg, transparent 5%, var(--cyber-cyan) 30%, #fff 50%, var(--cyber-gold) 70%, transparent 95%) !important;
  box-shadow: 0 0 12px var(--cyber-cyan), 0 0 24px var(--cyber-gold) !important;
  animation: cyberLaserScan 2.6s ease-in-out infinite alternate !important;
}

@keyframes cyberLaserScan {
  0% { top: 3%; opacity: 0.7; }
  50% { opacity: 1; }
  100% { top: 97%; opacity: 0.7; }
}

/* دکمه‌های کنترل با درخشش لوکس */
.btn-primary {
  background: linear-gradient(135deg, #ffe57f 0%, #ffbe3b 50%, #d39d4e 100%) !important;
  color: #060709 !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 6px 20px rgba(255, 190, 59, 0.3) !important;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 10px 30px rgba(255, 190, 59, 0.5), 0 0 20px rgba(0, 242, 254, 0.3) !important;
}

/* ── ۶. کارت نتایج و آیکون‌های فرم چهره ── */
.results-box {
  background: var(--cyber-card-bg) !important;
  border: 1px solid rgba(255, 190, 59, 0.18) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 35px rgba(255, 190, 59, 0.08) !important;
}

.shape-result-icon {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.shape-result-icon:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 190, 59, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.shape-result-icon.active {
  background: linear-gradient(180deg, rgba(255, 190, 59, 0.18) 0%, rgba(0, 242, 254, 0.08) 100%) !important;
  border-color: var(--cyber-gold) !important;
  box-shadow: 0 0 30px rgba(255, 190, 59, 0.35), inset 0 0 15px rgba(255, 190, 59, 0.15) !important;
  transform: translateY(-5px) scale(1.06) !important;
}

.shape-result-icon.active svg {
  color: #fff !important;
  filter: drop-shadow(0 0 12px var(--cyber-gold)) !important;
}

/* ── ۷. دکمه ساخت استوری اینستاگرام ── */
.btn-action.btn-story {
  background: linear-gradient(135deg, #8a2be2 0%, #ff007f 50%, #ffbe3b 100%);
  color: #fff;
  border: none;
  font-weight: 800;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(255, 0, 127, 0.35);
  animation: storyBtnGlow 3s infinite ease-in-out;
}

.btn-action.btn-story:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 30px rgba(255, 0, 127, 0.55), 0 0 20px rgba(138, 43, 226, 0.4);
}

.btn-action.btn-story i {
  animation: sparkleTwinkle 1.8s infinite;
}

@keyframes sparkleTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.25) rotate(15deg); color: #ffe57f; }
}

@keyframes storyBtnGlow {
  0%, 100% { box-shadow: 0 6px 20px rgba(255, 0, 127, 0.35); }
  50% { box-shadow: 0 8px 30px rgba(255, 190, 59, 0.5); }
}

/* ── ۸. مودال اختصاصی استوری اینستاگرام ── */
.cyber-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.cyber-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cyber-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cyber-modal-card {
  position: relative;
  z-index: 2;
  background: #0d0f14;
  border: 1px solid rgba(255, 190, 59, 0.3);
  border-radius: 22px;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 190, 59, 0.2);
  overflow: hidden;
  animation: modalScaleUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.cyber-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-box h3 {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.cyber-modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cyber-modal-close:hover {
  background: rgba(255, 0, 80, 0.2);
  border-color: #ff0050;
  color: #ff0050;
}

.cyber-modal-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.story-preview-wrapper {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9/16;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 190, 59, 0.2);
  border: 2px solid rgba(255, 190, 59, 0.4);
  background: #06070a;
}

#storyCanvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-spinner-box {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 20, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: #aaa;
  z-index: 5;
}

.story-spinner-box.hidden {
  display: none;
}

.story-actions-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-cyber-primary {
  background: linear-gradient(135deg, #ffe57f 0%, #ffbe3b 50%, #d39d4e 100%);
  color: #060709;
  font-weight: 800;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  box-shadow: 0 4px 15px rgba(255, 190, 59, 0.3);
}

.btn-cyber-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 190, 59, 0.5);
}

.btn-cyber-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-cyber-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── ۹. افکت سه‌بعدی و شناور روی کارت‌های عینک ── */
.glasses-grid .glass-card {
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.35s ease, border-color 0.35s ease !important;
}

.glasses-grid .glass-card:hover {
  transform: translateY(-6px) scale(1.02) !important;
  border-color: rgba(255, 190, 59, 0.35) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 190, 59, 0.15) !important;
}

/* ── کنترل متن دکمه بازگشت برای دسکتاپ و موبایل ── */
.back-btn-mobile {
  display: none;
}
.back-btn-desktop {
  display: inline;
}

/* ══════════════════════════════════════════════════════════════════
   ۱۰. موتور اختصاصی واکنش‌گرایی موبایل (Dedicated Mobile UX Engine)
   مخصوص تمامی گوشی‌های هوشمند (iPhone, Android, Samsung, Xiaomi)
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  body {
    padding: max(10px, env(safe-area-inset-top, 10px)) 10px max(24px, env(safe-area-inset-bottom, 24px)) 10px !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* نوار بالای صفحه (منظم و بدون شکست نامناسب) */
  .top-nav-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 0 0 10px 0 !important;
    gap: 8px !important;
  }

  .top-nav-bar .back-btn-container {
    margin: 0 !important;
  }

  .back-btn {
    padding: 6px 12px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    gap: 6px !important;
  }

  .back-btn-desktop {
    display: none !important;
  }

  .back-btn-mobile {
    display: inline !important;
    font-weight: 600 !important;
  }

  .cyber-btn-audio {
    padding: 6px 12px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }

  /* هدر و تایتل */
  .header {
    margin-bottom: 12px !important;
    text-align: center !important;
    padding: 0 2px !important;
  }

  .header-badge.cyber-pulse-badge {
    font-size: 9.5px !important;
    padding: 4px 10px !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    max-width: 100% !important;
    letter-spacing: 0 !important;
  }

  .header h1 {
    font-size: 19px !important;
    line-height: 1.4 !important;
    display: block !important;
    text-align: center !important;
    margin: 0 0 6px 0 !important;
    font-weight: 900 !important;
  }

  .shimmer-text {
    display: inline-block !important;
  }

  .header p {
    font-size: 11.5px !important;
    line-height: 1.6 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 4px !important;
    color: #a4a7b5 !important;
  }

  /* نوار تله‌متری ۲ در ۲ در موبایل */
  .cyber-telemetry-strip {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
    padding: 6px 8px !important;
    margin: 10px auto 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    background: rgba(10, 12, 16, 0.65) !important;
    border: 1px solid rgba(255, 190, 59, 0.18) !important;
    border-radius: 12px !important;
  }

  .telemetry-separator {
    display: none !important;
  }

  .telemetry-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    font-size: 9.5px !important;
    font-weight: 600 !important;
    padding: 4px 6px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .telemetry-item i {
    font-size: 10px !important;
  }

  /* مراحل سه‌گانه */
  .steps-section {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    gap: 5px !important;
    width: 100% !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
  }

  .step-connector {
    display: none !important;
  }

  .step-item {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 8px 3px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 2px !important;
  }

  .step-number {
    position: static !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 9.5px !important;
    margin-bottom: 2px !important;
  }

  .step-icon, .step-item p {
    display: none !important;
  }

  .step-item h3 {
    font-size: 9.5px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* گرید ردیاب و دوربین */
  .detector-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .camera-box {
    padding: 12px 10px !important;
    border-radius: 18px !important;
    width: 100% !important;
  }

  .video-wrapper {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    max-height: 330px !important;
    min-height: 220px !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
    position: relative !important;
  }

  /* کروشه‌های ظریف در موبایل */
  .hud-bracket {
    width: 14px !important;
    height: 14px !important;
    border-width: 2px !important;
  }
  .hud-bracket.hud-tl { top: 6px !important; right: 6px !important; }
  .hud-bracket.hud-tr { top: 6px !important; left: 6px !important; }
  .hud-bracket.hud-bl { bottom: 6px !important; right: 6px !important; }
  .hud-bracket.hud-br { bottom: 6px !important; left: 6px !important; }

  .hud-reticle {
    width: 85px !important;
    height: 85px !important;
  }
  .hud-reticle-inner {
    inset: 14px !important;
  }

  .scan-tips {
    top: 6px !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
    max-width: 90% !important;
    line-height: 1.3 !important;
    border-radius: 8px !important;
  }

  .live-guide {
    bottom: 6px !important;
    padding: 5px 10px !important;
    font-size: 10px !important;
    max-width: 92% !important;
    border-radius: 8px !important;
  }

  .control-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    margin-bottom: 10px !important;
  }

  .btn-primary, .btn-secondary {
    width: 100% !important;
    height: 44px !important;
    font-size: 13.5px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .upload-section {
    margin-top: 8px !important;
    width: 100% !important;
  }

  .upload-divider {
    margin: 8px 0 !important;
  }

  .upload-options-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .btn-upload {
    width: 100% !important;
    height: 42px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .upload-hint {
    font-size: 10px !important;
    margin-top: 6px !important;
    line-height: 1.4 !important;
  }

  /* پنل نتایج در موبایل */
  .results-box {
    padding: 12px 10px !important;
    border-radius: 18px !important;
    width: 100% !important;
  }

  .result-header-label {
    font-size: 11px !important;
    margin-bottom: 8px !important;
  }

  /* شبکه هوشمند ۷ فرم صورت (ردیف ۱: ۴ تا، ردیف ۲: ۳ تا) بدون نیاز به اسکرول سخت */
  .shape-icons-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
    margin-bottom: 12px !important;
    overflow-x: visible !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .shape-result-icon {
    flex: none !important;
    width: 100% !important;
    padding: 7px 2px !important;
    border-radius: 10px !important;
    font-size: 9.5px !important;
    gap: 3px !important;
    min-height: 62px !important;
  }

  .shape-result-icon svg {
    width: 18px !important;
    height: 22px !important;
  }

  .shape-pct {
    font-size: 8.5px !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
  }

  .confidence-section {
    padding: 9px 10px !important;
    border-radius: 10px !important;
    margin-bottom: 10px !important;
  }

  .ratio-info {
    font-size: 11px !important;
  }

  .confidence-value {
    font-size: 12.5px !important;
  }

  .confidence-track {
    height: 6px !important;
    margin-top: 5px !important;
  }

  .shape-details-card {
    padding: 12px 10px !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
  }

  .shape-title-wrapper {
    margin-bottom: 6px !important;
  }

  .shape-details-card h2 {
    font-size: 16px !important;
  }

  .shape-details-card p {
    font-size: 11.5px !important;
    line-height: 1.6 !important;
    margin-bottom: 8px !important;
  }

  .rec-frame-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    list-style: none !important;
    padding: 0 !important;
  }

  .rec-frame-list li {
    font-size: 10px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
  }

  .rec-avoid-box {
    font-size: 10.5px !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
    gap: 6px !important;
  }

  .metrics-section {
    padding: 9px 10px !important;
    border-radius: 10px !important;
    margin-bottom: 10px !important;
  }

  .metrics-section h3 {
    font-size: 11px !important;
    margin-bottom: 6px !important;
  }

  .ratio-item {
    margin-bottom: 7px !important;
  }

  .ratio-label {
    font-size: 9.5px !important;
  }

  .progress-track {
    height: 5px !important;
    margin-top: 3px !important;
  }

  /* دکمه‌های عملیات کاملاً متناسب با لمس انگشت شست (Thumb-Friendly) */
  .result-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    width: 100% !important;
  }

  .btn-action {
    width: 100% !important;
    height: 42px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .btn-action.btn-story {
    height: 46px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  /* بخش فریم‌های پیشنهادی */
  .recommended-glasses {
    margin-top: 18px !important;
    padding: 8px 0 !important;
  }

  .rec-header-wrapper h2 {
    font-size: 17px !important;
    margin-bottom: 4px !important;
  }

  .rec-subtitle {
    font-size: 11px !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
    padding: 0 4px !important;
  }

  .rec-filters-holder {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .rec-type-tabs {
    display: flex !important;
    width: 100% !important;
    gap: 4px !important;
  }

  .rec-type-btn {
    flex: 1 !important;
    padding: 7px 4px !important;
    font-size: 10.5px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
  }

  .rec-gender-tabs {
    display: flex !important;
    width: 100% !important;
    gap: 4px !important;
  }

  .rec-gender-btn {
    flex: 1 !important;
    padding: 6px 3px !important;
    font-size: 10px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
  }

  .glasses-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .glass-card {
    padding: 12px !important;
    border-radius: 14px !important;
  }

  .glass-card-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .btn-buy-frame, .btn-vto-frame {
    padding: 8px 4px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .rec-more-banner {
    flex-direction: column !important;
    padding: 14px 10px !important;
    text-align: center !important;
    gap: 10px !important;
  }

  .rec-more-info h3 {
    font-size: 13.5px !important;
  }

  .rec-more-info p {
    font-size: 11px !important;
  }

  .rec-browse-all-btn {
    width: 100% !important;
    justify-content: center !important;
    font-size: 12px !important;
    padding: 10px !important;
  }

  /* مودال استوری اینستاگرام در موبایل */
  .cyber-modal {
    padding: 10px !important;
  }

  .cyber-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    border-radius: 16px !important;
  }

  .cyber-modal-header {
    padding: 10px 14px !important;
  }

  .modal-title-box h3 {
    font-size: 12.5px !important;
  }

  .cyber-modal-body {
    padding: 12px 10px !important;
    gap: 10px !important;
  }

  .story-preview-wrapper {
    max-width: 170px !important;
    border-radius: 12px !important;
  }

  .story-actions-box {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .btn-cyber-primary {
    height: 42px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
    width: 100% !important;
  }

  .btn-cyber-secondary {
    height: 38px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    width: 100% !important;
  }

  /* سوالات متداول در موبایل */
  .faq-section {
    padding: 12px 0 !important;
    margin-top: 14px !important;
  }

  .faq-section h2 {
    font-size: 15px !important;
    margin-bottom: 10px !important;
  }

  .faq-item {
    border-radius: 10px !important;
    margin-bottom: 6px !important;
  }

  .faq-item summary {
    padding: 9px 12px !important;
    font-size: 11.5px !important;
  }

  .faq-answer {
    padding: 0 12px 10px 12px !important;
    font-size: 10.5px !important;
    line-height: 1.6 !important;
  }
}

/* بهینه‌سازی مخصوص صفحه‌نمایش‌های خیلی کوچک (عرض ۳۶۰ و کمتر) */
@media (max-width: 360px) {
  .header h1 {
    font-size: 17px !important;
  }

  .header-badge.cyber-pulse-badge {
    font-size: 8.5px !important;
    padding: 3px 8px !important;
  }

  .telemetry-item {
    font-size: 8.5px !important;
    padding: 3px 4px !important;
  }

  .shape-result-icon {
    min-height: 56px !important;
    font-size: 8.5px !important;
  }

  .shape-result-icon svg {
    width: 16px !important;
    height: 20px !important;
  }

  .btn-action {
    font-size: 11px !important;
    height: 38px !important;
  }

  .btn-action.btn-story {
    font-size: 12px !important;
    height: 42px !important;
  }
}
