@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Environment Backgrounds (Obsidian & Deep Navy) */
  --bg-deep-0: #040510;
  --bg-deep-1: #06081F;
  --bg-deep-2: #090B29;
  --bg-deep-3: #0D1035;
  --bg-deep-4: #11154A;
  --bg: #06081F;
  --surface: rgba(16, 20, 56, 0.65);
  --surface-2: rgba(24, 30, 82, 0.55);
  --border: rgba(168, 85, 247, 0.2);

  /* Glassmorphism System */
  --glass-card: rgba(16, 20, 56, 0.68);
  --glass-card-hover: rgba(25, 32, 85, 0.78);
  --glass-surface-solid: #0c1032;
  --glass-border: rgba(168, 85, 247, 0.22);
  --glass-border-hover: rgba(217, 70, 239, 0.45);
  --glass-border-cyan: rgba(56, 189, 248, 0.35);
  --glass-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.14);
  --glass-radius-sm: 14px;
  --glass-radius-md: 20px;
  --glass-radius-lg: 26px;
  --glass-radius-xl: 32px;
  --glass-radius-pill: 9999px;

  /* Neon Accents */
  --neon-purple: #8b5cf6;
  --neon-violet: #a855f7;
  --neon-magenta: #ec4899;
  --neon-pink: #d946ef;
  --neon-cyan: #38bdf8;
  --neon-blue: #3b82f6;
  --neon-emerald: #10b981;
  --neon-gold: #f59e0b;

  /* Gradient Palette */
  --grad-primary: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --grad-primary-hover: linear-gradient(135deg, #9333ea 0%, #db2777 100%);
  --grad-cyan-blue: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  --grad-purple-deep: linear-gradient(135deg, #24124d 0%, #3e1675 50%, #581c87 100%);
  --grad-card-purple: linear-gradient(135deg, rgba(29, 18, 70, 0.85) 0%, rgba(48, 22, 110, 0.7) 100%);
  --grad-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);

  /* Text Colors */
  --text-pure: #ffffff;
  --text-main: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-lavender: #c4b5fd;
  --text-muted: #8492a6;

  /* Shadows & Glow */
  --glow-purple: 0 0 24px rgba(168, 85, 247, 0.35);
  --glow-magenta: 0 0 28px rgba(236, 72, 153, 0.45);
  --glow-cyan: 0 0 20px rgba(56, 189, 248, 0.3);
  --glow-gold: 0 0 20px rgba(245, 158, 11, 0.4);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --radius: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, Tahoma, sans-serif;
  background-color: var(--bg-deep-1);
  color: var(--text-main);
  line-height: 1.7;
  min-height: 100vh;
  direction: rtl;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(139, 92, 246, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 45% at 85% 20%, rgba(236, 72, 153, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 50% 90%, rgba(56, 189, 248, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  padding: 16px 16px 115px; /* Accommodates fixed floating bottom navigation dock */
}

@media (min-width: 820px) {
  .app:not(.mobile-frame) {
    max-width: 800px;
  }
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 36px;
  padding-top: 12px;
}

.header-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-hover);
  font-size: 0.8rem;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 12px;
}

.header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto;
}

/* Layout */
.main-grid {
  display: block;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  gap: 12px;
}

.card-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-icon {
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 8px;
}

.card-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chevron {
  transition: transform 0.25s;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.card.collapsed .chevron {
  transform: rotate(-90deg);
}

.card-body {
  padding: 20px;
}

.card.collapsed .card-body {
  display: none;
}

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .form-grid.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

label .required {
  color: var(--danger);
  margin-right: 2px;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="color"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.color-row input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.color-row input[type="text"] {
  flex: 1;
}

/* Section blocks */
.section-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
}

.section-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.section-block-title {
  font-weight: 700;
  font-size: 0.88rem;
  flex: 1;
}

.section-block-title input {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  width: 100%;
  padding: 0;
}

.section-block-title input:focus {
  outline: none;
  box-shadow: none;
}

.section-block-body {
  padding: 14px 16px;
}

.section-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-hover);
  white-space: nowrap;
}

