*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background-color: var(--background-color);
}

.container{
    max-width: 1400px;
    margin: 20px auto;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill , minmax(406px , 406px));
    gap: 50px;
    width: 1350px;
    width: 100%;
    justify-content: center;
    margin: 50px auto;

  }
  .product-section{
    overflow:hidden ;
  }

  /* اینجا مربوط به بار جستجو و فیلتر لینک هستش */

  
.search_bar_coontainer{
    display: flex;
    align-items: center;
    justify-content: start;
    max-width: 1400px;
    margin: 10px auto;
    padding: 0px 25px;
    direction: rtl;
    column-gap: 15px;

    
    
}

.filters_link{
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 15px;
}

.filters_link a{ 
    color: var(--white-color);
    font-size: 14px;
    font-weight: 300;
    opacity: 50%;
    transition: 0.2s ease;

}

.filters_link a:hover{
    opacity: 1;

}

.search_bar{
    background-color: var(--border-color);
    border-radius: 100px;
    border: none;
    width: 210px;
    height: 30px;
    display: flex;
    align-items: center;
    direction: ltr;
    justify-content: center;
    padding: 2px 10px ;
    opacity: 50%;

}

/* استایل کانتینر اصلی جستجو */
.search-container {
    display: flex;
    align-items: center; /* تراز عمودی آیکون و اینپوت در وسط */
    justify-content: center;
    

  }
  
  /* استایل آیکون ذره‌بین */
  .search-icon {
    color: var(--white-color);
    width: 20px;
    height: 20px;
  }
  
  /* استایل فیلد ورودی متن */
  .search-input {
    flex-grow: 1; 
    background: transparent; 
    border: none; 
    outline: none; 
    color: var(--white-color);
    font-size: 16px;
    text-align: right; 
    margin-right: 10px; 
    direction: rtl;
    font-size: 12px;


  }
  
  /* استایل متن نمونه (Placeholder) */
  .search-input::placeholder {
    color: var(--white-color);
    opacity: 0.8; 
    font-weight: 300;
    font-size: 12px;
  }

  a{
    text-decoration: none;
  }


/* بخش مربوط به لیدر بورد 3نفر برتر  */





.home_leaderboard{

    max-width: 1400px;
    display: grid;
    margin: 50px auto;
    padding: 0px 25px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: center;
    justify-content: space-between;
    gap: 58px;


}
.leaderboard_item{
    height: 180px;
    border: 0.5px solid var(--primary-border);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 30px;
    width: 100%;
    margin: 0px auto;
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    justify-content: center;

    


}
.leaeder_profile{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.profile_img{
    min-width: 80px;
    min-height: 80px;
    max-width: 80px;
    max-height: 80px;
}
.profile_img img{
    width: 100%;
    height: 100%;
    border-radius: 100px;
    border: 0.5px solid var(--primary-border);

}
.user_name {
    font-size: 25px;
    font-weight: bold;
    color: var(--white-color);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
.user_rank{
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
    border-radius: 100px;
    background-color: var(--primary-border);
    color: var(--dark-color);
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    line-height: 1.5;
    text-align: center;
    padding-top: 2px;
}
.leader_info{
    direction: rtl;
    display: flex;
    align-items: center;
    justify-content: start;
    color: var(--white-color);
    font-weight: normal;
    font-size: 14px;
}

.leader_info:first-child {
    color: var(--color-primary);
}

.leaeder_profile_information{
    display: flex;
    margin-top: 15px;
    align-items: center;
    justify-content: space-between;
    

}








/* کد های مربوط به اطلاعات کلی سایت برای کاربران در قسمت بالاتر از فوتر */

.web_info{
    max-width: 1400px;
    display: grid;
    margin: 50px auto;
    padding: 0px 25px;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    align-items: center;
    justify-content: space-between;
    gap: 58px;



}
.web_info_item{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 170px;
    border-radius: 10px;
    color: var(--color-primary);
    display: grid;
    align-items: center;
    text-align: center;
    padding: 40px ;

}
.web_info_item_data{
    font-size: 40px;
    font-weight: bolder;
}
.web_info_item_titr{
    font-size: 16px;
    font-weight: 300;
}


.section_title{
    text-align: center;
    font-size: 30px;
    font-weight: 300;
    color: var(--white-color);
}
.section_showALL{
    width: 250px;
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--card-color);
    text-align: center;
    margin: 10px auto;
    display: flex;
    justify-content: center;
    align-items: center;

}

.section_showALL{
    text-decoration: none;
    color: var(--white-color);
    font-size: 16px;
    font-weight: normal;
    padding: 20px 80px;
    cursor: pointer;
}
.section_showALL a{
    text-decoration: none;
    color: var(--white-color);
    font-size: 16px;
    font-weight: normal;
}


.section_showALL:hover{
    border: 1px solid var(--primary-border);
    transition: 0.5s ease-in ;

}

.section_showALL:hover , .section_showALL a:hover{
    color: var(--color-primary);
    transition: 0.5s ease-in ;


}

.product-section--stats{
    direction: rtl;
}

.stats-grid{
    width: 100%;
    max-width: 1100px;
    margin: 32px auto 50px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    align-items: center;
    justify-items: center;
    justify-content: center;
    padding: 0 12px;
}

.stat-card{
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0;
    text-align: center;
}

.stat-card__icon{
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card__icon img{
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.stat-card__value{
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white-color);
    line-height: 1.2;
    font-feature-settings: "tnum";
}

.stat-card__label{
    font-size: 1rem;
    color: var(--text-white-80);
    font-weight: 400;
}

.stat-card--loading .stat-card__value{
    position: relative;
    color: transparent;
}

.stat-card--loading .stat-card__value::before{
    content: "";
    display: block;
    width: 80%;
    height: 22px;
    border-radius: 999px;
    margin: 0 auto;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.05) 100%);
    animation: shine 1.4s ease-in-out infinite;
}

