/* =========================================
   SERVER SELECTION SECTION - COMPACT
   ========================================= */
.server-selection-section {
  background-color: #000;
  padding: 15px 0;
  position: relative;
  z-index: 100;
}

.server-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.server-card:hover {
  border-color: rgba(240, 194, 75, 0.3);
}

.server-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.server-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.server-left i {
  font-size: 24px;
  color: #f0c24b;
}

.server-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.label-text {
  font-size: 1rem;
  color: #888;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.current-value {
  font-size: 1rem;
  color: #f0c24b;
  font-weight: 700;
}

.server-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 500px;
  position: relative;
}

/* Hide native select */
.server-dropdown {
  display: none;
}

/* Custom dropdown display */
.custom-server-display {
  flex: 1;
  padding: 10px 36px 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.custom-server-display:after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #f0c24b;
}

.custom-server-display:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(240, 194, 75, 0.4);
}

.custom-server-display img {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
}

/* Custom dropdown menu */
.custom-server-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid rgba(240, 194, 75, 0.3);
  border-radius: 6px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  display: none;
}

.custom-server-dropdown.show {
  display: block;
}

.custom-server-option {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s;
  color: #fff;
}

.custom-server-option:hover {
  background: rgba(240, 194, 75, 0.1);
}

.custom-server-option.selected {
  background: rgba(240, 194, 75, 0.15);
  color: #f0c24b;
}

.custom-server-option img {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
}

.btn-update-server {
  padding: 10px 20px;
  background: linear-gradient(135deg, #f0c24b 0%, #d4af37 100%);
  border: none;
  border-radius: 6px;
  color: #000;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(240, 194, 75, 0.3);
  flex-shrink: 0;
}

.btn-update-server:hover {
  background: linear-gradient(135deg, #ffe08a 0%, #f0c24b 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(240, 194, 75, 0.4);
}

.btn-update-server:active {
  transform: translateY(0);
}

.btn-update-server i {
  font-size: 16px;
}

.server-message {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  animation: slideDown 0.3s ease;
}

.server-message.success {
  background: rgba(0, 200, 81, 0.1);
  border: 1px solid rgba(0, 200, 81, 0.3);
  color: #00c851;
}

.server-message.error {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #ff4444;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
  .server-selection-section {
    padding: 6px 0;
  }

  .server-card {
    padding: 8px 10px;
  }

  .server-content {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .server-left {
    justify-content: center;
  }

  .server-left i {
    font-size: 20px;
  }

  .label-text {
    font-size: 1rem;
  }

  .current-value {
    font-size: 0.9rem;
  }

  .server-right {
    flex-direction: row;
    max-width: 100%;
    gap: 8px;
    align-items: stretch; /* Ensures button height matches dropdown */
  }

  .custom-server-display {
    flex: 1;
    padding: 9px 12px; /* Slightly tighter padding */
    font-size: 0.85rem;
    width: auto; /* Reset width */
  }

  .btn-update-server {
    width: auto;
    justify-content: center;
    padding: 0 16px; /* Padding for button width */
    font-size: 0.8rem;
  }
}
