.server-container {
  width: 70%;            /* کمی کوچکتر از صفحه */
  max-width: 900px;      /* محدود به 900px */
  height: 380px;
  margin: 50px auto 50px;
  padding: 15px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
  overflow: hidden;
  border: 2px solid rgba(120, 200, 255, 0.65);
  border-radius: 8px;
  color: #eaf6ff;
  background: linear-gradient(
    to bottom,
    #264b73,
    #1b3552
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.6);
}

.cards-area {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  overflow-y: auto;
  justify-content: center; /* کارت‌ها وسط چین */
  padding: 30px;
}

.server-card {
  width: 400px;           /* اندازه ثابت */
  height: 90px;          /* ارتفاع ثابت */
  background: linear-gradient(to bottom, #264b73, #1b3552);
  border: 2px solid rgba(120, 200, 255, 0.65);
  border-radius: 12px;
  color: #eaf6ff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 10px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(20px);
}

.server-card.loaded {
  opacity: 1;
  transform: translateY(0);
}

.server-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 16px rgba(180, 220, 255, 0.45);
}

.server-led {
  transform: translateY(18px);
  margin-left: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* آنلاین – LED سبز */
.server-led.online {
  animation: ledPulse 1.8s ease-in-out infinite;
  background: #2cff7a;
  box-shadow:
    0 0 4px rgba(44, 255, 122, 0.8),
    0 0 8px rgba(44, 255, 122, 0.6),
    0 0 14px rgba(44, 255, 122, 0.4);
}

/* آفلاین – LED قرمز */
.server-led.offline {
  background: #ff3b3b;
  box-shadow:
    0 0 4px rgba(255, 59, 59, 0.8),
    0 0 8px rgba(255, 59, 59, 0.6),
    0 0 14px rgba(255, 59, 59, 0.4);
}

@keyframes ledPulse {
  0% {
    box-shadow:
      0 0 4px rgba(44, 255, 122, 0.6),
      0 0 8px rgba(44, 255, 122, 0.4),
      0 0 12px rgba(44, 255, 122, 0.2);
  }
  50% {
    box-shadow:
      0 0 6px rgba(44, 255, 122, 0.9),
      0 0 12px rgba(44, 255, 122, 0.7),
      0 0 20px rgba(44, 255, 122, 0.5);
  }
  100% {
    box-shadow:
      0 0 4px rgba(44, 255, 122, 0.6),
      0 0 8px rgba(44, 255, 122, 0.4),
      0 0 12px rgba(44, 255, 122, 0.2);
  }
}

.server-card-div {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 30px;
}

.server-logo {
  margin-right: 10px;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid rgba(127, 255, 176, 0.3);
  box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
  transition: transform 0.3s ease;
}

.server-logo:hover {
  transform: rotate(5deg) scale(1.1);
}

.server-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.server-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.server-name-players {
  display: flex;
  align-items: center;
  gap: 10px;
}

.server-name {
  margin: 0;
  font-size: 1rem;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.server-players {
  padding: 2px 8px;
  border-radius: 4px;
  background: #1e2a38;
  color: #4a90e2;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 1px 5px rgba(74, 144, 226, 0.4);
  transition: transform 0.2s ease, background 0.3s ease;
}

.server-ip-bar {
  display: flex;
  align-items: center;
  border: 1px solid #7fffb0;
  border-radius: 6px;
  padding: 3px 0px;
  background: #0b0f0c;
  width: 60%;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(74, 144, 226, 0.2);
  transition: border-color 0.3s ease;
  transform: translateY(10px);
}

.server-ip-text {
  flex: 1;
  font-size: 0.85rem;
  color: #b6c7bd;
  font-family: 'Courier New', Courier, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-copy-btn {
  background: #1e2a38;
  border: 1px solid #7fffb0;
  border-radius: 4px;
  cursor: pointer;
  color: #b6c7bd;
  font-size: 0.9rem;
  margin-left: 4px;
  padding: 2px 4px;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.server-copy-btn:hover {
  background: #4a90e2;
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(127, 255, 176, 0.6);
}

.server-copied-msg {
  display: none;
  font-size: 0.75rem;
  color: #7fffb0;
  margin-left: 6px;
  transition: opacity 0.5s ease;
  opacity: 0;
}

.server-copied-msg.visible {
  display: inline;
  opacity: 1;
}

/* ===== MOBILE OPTIMIZATION ===== */
@media (max-width: 600px) {

  .server-container {
    width: 95%;
    height: 400px;
    margin: 20px auto;
    padding: 15px;
    border-radius: 12px;
  }

  .cards-area {
    padding: 15px;
    gap: 15px;
  }

  .server-card {
    width: 100%;        /* تمام عرض برای موبایل */
    height: 90px;       /* ارتفاع منعطف */
    padding: 12px;
    flex-direction: flex;
    justify-content: flex-start;
    text-align: left;
  }

  .server-card-div {
    flex-direction: flex;
    gap: 12px;
    align-items: center;
  }

  .server-logo {
    width: 50px;
    height: 50px;

  }

  .server-content {
    flex: 1;
  }

  .server-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .server-name {
    font-size: 0.95rem;
  }

  .server-players {
    font-size: 0.75rem;
    padding: 2px 6px;
  }

  .server-ip-bar {
    width: 100px;
    font-size: 0.75rem;
    padding: 2px 4px;
    transform: translateY(-5px);
  }

  .server-copy-btn {
    font-size: 0.75rem;
    padding: 2px 6px;
  }

  .server-copied-msg {
    font-size: 0.7rem;
    margin-left: 4px;
  }
  
  .server-led {
      
      transform: translate(-110px,15px);
  }
  
  
}