.stat-card--loading .stat-card__label{
    opacity: 0.55;
}

.stat-card--error .stat-card__value,
.stat-card--error .stat-card__label{
    color: var(--danger-text-strong);
}

.stat-card__error-text{
    font-size: 0.95rem;
    color: var(--danger-text-strong);
    font-weight: 400;
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 8px;
}

@keyframes shine{
    0%{ transform: translateX(-35%); opacity: 0.4; }
    50%{ transform: translateX(0%); opacity: 1; }
    100%{ transform: translateX(55%); opacity: 0.25; }
}
section{
margin-top: 100px;


}


  .eror{
    text-align: center;
    color: var(--white-color) ;
    font-weight: 300;
    font-size: 20px;
    margin: 0px auto;
    width: 1350px;  
  }


  /* کل پاپ‌آپ (پوشش پس‌زمینه) */
.result-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* نیمه شفاف */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  /* محتوای پاپ‌آپ */
  .result-popup .popup-content {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    position: relative;
    text-align: center;
  }
  
  /* دکمه بستن */
  .result-popup .close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.2s;
  }
  
  .result-popup .close-popup:hover {
    color: #ff0000;
  }
  
  /* تیتر پاپ‌آپ */
  .result-popup h2 {
    margin-bottom: 15px;
    font-size: 22px;
  }
  
  /* متن محتوا */
  .result-popup p {
    font-size: 16px;
    line-height: 1.5;
  }

/* ---------- Page Skeleton (Home) ---------- */
.page-skeleton {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--background-color);
  overflow-y: auto;
  opacity: 1;
  transition: opacity 240ms ease;
  direction: rtl;
}

.page-skeleton.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-skeleton__scroll {
  min-height: 100vh;
}

/* ---------- Skeleton Lines ---------- */
.skeleton-line,
.skeleton-block {
  position: relative;
  overflow: hidden;
  display: block;
  background-color: var(--card-color);
  border-radius: 8px;
}

.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
  background-color: var(--background-color);
}

/* Shared Shine Effect */
.skeleton-line::after,
.skeleton-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0) 100%);
  animation: skeleton-shimmer 1.4s linear infinite;
}

@keyframes skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------- Layout ---------- */
.home-skeleton__container {
  max-width: 1400px;
  padding: 24px 25px 48px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.home-skeleton__hero {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  margin-top: 35px;
}

.home-skeleton__hero-banner {
  min-height: 520px;
  padding: 24px;
  display: grid;
  align-content: end;
  gap: 10px;
}

.home-skeleton__hero-list {
  display: grid;
  gap: 10px;
  height: 100%;
}

.home-skeleton__section-title {
  width: 220px;
  height: 28px;
  margin-inline: auto;
}

.home-skeleton__cards,
.home-skeleton__tournaments {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.home-skeleton__cards .skeleton-block {
  height: 180px;
}

.home-skeleton__tournament {
  min-height: 280px;
  padding: 20px;
  display: grid;
  gap: 10px;
}

/* ---------- Header (Updated Version You Provided) ---------- */
.home-skeleton__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.home-skeleton__logo {
  width: 150px;
  height: 50px;
}

.home-skeleton__nav {
  display: flex;
  gap: 1px;
  max-width: 400px;
}

.home-skeleton__nav .skeleton-block {
  width: 100px;
  height: 24px;
}

.home-skeleton__actions {
  display: grid;
  grid-auto-flow: column;
  justify-self: end;
  gap: 10px;
}

.home-skeleton__actions .skeleton-block {
  width: 40px;
  height: 40px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .home-skeleton__container { padding-inline: 18px; }
  .home-skeleton__hero { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .home-skeleton__hero-banner { min-height: 360px; }
}

@media (max-width: 720px) {
  .home-skeleton__cards,
  .home-skeleton__tournaments {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .home-skeleton__section-title { width: 180px; }
  .home-skeleton__nav { display: none !important; }

  .home-skeleton__header {
    grid-template-columns: auto 1fr ;

  }
}

@media (max-width: 540px) {
  .home-skeleton__cards,
  .home-skeleton__tournaments { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .leaderboard_item {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  .user_name { font-size: 1.4rem; }
}