.section-badge.required {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

/* Repeater items */
.repeater-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  position: relative;
}

.repeater-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.repeater-item-num {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.repeater-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 600px) {
  .repeater-fields.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--border);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-hover);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  padding: 5px 10px;
  font-size: 0.78rem;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.3);
}

.btn-icon {
  padding: 5px 8px;
  font-size: 0.9rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.add-section-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  margin-top: 8px;
}

.add-section-bar label {
  width: 100%;
  margin-bottom: 4px;
}

/* Output panel */
.output-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.output-header {
  padding: 16px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.output-header h2 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.output-header p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.output-body {
  padding: 16px;
}

#prompt-output {
  width: 100%;
  min-height: 420px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Vazirmatn', monospace;
  font-size: 0.78rem;
  line-height: 1.8;
  padding: 14px;
  resize: vertical;
  direction: rtl;
}

.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Step Progress Indicator */
.step-progress-wrapper {
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}

.step-progress-indicator {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 12px;
}

.step-line {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  height: 3px;
  background: var(--surface-2);
  z-index: 1;
}

.step-line-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  transition: width 0.4s ease;
}

.step-dot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.step-dot-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-dot-label {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s;
}

.step-dot.active .step-dot-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.4);
}

.step-dot.active .step-dot-label {
  color: var(--text);
}

