:root {
  --bg: #04150f;
  --bg-grad: radial-gradient(circle at 85% 5%, rgba(212, 175, 55, 0.16), transparent 45%),
             radial-gradient(circle at 10% 30%, rgba(16, 185, 129, 0.18), transparent 50%),
             radial-gradient(circle at 50% 95%, rgba(212, 175, 55, 0.1), transparent 50%);
  --card: rgba(9, 34, 25, 0.72);
  --card-hover: rgba(13, 46, 34, 0.85);
  --tx: #f4f6f0;
  --mut: #9ab3a7;
  --pri: #d4af37;
  --pri2: #f5d77f;
  --pri-dark: #9e7b18;
  --bd: rgba(212, 175, 55, 0.25);
  --bd-hover: rgba(245, 215, 127, 0.6);
  --ok: #34d399;
  --err: #fb7185;
  --sh: 0 14px 35px rgba(0, 0, 0, 0.55);
  --glow: 0 8px 25px rgba(212, 175, 55, 0.35);
  --glow-hover: 0 14px 32px rgba(245, 215, 127, 0.55);
  --ov: rgba(4, 21, 15, 0.82);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--tx);
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  line-height: 1.9;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-img, none) center/cover no-repeat;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-grad), linear-gradient(var(--ov), var(--ov));
}

a {
  color: var(--pri2);
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

.wrap {
  max-width: 980px;
  margin: auto;
  padding: 0 14px calc(100px + env(safe-area-inset-bottom));
}

/* نوار ناوبری شناور و شیشه‌ای */
nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  margin: calc(12px + env(safe-area-inset-top)) 0 18px;
  background: rgba(7, 28, 20, 0.78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--bd);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(245, 215, 127, 0.15);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

nav:hover {
  border-color: var(--bd-hover);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
  min-width: 0;
}

.logo img {
  height: 42px;
  width: 42px;
  border-radius: 13px;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--pri);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.logo span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(135deg, #fff 10%, var(--pri2) 50%, var(--pri) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.25));
}

/* دکمه منو شناور */
#nv a {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pri2), var(--pri));
  color: #051610;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

#nv a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(245, 215, 127, 0.55);
}

.hero {
  text-align: center;
  padding: 28px 6px 14px;
}

.hero h1 {
  font-size: clamp(25px, 6vw, 42px);
  line-height: 1.5;
  margin: 0 0 10px;
  font-weight: 900;
  background: linear-gradient(180deg, #ffffff 30%, var(--pri2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.4));
}

.hero p {
  color: var(--mut);
  max-width: 560px;
  margin: auto;
  font-size: 15px;
}

/* کارت‌های شیشه‌ای مدرن با حاشیه طلایی */
.card {
  background: var(--card);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--bd);
  border-radius: 24px;
  padding: 22px;
  margin: 18px 0;
  box-shadow: var(--sh), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: var(--bd-hover);
  background: var(--card-hover);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(212, 175, 55, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.grid .card {
  margin: 0;
}

h2, h3 {
  margin: 8px 0;
  color: var(--pri2);
  font-weight: 800;
}

/* اعداد شاخص طلایی */
.big {
  font-size: 54px;
  font-weight: 900;
  text-align: center;
  line-height: 1.3;
  background: linear-gradient(135deg, #fff 15%, var(--pri2) 55%, var(--pri) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 15px rgba(212, 175, 55, 0.3));
}

.big small {
  font-size: 16px;
  font-weight: 500;
  color: var(--mut);
  -webkit-text-fill-color: var(--mut);
}

/* اسلایدر مدرن طلایی */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pri-dark), var(--pri), var(--pri2));
  outline: none;
  direction: ltr;
  margin: 22px 0;
  padding: 0;
  border: 1px solid rgba(245, 215, 127, 0.3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 20%, var(--pri2) 70%, var(--pri) 100%);
  border: 3px solid #04150f;
  box-shadow: 0 0 18px rgba(245, 215, 127, 0.85);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 25px rgba(245, 215, 127, 1);
}

input[type=range]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 20%, var(--pri2) 70%, var(--pri) 100%);
  border: 3px solid #04150f;
  box-shadow: 0 0 18px rgba(245, 215, 127, 0.85);
  cursor: pointer;
}

.price {
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--pri2);
  text-shadow: 0 2px 12px rgba(212, 175, 55, 0.35);
  margin: 8px 0 4px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0;
}

