/* ===========================================================
   نون بیار، کباب ببر — shared components for sub-pages
   (Shop · Leaderboard · Missions · Settings · Search)
   builds on game.css tokens
   =========================================================== */

/* shared page scaffold */
.page{ display:flex; flex-direction:column; height:100%; }
.scroll{ flex:1; overflow-y:auto; overflow-x:hidden; padding:14px 14px 96px; }
.scroll::-webkit-scrollbar{ width:0; }

/* ---------- sub-page header ---------- */
.subhead{ display:flex; align-items:center; gap:10px; padding:4px 12px 11px; position:relative; z-index:30;
  background:linear-gradient(180deg,#3a2620,#2b1b14ee); border-bottom:1.5px solid var(--gold-line); }
.subhead .back{ width:42px; height:42px; border-radius:50%; flex:0 0 auto; display:grid; place-items:center;
  background:linear-gradient(180deg,#3a2620,#21140e); border:1.6px solid var(--gold-line); color:#e9c79a; text-decoration:none; }
.subhead .back .ic{ width:23px; height:23px; transform:scaleX(-1); }
.subhead .h-title{ font-family:var(--font-display); font-size:25px; line-height:1; display:flex; align-items:center; gap:9px; }
.subhead .h-title .ic{ width:26px; height:26px; color:var(--brand-primary); }
.subhead .sh-chips{ margin-inline-start:auto; display:flex; gap:7px; }
.subhead .chip{ height:32px; font-size:13.5px; }

/* ---------- tabs (segmented) ---------- */
.tabs{ display:flex; gap:6px; padding:6px; border-radius:15px; margin-bottom:14px;
  background:linear-gradient(180deg,#23150f,#160d09); border:1.5px solid var(--gold-line); }
.tab{ flex:1; text-align:center; padding:9px 4px; border-radius:10px; font-weight:800; font-size:13px;
  color:var(--text-secondary); cursor:pointer; white-space:nowrap; display:flex; align-items:center; justify-content:center; gap:5px; }
.tab .ic{ width:16px; height:16px; }
.tab.active{ color:#3a230b; background:linear-gradient(180deg,var(--gold-1),var(--gold-2));
  box-shadow:0 3px 8px -2px rgba(244,179,36,.6); }

/* ---------- shop ---------- */
.featured{ position:relative; border-radius:18px; overflow:hidden; padding:16px 18px; margin-bottom:16px;
  border:2px solid var(--gold-line); box-shadow:var(--shadow-card);
  background:linear-gradient(110deg,#7a2118 0%,#54160f 55%,#3a2218 100%); display:flex; align-items:center; gap:14px; }
.featured::after{ content:''; position:absolute; inset:0; opacity:.4; pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23f4b324' stroke-opacity='0.2' stroke-width='1.2'%3E%3Cpath d='M30 6l6 6-6 6-6-6z'/%3E%3Ccircle cx='30' cy='30' r='12'/%3E%3C/g%3E%3C/svg%3E");
  background-size:64px 64px; }
.featured .f-art{ width:96px; height:96px; flex:0 0 auto; display:grid; place-items:center; position:relative; z-index:1; }
.featured .f-art img{ width:96px; height:auto; filter:drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
.featured .f-body{ flex:1; position:relative; z-index:1; }
.featured .f-tag{ display:inline-block; font-size:11px; font-weight:800; color:#3a230b; padding:2px 9px; border-radius:8px;
  background:linear-gradient(180deg,var(--gold-1),var(--gold-2)); margin-bottom:6px; }
.featured .f-name{ font-family:var(--font-display); font-size:27px; line-height:1; color:#fff7ec; }
.featured .f-desc{ font-size:12px; color:var(--text-secondary); font-weight:600; margin:5px 0 10px; }

.shop-grid{ display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.shop-card{ border-radius:15px; padding:12px 10px 10px; position:relative; overflow:hidden;
  border:1.6px solid var(--gold-line); box-shadow:var(--shadow-card);
  background:linear-gradient(180deg,#3a2620,#241710); display:flex; flex-direction:column; }
.shop-card .sc-rarity{ position:absolute; top:0; inset-inline-start:0; font-size:9.5px; font-weight:900; letter-spacing:.4px;
  padding:3px 12px 3px 9px; border-bottom-right-radius:10px; color:#2b1b14; }
.rar-common{ background:linear-gradient(180deg,#cbb8a6,#9c8678); }
.rar-rare{ background:linear-gradient(180deg,#7ec8ff,#3e8fe0); color:#06243f; }
.rar-epic{ background:linear-gradient(180deg,#caa0ff,#8a4ce0); color:#fff; }
.rar-legend{ background:linear-gradient(180deg,var(--gold-1),var(--gold-2)); }
.shop-card .sc-art{ height:112px; display:grid; place-items:center; margin:8px 0 6px; }
.shop-card .sc-art img{ width:108px; height:auto; filter:drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
.shop-card .sc-art .ic{ width:62px; height:62px; }
.shop-card .sc-name{ font-family:var(--font-display); font-size:18px; line-height:1.05; text-align:center; }
.shop-card .sc-sub{ font-size:10.5px; color:var(--text-secondary); text-align:center; font-weight:600; margin-top:2px; min-height:13px; }
.price-btn{ margin-top:9px; height:38px; border-radius:11px; border:none; cursor:pointer; width:100%;
  display:flex; align-items:center; justify-content:center; gap:6px; font-weight:900; font-size:15px; font-variant-numeric:tabular-nums;
  color:#3a230b; background:linear-gradient(180deg,var(--gold-1),var(--gold-2)); box-shadow:0 3px 0 #a9711a; }
.price-btn .ic{ width:19px; height:19px; }
.price-btn.gem{ color:#06243f; background:linear-gradient(180deg,#9fd0ff,#3e8fe0); box-shadow:0 3px 0 #1f5e9e; }
.price-btn.owned{ color:#cfe6c4; background:linear-gradient(180deg,#2f5b34,#21401f); box-shadow:0 3px 0 #163; cursor:default; }
.price-btn.equipped{ color:#3a230b; background:linear-gradient(180deg,#fbe08a,#f4b324); box-shadow:0 3px 0 #a9711a; }
.shop-card.locked .sc-art{ filter:grayscale(.5) brightness(.7); }

/* coin packs */
.pack-grid{ display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.pack{ border-radius:15px; padding:14px 12px; text-align:center; position:relative; overflow:hidden;
  border:1.6px solid var(--gold-line); box-shadow:var(--shadow-card); background:linear-gradient(180deg,#3a2620,#241710); }
.pack .p-bonus{ position:absolute; top:9px; inset-inline-end:-26px; transform:rotate(38deg); width:90px; text-align:center;
  background:var(--danger); color:#fff; font-size:10px; font-weight:900; padding:2px 0; box-shadow:0 2px 5px rgba(0,0,0,.4); }
.pack .p-coins{ width:64px; height:64px; margin:2px auto 6px; display:grid; place-items:center; }
.pack .p-coins .ic{ width:58px; height:58px; }
.pack .p-amt{ font-family:var(--font-display); font-size:23px; line-height:1; }
.pack .p-price{ margin-top:9px; height:36px; border-radius:11px; display:flex; align-items:center; justify-content:center;
  font-weight:900; font-size:15px; color:#fff; background:linear-gradient(180deg,#2f5b34,#21401f); box-shadow:0 3px 0 #163; }

/* ---------- leaderboard ---------- */
.podium{ display:flex; align-items:flex-end; justify-content:center; gap:10px; margin:6px 0 18px; }
.pod{ flex:1; max-width:118px; display:flex; flex-direction:column; align-items:center; }
.pod .p-av{ border-radius:50%; overflow:hidden; display:grid; place-items:center; position:relative;
  background:radial-gradient(circle at 50% 35%,#6b4a3a,#241710); }
.pod .p-av .ic{ color:#e9c79a; }
.pod .p-av .crown{ position:absolute; top:-17px; left:50%; transform:translateX(-50%); width:28px; height:28px; color:var(--brand-primary); filter:drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.pod .p-name{ font-weight:800; font-size:12.5px; margin-top:7px; white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.pod .p-score{ display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:800; color:var(--brand-primary); font-variant-numeric:tabular-nums; margin-top:2px; }
.pod .p-score .ic{ width:13px; height:13px; }
.pod .p-base{ width:100%; border-radius:12px 12px 0 0; margin-top:9px; display:grid; place-items:center;
  font-family:var(--font-display); font-size:30px; color:#3a230b; border:1.6px solid var(--gold-line); border-bottom:none; }
.pod.first .p-av{ width:78px; height:78px; border:3px solid var(--brand-primary); box-shadow:0 0 0 2px #160d09,0 6px 16px -4px rgba(244,179,36,.6); }
.pod.first .p-av .ic{ width:54px; height:54px; }
.pod.first .p-base{ height:96px; background:linear-gradient(180deg,var(--gold-1),var(--gold-2)); }
.pod.second .p-av{ width:62px; height:62px; border:3px solid #cfd6dd; }
.pod.second .p-av .ic{ width:44px; height:44px; }
.pod.second .p-base{ height:70px; background:linear-gradient(180deg,#e6edf3,#aab4bd); }
.pod.third .p-av{ width:62px; height:62px; border:3px solid #d08a4a; }
.pod.third .p-av .ic{ width:44px; height:44px; }
.pod.third .p-base{ height:56px; background:linear-gradient(180deg,#e0a36a,#bd7333); }

.lb-list{ display:flex; flex-direction:column; gap:8px; }
.lb-row{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px;
  background:linear-gradient(180deg,#3a2620,#2a1a13); border:1.5px solid rgba(255,255,255,.08); }
.lb-row .rank{ width:26px; text-align:center; font-family:var(--font-display); font-size:20px; color:var(--text-secondary); flex:0 0 auto; }
.lb-row .lb-av{ width:44px; height:44px; border-radius:50%; flex:0 0 auto; overflow:hidden; display:grid; place-items:center;
  border:2px solid var(--gold-2); background:radial-gradient(circle at 50% 35%,#6b4a3a,#241710); }
.lb-row .lb-av .ic{ width:30px; height:30px; color:#e9c79a; }
.lb-row .lb-info{ flex:1; min-width:0; }
.lb-row .lb-name{ font-weight:800; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lb-row .lb-meta{ font-size:11.5px; color:var(--text-secondary); font-weight:700; display:flex; align-items:center; gap:5px; margin-top:2px; }
.lb-row .lb-meta .ic{ width:13px; height:13px; }
.lb-row .lb-score{ text-align:center; flex:0 0 auto; }
.lb-row .lb-score b{ font-family:var(--font-display); font-size:20px; color:var(--brand-primary); font-variant-numeric:tabular-nums; }
.lb-row .lb-score span{ display:block; font-size:9.5px; color:var(--text-muted); font-weight:700; }
.lb-row.me{ background:linear-gradient(90deg,#7a4d1c,#43290f); border-color:var(--brand-primary); box-shadow:0 0 0 1px var(--brand-primary); }
.lb-row.me .rank{ color:var(--brand-primary); }
.streak{ display:inline-flex; align-items:center; gap:3px; color:var(--brand-secondary); }
.streak .ic{ width:14px; height:14px; }

/* ---------- missions ---------- */
.mission{ display:flex; align-items:center; gap:12px; padding:12px; border-radius:15px; margin-bottom:10px;
  background:linear-gradient(180deg,#3a2620,#241710); border:1.5px solid rgba(255,255,255,.09); box-shadow:var(--shadow-card); }
.mission .m-ic{ width:48px; height:48px; border-radius:13px; flex:0 0 auto; display:grid; place-items:center;
  background:radial-gradient(circle at 50% 35%,#5a3a28,#2c1b13); border:1.5px solid var(--gold-line); }
.mission .m-ic .ic{ width:28px; height:28px; color:var(--brand-primary); }
.mission .m-body{ flex:1; min-width:0; }
.mission .m-title{ font-weight:800; font-size:14.5px; }
.mission .m-reward{ font-size:11.5px; color:var(--text-secondary); font-weight:700; display:flex; align-items:center; gap:4px; margin-top:1px; }
.mission .m-reward .ic{ width:14px; height:14px; }
.prog{ height:9px; border-radius:6px; background:#0e0705; overflow:hidden; border:1px solid rgba(255,255,255,.12); margin-top:8px; position:relative; }
.prog > i{ display:block; height:100%; border-radius:6px; background:linear-gradient(90deg,#f4b324,#e5601f); box-shadow:0 0 7px rgba(244,179,36,.5); }
.prog-txt{ font-size:10.5px; font-weight:800; color:var(--text-secondary); font-variant-numeric:tabular-nums; margin-top:5px; }
.m-action{ flex:0 0 auto; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.m-claim{ height:40px; min-width:74px; padding:0 14px; border-radius:11px; border:none; cursor:pointer; font-family:var(--font-display); font-size:17px;
  color:#3a230b; background:linear-gradient(180deg,var(--gold-1),var(--gold-2)); box-shadow:0 3px 0 #a9711a; white-space:nowrap; }
.m-claim.done{ color:#cfe6c4; background:linear-gradient(180deg,#2f5b34,#21401f); box-shadow:0 3px 0 #163; display:flex; align-items:center; gap:5px; }
.m-claim.done .ic{ width:18px; height:18px; }
.m-claim:disabled{ filter:grayscale(.5) brightness(.7); cursor:default; box-shadow:0 3px 0 #4a3026; }
.mission.complete{ border-color:var(--brand-primary); box-shadow:0 0 0 1px rgba(244,179,36,.5), var(--shadow-card); }

/* pass banner */
.pass{ border-radius:16px; padding:14px 16px; margin-bottom:16px; position:relative; overflow:hidden;
  background:linear-gradient(110deg,#4b3170,#33214d); border:2px solid #7a5ce0; box-shadow:var(--shadow-card); }
.pass .p-head{ display:flex; align-items:center; justify-content:space-between; }
.pass .p-h-t{ font-family:var(--font-display); font-size:21px; display:flex; align-items:center; gap:8px; }
.pass .p-h-t .ic{ width:24px; height:24px; color:#caa0ff; }
.pass .p-time{ font-size:11.5px; font-weight:800; color:#d9c9ff; }
.pass .prog{ margin-top:11px; }
.pass .prog > i{ background:linear-gradient(90deg,#caa0ff,#8a4ce0); box-shadow:0 0 7px rgba(138,76,224,.5); }

/* ---------- settings ---------- */
.set-group{ border-radius:15px; margin-bottom:14px; overflow:hidden;
  background:linear-gradient(180deg,#3a2620,#241710); border:1.5px solid var(--gold-line); box-shadow:var(--shadow-card); }
.set-glabel{ font-family:var(--font-display); font-size:15px; color:var(--brand-primary); padding:11px 14px 4px; display:flex; align-items:center; gap:8px; }
.set-glabel .ic{ width:18px; height:18px; }
.set-row{ display:flex; align-items:center; gap:13px; padding:13px 14px; border-top:1px solid rgba(255,255,255,.06); }
.set-row:first-of-type{ border-top:none; }
.set-row .s-ic{ width:38px; height:38px; border-radius:11px; flex:0 0 auto; display:grid; place-items:center;
  background:radial-gradient(circle at 50% 35%,#5a3a28,#2c1b13); border:1.4px solid rgba(255,255,255,.12); }
.set-row .s-ic .ic{ width:21px; height:21px; color:#e9c79a; }
.set-row .s-body{ flex:1; min-width:0; }
.set-row .s-title{ font-weight:800; font-size:14.5px; }
.set-row .s-sub{ font-size:11px; color:var(--text-secondary); font-weight:600; margin-top:1px; }
.set-row .s-val{ font-size:13px; font-weight:800; color:var(--text-secondary); display:flex; align-items:center; gap:6px; }
.set-row .s-val .ic{ width:16px; height:16px; }

/* toggle */
.toggle{ width:52px; height:30px; border-radius:16px; flex:0 0 auto; position:relative; cursor:pointer;
  background:#1b100b; border:1.5px solid var(--gold-line); transition:background .2s; }
.toggle::after{ content:''; position:absolute; top:2px; inset-inline-start:2px; width:24px; height:24px; border-radius:50%;
  background:linear-gradient(180deg,#e9d6c2,#bfa890); transition:inset-inline-start .2s, transform .2s; box-shadow:0 2px 4px rgba(0,0,0,.4); }
.toggle.on{ background:linear-gradient(90deg,#7a4d1c,#caa23a); border-color:var(--brand-primary); }
.toggle.on::after{ inset-inline-start:calc(100% - 26px); background:linear-gradient(180deg,#fff,#f4d77a); }

/* slider */
.s-slider{ flex:1; max-width:140px; height:8px; border-radius:5px; position:relative; direction:ltr;
  background:#1b100b; border:1px solid var(--gold-line); }
.s-slider > i{ position:absolute; inset:0 auto 0 0; border-radius:5px; background:linear-gradient(90deg,#f4b324,#e5601f); }
/* knob is CENTERED on its `left` % (translate -50%) and never drifts past the track */
.s-slider .knob{ position:absolute; top:50%; left:0; width:20px; height:20px; border-radius:50%; transform:translate(-50%,-50%);
  background:linear-gradient(180deg,#fff,#f4d77a); border:1.5px solid var(--gold-3); box-shadow:0 2px 5px rgba(0,0,0,.5); }
.seg{ display:flex; gap:4px; background:#1b100b; border:1.5px solid var(--gold-line); border-radius:11px; padding:3px; }
.seg .o{ padding:5px 12px; border-radius:8px; font-size:12.5px; font-weight:800; color:var(--text-secondary); cursor:pointer; }
.seg .o.active{ color:#3a230b; background:linear-gradient(180deg,var(--gold-1),var(--gold-2)); }

.set-foot{ text-align:center; color:var(--text-muted); font-size:11.5px; font-weight:700; margin:6px 0 4px; }

/* ---------- search / matchmaking ---------- */
.search{ position:relative; height:100%; display:flex; flex-direction:column; align-items:center; overflow:hidden; }
.search .s-cancel-top{ position:absolute; top:46px; inset-inline-start:16px; z-index:5; }
.search .s-stage{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; width:100%; }
.search .s-radar{ position:relative; width:248px; height:248px; display:grid; place-items:center; }
.search .s-radar .ring{ position:absolute; border-radius:50%; border:2px solid rgba(244,179,36,.35); }
.search .s-radar .ring.r1{ inset:0; animation:pulse 2.6s ease-out infinite; }
.search .s-radar .ring.r2{ inset:40px; animation:pulse 2.6s ease-out infinite .6s; }
.search .s-radar .ring.r3{ inset:80px; animation:pulse 2.6s ease-out infinite 1.2s; }
@keyframes pulse{ 0%{ transform:scale(.7); opacity:0; } 35%{ opacity:.9; } 100%{ transform:scale(1.12); opacity:0; } }
.search .s-radar .sweep{ position:absolute; inset:0; border-radius:50%; overflow:hidden; }
.search .s-radar .sweep::after{ content:''; position:absolute; top:50%; left:50%; width:50%; height:50%; transform-origin:top left;
  background:conic-gradient(from 0deg, rgba(244,179,36,.42), transparent 55%); animation:spin 2.4s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.search .s-core{ width:108px; height:108px; border-radius:50%; display:grid; place-items:center; position:relative; z-index:2;
  background:radial-gradient(circle at 50% 35%,#6b4a3a,#241710); border:3px solid var(--gold-2);
  box-shadow:0 0 30px rgba(244,179,36,.4), inset 0 2px 6px rgba(0,0,0,.5); }
.search .s-core .ic{ width:58px; height:58px; color:#e9c79a; }
.search .s-blip{ position:absolute; width:34px; height:34px; border-radius:50%; display:grid; place-items:center; z-index:3;
  background:radial-gradient(circle at 50% 35%,#3a4f7a,#16243f); border:2px solid var(--enemy); box-shadow:0 0 12px rgba(91,141,239,.6); }
.search .s-blip .ic{ width:22px; height:22px; color:#cfe0ff; }
.search .s-blip.b1{ top:14px; inset-inline-end:30px; animation:blip 3s ease-in-out infinite; }
.search .s-blip.b2{ bottom:38px; inset-inline-start:22px; animation:blip 3s ease-in-out infinite 1s; }
.search .s-blip.b3{ top:60px; inset-inline-start:6px; animation:blip 3s ease-in-out infinite 1.8s; }
@keyframes blip{ 0%,100%{ opacity:0; transform:scale(.4); } 30%,70%{ opacity:1; transform:scale(1); } }
.search .s-title{ font-family:var(--font-display); font-size:30px; margin-top:34px; text-align:center; }
.search .s-sub{ font-size:14px; color:var(--text-secondary); font-weight:700; margin-top:7px; text-align:center; }
.search .s-dots{ display:inline-flex; gap:5px; margin-inline-start:3px; }
.search .s-dots i{ width:6px; height:6px; border-radius:50%; background:var(--brand-primary); animation:dot 1.4s ease-in-out infinite; }
.search .s-dots i:nth-child(2){ animation-delay:.2s } .search .s-dots i:nth-child(3){ animation-delay:.4s }
@keyframes dot{ 0%,100%{ opacity:.3; transform:translateY(0); } 50%{ opacity:1; transform:translateY(-3px); } }
.search .s-rating{ display:flex; align-items:center; gap:9px; margin-top:22px; padding:9px 18px; border-radius:16px;
  background:linear-gradient(90deg,#7a4d1c,#43290f); border:1.6px solid var(--brand-primary); box-shadow:var(--shadow-card); }
.search .s-rating .ic{ width:24px; height:24px; color:var(--brand-primary); }
.search .s-rating b{ font-family:var(--font-display); font-size:24px; color:#fff7ec; }
.search .s-rating span{ font-size:12px; color:var(--text-secondary); font-weight:700; }
.search .s-foot{ width:100%; padding:0 22px 40px; display:flex; flex-direction:column; gap:12px; }
.search .s-ai{ display:flex; align-items:center; gap:12px; padding:13px 16px; border-radius:15px;
  background:linear-gradient(180deg,#2f5b34,#1f3d23); border:1.6px solid #5db35f; box-shadow:var(--shadow-card); cursor:pointer; text-decoration:none; color:inherit; }
.search .s-ai .ai-ic{ width:46px; height:46px; border-radius:12px; flex:0 0 auto; display:grid; place-items:center; background:#173b2a; color:#cfe6c4; }
.search .s-ai .ai-ic .ic{ width:30px; height:30px; }
.search .s-ai .ai-t{ flex:1; }
.search .s-ai .ai-t b{ font-family:var(--font-display); font-size:19px; }
.search .s-ai .ai-t span{ display:block; font-size:11.5px; color:#bfe0c4; font-weight:700; margin-top:1px; }
.btn-cancel{ width:100%; height:56px; border-radius:14px; font-family:var(--font-display); font-size:23px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:9px; color:#ffd9d2; text-decoration:none;
  background:linear-gradient(180deg,#5a201b,#3a1311); border:1.6px solid #9a3a30; box-shadow:var(--shadow-card); }
.btn-cancel .ic{ width:22px; height:22px; }

/* nav as links */
.nav a.nav-item{ text-decoration:none; }
