/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #fff;
  color: #222;
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* حالا چون اول می‌خوای تم دارک باشه، فرض کن body کلاس dark داره */
body.dark {
  background: #0e1a2b;
  color: #e5e5e5;
}

/* Header */
.site-header {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e6e6e6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-sizing: border-box;
}

body.dark .site-header {
  background: #0b1423;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.site-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.8rem;
  user-select: none;
  display: flex;
  gap: 5px;
}

.site-title .vex {
  color: #00ccff;
}

.site-title .mc {
  color: #fff;
}

body:not(.dark) .site-title .mc {
  color: #777;
}

.left-icons {
  display: flex;
  justify-content: flex-end;
  flex: 1;
}

.left-icons img {
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.left-icons img:hover {
  transform: scale(1.1);
}

/* کارت‌ها */
.rank-container {
  max-width: 1200px;
  margin: 30px auto 50px auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 25px 30px;
  box-sizing: border-box;
}

.rank-card {
  position: relative;
  background: #cceeff;
  border-radius: 16px;
  padding: 30px 15px 70px 15px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.rank-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* کارت‌ها در حالت دارک */
body.dark .rank-card {
  background: #1a2a42;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.rank-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  font-weight: 700;
  color: #222;
  transition: color 0.4s ease;
}

body.dark .rank-card h3 {
  color: #e5e5e5;
}

.rank-card p {
  font-size: 0.9rem;
  margin-bottom: 25px;
  color: #444;
  line-height: 1.3;
  transition: color 0.3s ease;
}

body.dark .rank-card p {
  color: #ccc;
}

/* قیمت پایین و سمت چپ */
.price-buy {
  position: absolute;
  bottom: 15px;
  left: 15px;
  display: flex;
  direction: rtl;
  gap: 5px;
  user-select: none;
  font-weight: 700;
  font-size: 1.2rem;
  color: #005f8a; /* رنگ لایت برای کل قیمت */
  white-space: nowrap;
}

.price-number {
  direction: ltr;
  text-align: left;
  min-width: 60px;
  color: #005f8a; /* رنگ عدد قیمت در لایت */
  transition: color 0.3s ease;
}

.price-unit {
  white-space: nowrap;
  color: #005f8a; /* رنگ تومان در لایت */
  transition: color 0.3s ease;
}

/* رنگ عدد قیمت در دارک */
body.dark .price-number {
  color: #009CCF; /* طلایی */
}

/* رنگ تومان در دارک */
body.dark .price-unit {
  color: #009CCF; /* خاکستری روشن */
}

/* دکمه پایین سمت راست */
.rank-card button {
  position: absolute;
  bottom: 15px;
  right: 15px;
  font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 22px;
  border-radius: 12px;
  border: none;
  background-color: #00ccff;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 16px rgba(0,204,255,0.6);
  min-width: 90px;
}

.rank-card button:hover {
  background-color: #0099cc;
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0,153,204,0.8);
}

/* دکمه بزودی */
.rank-card button.soon {
  background-color: #ddd;
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

body.dark .rank-card button.soon {
  background-color: #444;
  color: #999;
}

/* کارت غیر فعال (disabled) */
.rank-card.disabled {
  background: #e0e0e0;
  cursor: not-allowed;
  opacity: 0.7;
  filter: grayscale(0.3);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  transition: none;
}

body.dark .rank-card.disabled {
  background: #3b3b3b;
  filter: grayscale(0.5);
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 900px) {
  .rank-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 20px 0;
    padding: 0 15px;
  }
}