label {
  display: block;
  font-size: 13px;
  color: var(--mut);
  margin: 14px 0 6px;
  font-weight: 600;
}

/* فیلدهای ورودی تیره و شیک */
input:not([type=range]):not([type=file]),
select,
textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 15px;
  border: 1px solid var(--bd);
  background: rgba(4, 18, 13, 0.85);
  color: var(--tx);
  font: inherit;
  font-size: 15px;
  min-height: 48px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

textarea {
  resize: vertical;
}

input[type=file] {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--mut);
  padding: 10px;
  border: 1px dashed var(--bd);
  border-radius: 14px;
  background: rgba(4, 18, 13, 0.5);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--pri2);
  background: rgba(6, 26, 19, 0.95);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}

/* دکمه‌های اصلی شناور با درخشش طلایی */
.btn {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  padding: 15px;
  margin-top: 16px;
  min-height: 52px;
  font: 800 16px Vazirmatn, Tahoma, sans-serif;
  color: #04150f;
  background: linear-gradient(135deg, var(--pri2) 0%, var(--pri) 50%, #b88e22 100%);
  box-shadow: var(--glow), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, filter 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--glow-hover), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.sec {
  background: rgba(12, 42, 31, 0.6);
  color: var(--pri2);
  border: 1px solid var(--bd);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn.sec:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--pri2);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.2);
}

/* چیپ‌ها و دکمه‌های کوچک */
.chip {
  display: inline-block;
  border: 1px solid var(--bd);
  background: rgba(8, 32, 23, 0.75);
  color: var(--tx);
  border-radius: 99px;
  padding: 7px 16px;
  min-height: 36px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  margin: 3px 0 3px 6px;
  text-decoration: none;
  transition: all 0.22s ease;
}

.chip:hover {
  border-color: var(--pri2);
  background: rgba(212, 175, 55, 0.18);
  color: var(--pri2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.chip:disabled {
  opacity: 0.4;
  transform: none;
}

.note {
  font-size: 13px;
  color: var(--mut);
  margin-top: 10px;
}

.ok {
  color: var(--ok);
  font-weight: 700;
}

.err {
  color: var(--err);
  font-weight: 700;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
  flex-wrap: wrap;
  font-size: 14px;
}

.row:last-child {
  border: 0;
}

.row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mono {
  direction: ltr;
  text-align: left;
  font-family: Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  background: rgba(3, 14, 10, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--pri2);
  padding: 12px;
  border-radius: 14px;
  display: block;
  margin: 10px 0;
}

/* نوار پیشرفت */
.bar {
  height: 11px;
  background: rgba(4, 18, 13, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 99px;
  overflow: hidden;
  margin: 12px 0;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pri-dark), var(--pri), var(--pri2));
  box-shadow: 0 0 12px rgba(245, 215, 127, 0.6);
  border-radius: 99px;
}

.thumb {
  display: block;
  max-height: 75px;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--bd);
  margin: 8px 0;
}

footer {
  text-align: center;
  color: var(--mut);
  font-size: 13px;
  padding: 28px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  margin-top: 20px;
}

/* دکمه‌های شناور گوشه صفحه با انیمیشن معلق */
@keyframes floatBtn {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

.fab {
  position: fixed;
  left: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 30;
}

.fab a {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(245, 215, 127, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 0 15px rgba(212, 175, 55, 0.25);
  animation: floatBtn 3.5s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.fab a:nth-child(2) {
  animation-delay: 0.6s;
}

.fab a:nth-child(3) {
  animation-delay: 1.2s;
}

.fab a:hover,
.fab a:active {
  animation-play-state: paused;
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.65), 0 0 22px rgba(245, 215, 127, 0.7);
}

.fab svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fab .tg {
  background: linear-gradient(135deg, #2aabee, #157ab5);
}

.fab .ig {
  background: linear-gradient(45deg, #f9a825, #e1306c, #833ab4);
}

.fab .sp {
  background: linear-gradient(135deg, var(--pri2), var(--pri));
}

.fab .sp svg {
  stroke: #04150f;
  stroke-width: 2.3;
}

@media (max-width: 600px) {
  .wrap {
    padding: 0 10px calc(100px + env(safe-area-inset-bottom));
  }
  .card {
    padding: 18px;
    border-radius: 20px;
  }
  .big {
    font-size: 44px;
  }
  .row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .row > span:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .fab a {
    width: 52px;
    height: 52px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}