.step-dot.completed .step-dot-num {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.step-dot.completed .step-dot-label {
  color: #10b981;
}

.step-text-summary {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Slider Viewport and Slides */
.wizard-viewport {
  overflow: hidden;
  width: 100%;
  position: relative;
  border-radius: var(--radius);
}

.wizard-slides {
  display: flex;
  width: 400%; /* 4 steps */
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.wizard-slide {
  width: 25%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.wizard-slide .card {
  margin-bottom: 0;
}

/* Step 1 Specific: Actions */
.first-step-actions {
  background: var(--surface);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
  box-shadow: var(--shadow);
}

.first-step-tip {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.auto-fill-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-type-select {
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 140px;
}

.ai-type-select:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-ai {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  padding: 10px 18px;
  font-size: 0.85rem;
}

.btn-ai:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-ai:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-ai-loading[hidden],
.btn-ai-text[hidden] {
  display: none;
}

.btn-random {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  padding: 10px 18px;
  font-size: 0.85rem;
}

.btn-random:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-random:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Wizard Navigation Footer - Sticky / Fixed at the bottom */
.wizard-navigation {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  background: rgba(26, 29, 39, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 16px 24px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  margin-top: 0;
  z-index: 1000;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wizard-nav-dots {
  display: flex;
  gap: 10px;
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.toast {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s;
  z-index: 999999;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.empty-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 24px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 600px) {
  .social-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Logo upload row */
.logo-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#logo-preview-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Portfolio image upload row */
.portfolio-image-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media print {
  body::before { display: none; }
  .generate-bar, .add-section-bar, .btn-danger, .add-section-btns { display: none !important; }
  .card.collapsed .card-body { display: block !important; }
  .output-panel { break-inside: avoid; }
}

/* Step-based Attachments Styles */
.step-attachments-wrapper {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.attachments-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: block;
}

.attachments-upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.step-file-label {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8rem;
}

.step-file-label:focus {
  outline: none;
  border-color: var(--primary);
}

.step-attachments-progress {
  margin-top: 10px;
}

.media-progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.media-progress-line {
  width: 100%;
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}

.media-progress-line-fill {
  width: 0%;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.step-attachments-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 600px) {
  .step-attachments-list {
    grid-template-columns: 1fr 1fr;
  }
}

.step-attachment-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.attachment-preview-box {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.attachment-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-preview-box span {
  font-size: 1.2rem;
}

.attachment-item-info {
  flex: 1;
  min-width: 0;
}

.attachment-item-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.attachment-item-label {
  font-size: 0.72rem;
  color: var(--primary-hover);
  font-weight: 600;
  margin-bottom: 1px;
}

.attachment-item-url-text {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: right;
}

.attachment-item-actions {
  display: flex;
  gap: 4px;
}

.attachment-item-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.75rem;
  transition: all 0.2s;
}

.attachment-item-btn:hover {
  background: var(--primary);
  color: #fff;
}

.attachment-item-btn.delete-btn:hover {
  background: var(--danger);
  color: #fff;
}

/* Loading Game Modal Styles */
.game-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.game-modal-content {
  position: relative;
  width: 90%;
  max-width: 520px;
  background: #0f0e1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.game-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2100;
}

.game-modal-close:hover {
  background: var(--danger);
  transform: rotate(90deg);
}

#loading-game-iframe {
  width: 100%;
  height: 480px;
  border: none;
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Dashboard Action Cards Grid
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin: 30px 0 40px 0;
}

.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.dashboard-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.25);
}

.dashboard-card-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.dashboard-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.dashboard-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.dashboard-btn-action {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.dashboard-btn-action.primary {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.dashboard-btn-action.primary:hover {
  background: linear-gradient(135deg, #4f46e5, var(--primary));
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.dashboard-btn-action.secondary {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}

.dashboard-btn-action.secondary:hover {
  background: linear-gradient(135deg, #db2777, #7c3aed);
}

.dashboard-btn-action.outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--border);
}

.dashboard-btn-action.outline:hover {
  border-color: var(--primary);
  color: var(--primary-hover);
}

.dashboard-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-hover);
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ==========================================================================
   Zibel Mobile-First Redesign (Matching Reference UI Style & Spacing)
   ========================================================================== */

/* Main Container Base */
.app {
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 14px 100px 14px;
  position: relative;
}

@media (min-width: 768px) {
  .app {
    max-width: 860px;
    padding-inline: 24px;
  }
}

/* 1. Header Bar */
/* 1. Header Bar (Universal & App) */
.z-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 16px;
  background: transparent;
  margin-bottom: 6px;
  position: relative;
  z-index: 100;
}

.z-header-left, .z-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.z-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(22, 18, 54, 0.82);
  border: 1px solid rgba(168, 85, 247, 0.32);
  color: var(--text-pure);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.z-icon-btn:hover {
  background: rgba(35, 42, 105, 0.85);
  border-color: rgba(217, 70, 239, 0.5);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

.z-icon-btn:active {
  transform: scale(0.94);
}

.z-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #080b26;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.7);
}

.z-brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  position: relative;
  padding: 2px 10px;
}

.z-brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.z-brand-title-text {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 35px rgba(168, 85, 247, 0.5);
}

.z-brand-neon-bar {
  width: 52px;
  height: 3.5px;
  background: linear-gradient(90deg, #38bdf8 0%, #a855f7 50%, #ec4899 100%);
  border-radius: 999px;
  margin-top: 4px;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.9), 0 0 22px rgba(236, 72, 153, 0.7);
}

.z-brand-badge {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.z-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(217, 70, 239, 0.6);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.45);
  transition: all 0.25s ease;
}

.z-user-avatar:hover {
  border-color: rgba(236, 72, 153, 0.9);
  box-shadow: 0 0 24px rgba(236, 72, 153, 0.7);
  transform: scale(1.06);
}

.z-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 2. Coin Balance Card (Deep Violet-Navy with ZPAY 3D orbital gold coins) */
.z-coin-card {
  background: radial-gradient(circle at 18% 30%, rgba(168, 85, 247, 0.25) 0%, transparent 60%),
              radial-gradient(circle at 85% 70%, rgba(236, 72, 153, 0.16) 0%, transparent 60%),
              linear-gradient(135deg, rgba(28, 18, 72, 0.92) 0%, rgba(42, 20, 100, 0.88) 50%, rgba(18, 14, 56, 0.94) 100%);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 26px;
  padding: 20px 22px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.65), 
              inset 0 1px 1px rgba(255, 255, 255, 0.18),
              0 0 24px -5px rgba(168, 85, 247, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.z-coin-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
}

.z-coin-content {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.z-coin-label {
  font-size: 0.86rem;
  color: var(--text-lavender);
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}

.z-coin-amount-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.z-coin-amount {
  font-size: 2.7rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.z-coin-icon-gold {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  border: 2px solid #fef08a;
}

.z-coin-plus-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.7);
  transition: all 0.25s ease;
}

.z-coin-plus-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
}

.z-coin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 18, 54, 0.82);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #ffffff;
  padding: 9px 20px;
  border-radius: var(--glass-radius-pill);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.z-coin-action-btn:hover, .z-coin-action-btn:active {
  background: rgba(35, 42, 105, 0.9);
  border-color: rgba(217, 70, 239, 0.7);
  box-shadow: 0 0 22px rgba(217, 70, 239, 0.5);
  transform: translateY(-2px);
}

.z-coin-graphic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.z-coin-3d-svg {
  width: 140px;
  height: 114px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6));
  animation: zibelFloat 4s ease-in-out infinite alternate;
}

/* 3. Level & Gamification Progress Card (Biodome Sprout & Luminous XP Bar) */
.z-level-card {
  background: radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.12) 0%, transparent 50%),
              radial-gradient(circle at 15% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
              linear-gradient(135deg, rgba(20, 16, 56, 0.88) 0%, rgba(14, 12, 44, 0.92) 100%);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 26px;
  padding: 18px 20px;
  margin-bottom: 18px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.16);
  position: relative;
  overflow: hidden;
}

