:root{
  --bg: #0f1724;
  --card: #0b1220;
  --muted: #98a0b3;
  --accent: linear-gradient(90deg,#F6C84C 0%, #FFB86C 100%);
  --glass: rgba(255,255,255,0.03);
  --glass-2: rgba(255,255,255,0.02);
  --success: #2dd4bf;
  --danger: #ff6b6b;
  --radius: 14px;
  --card-padding: 18px;
  --shadow: 0 6px 18px rgba(2,6,23,0.6);
}

a {
    text-decoration: none;
}

@font-face {
    font-family: dana;
    font-style: normal;
    src: url("dana/woff2/DanaFaNum-Regular.woff2") format("woff2"), url("dana/woff/DanaFaNum-Regular.woff") format("woff");
}
* {
    font-family: dana !important;
}

html,body{height:100%}

body{
  margin:0;
  background: radial-gradient(1200px 500px at 10% 10%, rgba(86,83,255,0.08), transparent 6%),
              linear-gradient(180deg, #071022 0%, #061021 100%);
  color:#e6eef8;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding:36px;
  box-sizing:border-box;
}

#phoneModalOverlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#phoneModal {
  background: #1e1e2f;
  color: white;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 0 20px rgba(255,255,255,0.1);
  max-width: 300px;
  width: 90%;
  font-family: sans-serif;
}

#passwordInput,
#phoneInput {
  width: inherit;
  padding: 10px;
  border-radius: 8px;
  border: none;
  margin-top: 10px;
  text-align: center;
  font-size: 16px;
  background: #0f0f1a;
  color: #fff;
}

#submitPhone {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background-color: #00c3ff;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

#submitPhone:hover {
  background-color: #0099cc;
}

#errorMsg {
  color: #ff5555;
  margin-top: 10px;
  font-size: 14px;
}

.wrap{
  max-width:1200px;
  margin:0 auto;
  padding-bottom: 50px;
}

header{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:22px;
}

.brand{
  display:flex;
  gap:14px;
  align-items:center;
}
.logo{
  padding: 0 10px;
  height:56px;
  border-radius:12px;
  background:var(--accent);
  display:grid;
  place-items:center;
  font-weight:700;
  color:#06203a;
  box-shadow: 0 6px 20px rgba(0,0,0,0.48);
  font-size:20px;
}
h1{
  margin:0;
  font-size:18px;
  letter-spacing:0.6px;
}
p.lead{
  margin:0;
  color:var(--muted);
  font-size:13px;
}

#showQRCode {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 99999;
    transition: all .3s ease;
}

#showQRCode.show {
    opacity: 1;
    visibility: visible;
}

#showQRCode .backDark {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgb(0 0 0 / 30%);
    backdrop-filter: blur(20px);
}

#showQRCode #qrImage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
}

/* controls */
.config-text {
    background: transparent;
    color: #969ca7;
    padding: 7px 10px 5px;
    border: 1px dashed #374663;
    border-radius: 9px;
    font-size: 12px;
    direction: ltr;
    word-break: break-all;
}
.controls{
  display:flex;
  gap:10px;
  align-items:center;
}
.search{
  position:relative;
}
.search input{
  background:var(--glass);
  border:1px solid rgba(255,255,255,0.04);
  padding:10px 12px;
  width:220px;
  border-radius:10px;
  color:var(--muted);
  outline:none;
  font-size:13px;
}
.select{
  background: var(--glass);
  border-radius: 10px;
  padding: 10px 30px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 13px;
  text-decoration: none;
  font-weight: bold;
}

/* grid */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap:18px;
}

/* card */
.card{
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.015));
  border-radius:var(--radius);
  padding:var(--card-padding);
  box-shadow:var(--shadow);
  border:1px solid rgba(255,255,255,0.03);
  transition:transform .18s ease, box-shadow .18s ease;
  backdrop-filter: blur(6px);
  display:flex;
  flex-direction:column;
  gap:12px;
}
.card:hover{
  transform:translateY(-7px);
  box-shadow: 0 18px 40px rgba(2,6,23,0.7);
}

.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.badge{
  font-size:12px;
  padding:6px 10px;
  background:var(--glass-2);
  border-radius:999px;
  color:var(--muted);
  border:1px solid rgba(255,255,255,0.02);
}

.title{
  font-weight: bold;
  font-size: 16px;
  line-height: 1.15;
  margin-bottom: 10px;
}
.sub{
  color:var(--muted);
  font-size:12px;
}

.volume{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.volume .item{
  background:rgba(255,255,255,0.02);
  padding:6px 8px;
  border-radius:8px;
  font-size:13px;
  color:var(--muted);
  border:1px solid rgba(255,255,255,0.02);
}

.price-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.price{
  font-size:18px;
  font-weight:800;
  background:linear-gradient(90deg,#FFD77A 0%,#FF9770 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.price small{
  display:block;
  font-size:12px;
  font-weight:600;
  color:var(--muted);
  margin-top:2px;
}

.meta{
  display:flex;
  gap:10px;
  align-items:center;
  color:var(--muted);
  font-size:13px;
}

.actions{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:auto;
}
.btn{
  border:0;
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
}
.btn-buy{
  background: linear-gradient(90deg,#27E9C5,#18BFAF);
  color:#042026;
  box-shadow: 0 8px 20px rgba(24,191,175,0.14);
}
.btn-details{
  background:transparent;
  color:var(--muted);
  border:1px solid rgba(255,255,255,0.03);
}

.small{
  font-size:12px;
  color:var(--muted);
}

/* ribbon */
.ribbon{
  position:relative;
  display:inline-block;
  padding:6px 10px;
  border-radius:10px;
  background: linear-gradient(90deg,#8b5cf6,#06b6d4);
  color:white;
  font-weight:700;
  font-size:12px;
}

/* empty state */
.empty{
  text-align:center;
  color:var(--muted);
  padding:60px 20px;
  background:rgba(255,255,255,0.02);
  border-radius:12px;
}

/* modal */
.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:80;
  background:rgba(2,6,23,0.6);
}
.modal.open{display:flex}
.dialog{
  background:var(--card);
  border-radius:12px;
  padding:18px;
  width:420px;
  max-width:92%;
  box-shadow:0 18px 40px rgba(0,0,0,0.7);
}

/* باکس آپلود شما */
.upload-box {
  margin-bottom: 12px;
  text-align: center;
  border-radius: 10px;
  position: relative;
}

.upload-box input[type="file"] {
  display: none;
}

.upload-box label {
  display: block;
  background: #060c16;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  padding: 16px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}

.upload-box::before {
  content: "";
  position: absolute;
  inset: -3px;
  padding: 3px;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, background 0.4s linear;
  background: conic-gradient(
    var(--barColor, #00ff95) var(--p, 0%),
    transparent 0
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity .3s ease, background .3s ease-out;
}

.upload-box.uploading::before {
  opacity: 1;
}

.upload-box.success::before { --barColor: #18c37e; }
.upload-box.error::before   { --barColor: #ff4d4f; }

/* responsive tweaks */
@media (max-width:560px){
  .search input{width:120px}
  header{flex-direction:column; align-items:flex-start; gap:12px}
}