:root {
    --dark-bg: #1a1a1a;
    --darker-bg: #121212;
    --dark-text: #e0e0e0;
    --gold: #FFD700;
    --dark-gold: #b8860b;
    --dark-brown: #654321;
    --dark-green: #006400;
    --light-green: #90EE90;
    --border-color: #333;
    --row-hover: #2a2a2a;
    --header-bg: linear-gradient(to right, var(--dark-brown), var(--dark-bg));
    --footer-bg: var(--dark-brown);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: var(--header-bg);
    color: var(--gold);
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--dark-gold);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content h1 {
    font-size: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gold-icon {
    color: var(--gold);
}

.header-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--gold);
}

.app-main {
    flex: 1;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    background-color: var(--darker-bg);
}

.server-filter {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold);
}

.server-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--dark-gold);
    border-radius: 4px;
    background-color: var(--dark-bg);
    color: var(--dark-text);
    min-width: 200px;
}

.server-select option {
    background-color: var(--dark-bg);
}

.feature-table-container {
    border: 1px solid var(--dark-gold);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    max-height: 74vh;
    overflow-y: auto;
    background-color: var(--dark-bg);
}

#featureTable {
    /*width: 1100px;*/
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

#rankHeader th {
    background: linear-gradient(to right, var(--dark-brown), var(--dark-bg));
    color: var(--gold);
    padding: 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--dark-gold);
}

.server-row {
    background-color: rgba(0, 100, 0, 0.2);
    font-weight: bold;
    color: var(--light-green);
}

.server-row td {
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--dark-green);
}

.feature-row td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--dark-text);
}

.feature-row:hover {
    background-color: var(--row-hover);
}

.feature-name {
    font-weight: 500;
    color: var(--gold);
}

.feature-desc {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 0.25rem;
}

.feature-command {
    display: inline-block;
    background-color: #333;
    color: var(--gold);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    direction: ltr;
    border: 1px solid var(--dark-gold);
}

.feature-hint {
    position: relative;
    display: inline-block;
    margin-right: 0.5rem;
    cursor: help;
}

.feature-hint-icon {
    color: var(--gold);
    font-size: 0.85rem;
}

.tooltip {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark-brown);
    color: var(--gold);
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    border: 1px solid var(--dark-gold);
}

.feature-hint:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.access-icon {
    font-size: 1.1rem;
}

.has-access {
    color: var(--light-green);
}

.no-access {
    color: #ff6b6b;
}

.cooldown-badge {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--gold);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    border: 1px solid var(--dark-gold);
}

.amount-badge {
    background-color: rgba(0, 100, 0, 0.2);
    color: var(--light-green);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    border: 1px solid var(--dark-green);
}

.app-footer {
    background-color: var(--footer-bg);
    color: var(--gold);
    padding: 1.5rem;
    border-top: 1px solid var(--dark-gold);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--gold);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--light-green);
}

.disclaimers {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 215, 0, 0.7);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .server-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .server-select {
        width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}



.table-scroll {
  max-height: 72vh;
  overflow: auto;
}

#featureTable {
  border-collapse: separate;
  border-spacing: 0;
  --sticky-top: 0px;
  --thead-bg: #0f172a;
  --server-bg: #111827;
}

#featureTable thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  
}

#featureTable tbody .server-row td {
  position: sticky;
  top: var(--sticky-top);
  z-index: 4;
  background: var(--server-bg);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 2px 0 rgba(0,0,0,0.25);
  font-weight: 700;
  letter-spacing: .2px;
}


#serverSelect option.all-option {
  color: #f39c12;
  font-weight: 600;
}




.table-scroll {
  max-height: 72vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 12px;
  scrollbar-width: thin;                  
  scrollbar-color: var(--dark-brown) transparent;
}


.table-scroll::-webkit-scrollbar { width: 10px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--dark-brown);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

#featureTable th, #featureTable td {
  border-color: rgba(255,255,255,0.08) !important;
}

#featureTable tbody .server-row td {
  background: var(--server-bg) !important;
  border-top: 1px solid rgba(255,255,255,0.12) !important;
  border-bottom: 1px solid rgba(255,255,255,0.12) !important;
}


#featureTable thead th {
  box-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

#featureTable td, #featureTable th { vertical-align: middle; }
#featureTable td .access-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
#featureTable td .access-icon i {
  line-height: 1;
}

#featureTable .access-icon {
  width: 100%;
  min-height: 1.75rem;
}






#featureTable td.feature-name.rtl-title .feature-title-gold {
  color: var(--gold);
}


#featureTable td span.cooldown-badge,
#featureTable td span.amount-badge,
#featureTable td span.no-access {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}



.info-hint {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 18px; height: 18px;
  margin-inline-start: 6px;
  border-radius: 50%;
  background: #2b7cff;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  cursor: help;
  position: relative;
  user-select: none;
  border: none;
   padding-top: 2px;
}
.info-hint .hint-pop {
  position: absolute;
  inset-inline-end: 0;
  bottom: 125%;
  min-width: 220px;
  max-width: 380px;
  padding: 10px 12px;
  background: var(--footer-bg);
  color: var(--dark-text);
  border: 1px solid var(--dark-brown);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 30;
  line-height: 1.6;
  text-align: start;
}
.info-hint .hint-pop::after {
  content: "";
  position: absolute;
  inset-inline-end: 8px;
  top: 100%;
  border-width: 7px;
  border-style: solid;
  border-color: var(--footer-bg) transparent transparent transparent;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}
.info-hint:hover .hint-pop,
.info-hint:focus .hint-pop,
.info-hint.open .hint-pop {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}



.value-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  direction: ltr; 
}


th .rank-head { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
th .rank-name { font-weight: 600;
    margin-bottom: 10px;
}
th .rank-price { font-size: 0.85rem; opacity: 0.9; }



/* Global Scrollbar Styles */
/* Chrome/Edge/Safari */
*::-webkit-scrollbar {
  width: 8px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 10px;
}
*::-webkit-scrollbar-thumb {
  background: #b8860b;
  border-radius: 10px;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #b8860b #1a1a1a;
}
/*.test{*/
/*    width: 550px;*/
/*    overflow-x: auto;*/
/*}*/

@media (max-width: 482px) {
    #featureTable {
        width: 1100px; /* یا می‌تونی بزاری 480px */
    }

    .test {
        width: 550px;   /* نصف عرض صفحه */
        overflow-x: auto;
    }
}