.z-level-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.z-level-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.z-level-tag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--neon-cyan);
  font-weight: 800;
}

.z-level-crown-icon {
  color: #fbbf24;
  font-size: 1.1rem;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.8));
}

.z-level-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
  opacity: 0.95;
}

.z-biodome-graphic {
  width: 68px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.z-biodome-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(56, 189, 248, 0.45));
  animation: zibelFloat 3.5s ease-in-out infinite alternate;
}

.z-progress-bar-bg {
  width: 100%;
  height: 13px;
  background: rgba(8, 10, 34, 0.95);
  border-radius: 999px;
  overflow: visible;
  margin-bottom: 12px;
  border: 1px solid rgba(168, 85, 247, 0.28);
  position: relative;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.75);
}

.z-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.8);
  position: relative;
}

/* Glowing Spark Head / Bead at the Tip of the Progress Bar */
.z-progress-bar-fill::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px #ffffff, 0 0 22px rgba(236, 72, 153, 1), 0 0 35px rgba(168, 85, 247, 0.8);
}

.z-level-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.z-level-ratio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #ffffff;
  font-size: 0.88rem;
}

.z-level-ratio-icon {
  color: #fbbf24;
  font-size: 1rem;
  filter: drop-shadow(0 0 8px #f59e0b);
}

.z-level-link {
  color: var(--text-lavender);
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.z-level-link:hover {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.9);
}

/* 4. AI Site Creation Hero Banner (Curved Neon Contour with 3D Mascot) */
.z-ai-hero-card {
  position: relative;
  border-radius: 28px;
  background: radial-gradient(circle at 10% 20%, rgba(236, 72, 153, 0.25) 0%, transparent 60%),
              radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.2) 0%, transparent 60%),
              linear-gradient(135deg, rgba(24, 16, 68, 0.95) 0%, rgba(38, 18, 92, 0.92) 50%, rgba(16, 14, 52, 0.95) 100%);
  border: 1.5px solid rgba(168, 85, 247, 0.48);
  padding: 20px 20px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 0 32px rgba(168, 85, 247, 0.35), 
              0 0 55px rgba(236, 72, 153, 0.2), 
              0 18px 42px rgba(0, 0, 0, 0.55), 
              inset 0 1px 1px rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.z-ai-hero-card:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 70, 239, 0.8);
  box-shadow: 0 0 45px rgba(236, 72, 153, 0.5), 0 0 70px rgba(168, 85, 247, 0.35), 0 20px 48px rgba(0, 0, 0, 0.65);
}

.z-ai-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.z-ai-hero-visual-side {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.z-ai-robot-banner-img {
  width: 120px;
  height: 105px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
  animation: zibelFloat 3.8s ease-in-out infinite alternate;
}

.z-ai-hero-text-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.z-ai-hero-title {
  font-size: 1.18rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.4;
}

.neon-magenta-text {
  color: #f472b6;
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 50%, #d946ef 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.6));
}

.z-ai-hero-desc {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.45;
  font-weight: 500;
}

.z-ai-hero-cta-btn {
  margin-top: 6px;
  align-self: flex-start;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 9px 20px;
  border-radius: var(--glass-radius-pill);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 24px rgba(236, 72, 153, 0.7), 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  cursor: pointer;
}

.z-ai-hero-cta-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 32px rgba(236, 72, 153, 0.9), 0 6px 18px rgba(0, 0, 0, 0.5);
}

.z-cta-icon {
  font-size: 1.1rem;
}

.z-cta-arrow {
  font-size: 0.95rem;
  font-weight: 900;
}

/* 5. Quick Action Grid (4 Large Squircle Glass Cards) */
.z-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.z-quick-item {
  background: rgba(22, 18, 54, 0.76);
  border: 1px solid rgba(168, 85, 247, 0.24);
  border-radius: 22px;
  padding: 14px 6px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.z-quick-item:hover, .z-quick-item:active {
  transform: translateY(-4px);
  background: rgba(32, 26, 80, 0.9);
  border-color: rgba(217, 70, 239, 0.65);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55), 0 0 22px rgba(168, 85, 247, 0.4);
}

.z-quick-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: transform 0.25s ease;
}

.z-quick-item:hover .z-quick-icon-wrap {
  transform: scale(1.08);
}

.z-quick-svg-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.z-quick-icon-wrap.purple {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(99, 102, 241, 0.3));
  border: 1.5px solid rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.45);
}

.z-quick-icon-wrap.blue {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(99, 102, 241, 0.3));
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.z-quick-icon-wrap.cyan {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(168, 85, 247, 0.3));
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.z-quick-icon-wrap.pink {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(168, 85, 247, 0.3));
  border: 1.5px solid rgba(236, 72, 153, 0.55);
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.45);
}

.z-quick-icon-wrap.emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.3));
  border: 1.5px solid rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.45);
}

.z-quick-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

/* 6. Section Titles */
.z-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-inline: 4px;
}

.z-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.z-section-title-icon {
  font-size: 1.25rem;
  filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.7));
}

.z-section-action-btn {
  background: rgba(18, 22, 60, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: var(--text-lavender);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--glass-radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.z-section-action-btn:hover {
  color: #ffffff;
  border-color: rgba(217, 70, 239, 0.6);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
  background: rgba(30, 36, 90, 0.85);
}

/* 7. Daily Missions Section ("مأموریت‌های امروز" - 3 Cards Layout) */
.z-missions-card {
  background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.15) 0%, transparent 60%),
              linear-gradient(135deg, rgba(20, 16, 56, 0.88) 0%, rgba(14, 12, 44, 0.92) 100%);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 26px;
  padding: 18px 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.14);
}

.z-missions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.z-mission-card-item {
  background: rgba(12, 14, 46, 0.82);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 18px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.z-mission-card-item:hover {
  background: rgba(26, 30, 85, 0.9);
  border-color: rgba(217, 70, 239, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 14px rgba(168, 85, 247, 0.3);
}

.z-mission-coin-badge {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.z-mission-icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0;
}

.z-mission-svg-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.z-mission-title-text {
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

.z-mission-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(6, 8, 31, 0.9);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 3px;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.z-mission-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  border-radius: 999px;
}

.z-mission-progress-fill.done {
  background: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.9);
}

.z-mission-counter-text {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.z-mission-counter-text.done {
  color: #34d399;
  font-weight: 800;
}

/* 8. Compact Cards (Single-Page Form Banner, Referral) */
.z-compact-card {
  background: radial-gradient(circle at 90% 50%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
              linear-gradient(135deg, rgba(20, 16, 56, 0.88) 0%, rgba(14, 12, 44, 0.92) 100%);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 24px;
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.z-compact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 70, 239, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 18px rgba(168, 85, 247, 0.3);
}

.z-compact-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.z-compact-icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.z-compact-svg-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.z-compact-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.z-compact-subtitle {
  font-size: 0.76rem;
  color: #cbd5e1;
}

.z-compact-btn {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
  color: #ffffff;
  border: 1px solid rgba(168, 85, 247, 0.5);
  padding: 8px 18px;
  border-radius: var(--glass-radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
  transition: all 0.25s ease;
}

.z-compact-btn:hover {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  box-shadow: 0 0 22px rgba(236, 72, 153, 0.7);
  transform: scale(1.04);
}

/* 9. Storage Usage Card */
.z-storage-card {
  background: rgba(16, 20, 56, 0.75);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 24px;
  padding: 16px 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.z-storage-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.z-storage-icon-wrap {
  width: 42px;
  height: 42px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #34d399;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

.z-storage-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.z-storage-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
}

.z-storage-subtext {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.z-storage-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(6, 8, 31, 0.8);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.z-storage-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #38bdf8);
  border-radius: 10px;
  transition: width 0.5s ease;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

/* 10. Sticky Mobile Bottom Navigation Bar (Elevated Concentric Multi-Ring Home Button) */
.z-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(7, 10, 32, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid rgba(168, 85, 247, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.65);
}

.z-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  transition: all 0.2s ease;
  width: 20%;
}

.z-nav-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.z-nav-svg-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.z-nav-item:hover .z-nav-svg-icon,
.z-nav-item.active .z-nav-svg-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8));
}

.z-nav-item:hover, .z-nav-item.active {
  color: #ffffff;
}

/* Active Home Bubble with Dual Concentric Neon Rings */
.z-nav-item.home-bubble {
  position: relative;
  top: -16px;
}

.z-nav-item.home-bubble .z-nav-icon-bg {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 5px rgba(168, 85, 247, 0.28),
              0 0 0 10px rgba(99, 102, 241, 0.14),
              0 12px 30px rgba(236, 72, 153, 0.7);
  border: 3.5px solid #070a20;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.z-home-svg-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.z-home-label {
  margin-top: 3px;
  color: #ffffff;
  font-weight: 800;
}

.z-nav-item.home-bubble:hover .z-nav-icon-bg {
  transform: scale(1.08);
  box-shadow: 0 0 0 7px rgba(168, 85, 247, 0.38),
              0 0 0 14px rgba(99, 102, 241, 0.22),
              0 14px 36px rgba(236, 72, 153, 0.88);
}

.z-nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.8);
  border: 1.5px solid #070a20;
}

/* 11. Slide-over Drawer Menu Widget */
.z-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 16, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.z-drawer-sheet {
  width: 100%;
  max-width: 520px;
  background: rgba(14, 18, 54, 0.95);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 24px 20px;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 85vh;
  overflow-y: auto;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.z-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  padding-bottom: 14px;
}

.z-drawer-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.z-drawer-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.z-drawer-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.z-drawer-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.z-drawer-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(20, 26, 70, 0.65);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: var(--glass-radius-md);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  transition: all 0.25s ease;
}

.z-drawer-menu-item:hover {
  background: rgba(35, 42, 105, 0.85);
  border-color: rgba(217, 70, 239, 0.5);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
  transform: translateX(-4px);
}

.z-lock-pill {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
}

/* User Sites Management Grid */
.z-sites-container {
  margin-bottom: 24px;
}

.z-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.z-site-card {
  background: rgba(16, 20, 56, 0.72);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: var(--glass-radius-md);
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-card);
}

.z-site-card:hover {
  border-color: rgba(217, 70, 239, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.3);
}

.z-site-preview-header {
  height: 96px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(168, 85, 247, 0.35));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 2.2rem;
}

.z-site-status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.z-site-body {
  padding: 14px 16px;
}

.z-site-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.z-site-url {
  font-size: 0.76rem;
  color: var(--text-secondary);
  direction: ltr;
  text-align: right;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.z-site-actions {
  display: flex;
  gap: 8px;
}

.z-site-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--glass-radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.z-site-btn.primary {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

.z-site-btn.primary:hover {
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.7);
  transform: translateY(-1px);
}

.z-site-btn.outline {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.z-site-btn.outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}


