.servers-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  padding-bottom: 80px;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.servers-title {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 40px;
  text-align: center;
  color: #ffffff;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-main), var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeDown 0.6s ease;
}

/* ============= SERVERS SECTIONS ============= */
.servers-section-title {
  font-size: 26px;
  font-weight: 900;
  margin: 48px 0 32px 0;
  color: var(--text-main);
  padding-bottom: 18px;
  letter-spacing: 0.5px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(79, 70, 229, 0.04);
  padding: 20px 24px;
  border-radius: 12px;
  border: 1.5px solid rgba(79, 70, 229, 0.2);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes titleSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.servers-section-title::before {
  content: '🚀';
  font-size: 28px;
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.servers-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 3px;
}

.servers-section-title:hover {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.1);
  transform: translateX(4px);
}

.servers-section-title:hover::after {
  display: none;
}

.servers-section-title-primary {
  background: rgba(79, 70, 229, 0.08) !important;
  border: 2px solid rgba(79, 70, 229, 0.3) !important;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12), 
              inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  position: relative;
  overflow: visible;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.servers-section-title-primary::before {
  content: '⭐';
  font-size: 32px;

}

@keyframes iconRotate {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(10deg);
  }
}

.servers-section-title-primary:hover {
  background: rgba(79, 70, 229, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.15), 
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(6px) scale(1.02);
}

.servers-section-title-primary:hover::after {
  display: none;
}

.popular-badge {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 20px;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);

  margin-left: auto;
  flex-shrink: 0;
  text-transform: uppercase;
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: scale(1.03);
  }
}

/* ============= STATS PANEL ============= */
.servers-stats {
  display: flex;
  margin-bottom: 30px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(34, 197, 94, 0.03));
  border: 1.5px solid rgba(79, 70, 229, 0.25);
  border-radius: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.5s ease;
}

.stat-item {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.stat-item::before {
  content: 'none';
  opacity: 0;
  transition: opacity 0.3s ease;
}


.stat-item:hover::before {
  opacity: 0;
}

.stat-label {
  color: var(--text-light);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  line-height: 1;
}

.stat-value {
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
  font-family: 'Monaco', monospace;
  letter-spacing: 0.3px;
  text-align: left;
}

/* ============= TOOLBAR ============= */
.servers-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 35px;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 20px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(34, 197, 94, 0.04));
  border: 1.5px solid rgba(79, 70, 229, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.5s ease 0.1s both;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.08);
  border: 1.5px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.search-input:focus {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 0 16px rgba(59, 130, 246, 0.25);
  transform: translateY(-2px);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 18px;
  padding: 5px 8px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.search-clear:hover {
  color: var(--primary);
  opacity: 1;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  padding: 11px 18px;
  background: rgba(59, 130, 246, 0.08);
  border: 1.5px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  color: var(--text-light);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(59, 130, 246, 0.15);
  transition: left 0.3s ease;
  z-index: -1;
}

.filter-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: white;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
  transform: translateY(-3px);
  font-weight: 700;
}

.filter-btn.active::before {
  left: 0;
  background: rgba(255, 255, 255, 0.2);
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-select {
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.06);
  border: 1.5px solid rgba(59, 130, 246, 0.15);
  border-radius: 8px;
  color: var(--text-main);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  outline: none;
}

.sort-select option {
  background-color: #1e1e1e;
  color: var(--text-main);
}

.sort-select:hover,
.sort-select:focus {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.05);
}

/* ============= SERVER GRID ============= */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

/* ============= WW PROXY SECTION ============= */
#wwproxySection {
  padding: 20px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(34, 197, 94, 0.04));
  border: 1.5px solid rgba(79, 70, 229, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
  animation: slideUp 0.5s ease;
}

#thirdpartySection {
  padding: 20px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(34, 197, 94, 0.04));
  border: 1.5px solid rgba(79, 70, 229, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.5s ease;
}

.server-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(34, 197, 94, 0.04));
  border: 1.5px solid rgba(79, 70, 229, 0.2);
  border-radius: 14px;
  padding: 28px 24px;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: visible;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.server-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.server-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.server-card:hover {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(34, 197, 94, 0.08));
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.2);
  transform: translateY(-8px) scale(1.02);
}

.server-card:hover::before {
  opacity: 1;
}

.server-card:hover::after {
  opacity: 1;
}

.server-card.status-offline {
  opacity: 0.7;
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.03);
}

.server-card.status-offline:hover {
  border-color: #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.03));
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15);
}

.server-card.status-offline .server-country {
  color: #ef4444;
}

.server-card.status-offline .btn-connect-server {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.25), rgba(107, 114, 128, 0.15));
  cursor: not-allowed;
  opacity: 0.7;
  border-color: rgba(107, 114, 128, 0.2);
}
}

/* ============= PREMIUM WWProxy CARD ============= */
.server-card-premium {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(34, 197, 94, 0.04)) !important;
  border: 1.5px solid rgba(79, 70, 229, 0.2) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  position: relative;
  transform: scale(1);
}

.server-card-premium:hover {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(34, 197, 94, 0.08)) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.2) !important;
  transform: translateY(-8px) scale(1.02) !important;
}

.server-card-premium::before {
  opacity: 0.15 !important;
}

/* ============= PREMIUM BADGE ============= */
.premium-badge {
  position: absolute;
  top: -12px;
  right: 16px;
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4), 0 0 20px rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: premiumBounce 2s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
}
}

@keyframes premiumBounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.05);
  }
}

/* ============= CORNER BADGES ============= */
.server-bandwidth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  border: 1.5px solid rgba(34, 197, 94, 0.25);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  color: #22c55e;
}

.server-bandwidth.bandwidth-slow {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.server-bandwidth:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.server-bandwidth.bandwidth-slow:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.bandwidth-icon {
  font-size: 14px;
  display: inline-block;
  animation: speedPulse 1.5s ease-in-out infinite;
}

.bandwidth-value-text {
  font-family: 'Monaco', monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.server-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid rgba(79, 70, 229, 0.15);
  position: relative;
}

.server-card-header::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #ffffff;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.server-card:hover .server-card-header::after {
  width: 100%;
}

.server-info {
  flex: 1;
}

.server-country {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.2px;
  transition: all 0.3s ease;
}

.server-card:hover .server-country {
  letter-spacing: 0.5px;
  font-size: 23px;
}

.server-country .country-flag {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: all 0.3s ease;
}

.server-card:hover .server-country .country-flag {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.4));
}

.server-ping {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  border: 1.5px solid rgba(59, 130, 246, 0.25);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.server-ping.ping-good {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.08));
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.server-ping.ping-ok {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(6, 182, 212, 0.08));
  border-color: rgba(6, 182, 212, 0.4);
  color: #06b6d4;
}

.server-ping.ping-bad {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.ping-value {
  font-family: 'Monaco', monospace;
  font-weight: 700;
}

.ping-label {
  font-size: 11px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}

.favorite-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: rgba(6, 182, 212, 0.3);
  transition: all 0.3s ease;
  padding: 6px;
  line-height: 1;
}

.favorite-btn:hover {
  color: #06b6d4;
  transform: scale(1.2) rotate(10deg);
}

.favorite-btn.active {
  color: #06b6d4;

}

/* ============= SERVER DETAILS ============= */
.server-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(79, 70, 229, 0.1);
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-light);
  transition: all 0.2s ease;
}

.detail-row:hover {
  color: var(--text-main);
}

.detail-label {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  min-width: 50px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.detail-value {
  flex: 1;
  font-family: 'Monaco', monospace;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.detail-value.ip-hidden {
  color: rgba(255, 255, 255, 0.4);
  user-select: none;
  cursor: not-allowed;
  letter-spacing: 2px;
  opacity: 0.6;
  font-size: 14px;
}

/* ============= BANDWIDTH BADGE ============= */
.bandwidth-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.08));
  border: 1.5px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  color: #22c55e;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.bandwidth-value.bandwidth-fast {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.08));
  border: 1.5px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.bandwidth-value.bandwidth-slow {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.bandwidth-value::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  animation: bandwidthShine 2s infinite;
}

@keyframes bandwidthShine {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.detail-row:has(.bandwidth-value) {
  margin-top: 8px;
  padding: 8px 0;
}

/* ============= PROVIDER BADGE ============= */
.provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: all 0.3s ease;
}

.provider-wwproxy {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.25), rgba(59, 130, 246, 0.2));
  border: 1.5px solid rgba(79, 70, 229, 0.5);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.provider-wwproxy::before {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: providerShine 3s infinite;
}

@keyframes providerShine {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

.provider-wwproxy:hover {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.35), rgba(59, 130, 246, 0.3));
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
  transform: scale(1.05);
}

.provider-thirdparty {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.08));
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.15);
}

.provider-thirdparty:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.15));
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

/* ============= SPEED INDICATOR ============= */
.speed-indicator {
  display: inline-block;
  font-size: 14px;
  animation: speedPulse 1.5s ease-in-out infinite;
}

@keyframes speedPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.15);
  }
}

.country-flag {
  font-size: 20px;
  margin-right: 6px;
  line-height: 1;
}

.flag-img {
  width: 24px;
  height: 18px;
  margin-right: 8px;
  border-radius: 3px;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.copy-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
  transition: all 0.2s ease;
  border-radius: 4px;
  font-weight: 600;
  opacity: 0.7;
  margin-left: auto;
}

.copy-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  color: var(--secondary);
  opacity: 1;
  transform: scale(1.05);
}

.server-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  width: fit-content;
  transition: all 0.3s ease;
}

.server-status.status-online {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.server-status.status-online::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;

}

.server-status.status-offline {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.server-status.status-offline::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============= SERVER ACTIONS ============= */
.server-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(79, 70, 229, 0.1);
}

.btn-connect-server,
.btn-copy-all {
  flex: 1;
  padding: 13px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  position: relative;
  overflow: hidden;
}

.btn-connect-server {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(79, 70, 229, 0.15));
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.2);
  border: 1.5px solid rgba(79, 70, 229, 0.3);
}

.btn-connect-server::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.4) 0%, transparent 70%);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: -1;
  pointer-events: none;
}

.btn-connect-server:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.3),
              0 0 20px rgba(79, 70, 229, 0.25);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.3), rgba(79, 70, 229, 0.25));
  border-color: rgba(79, 70, 229, 0.4);
}

.btn-connect-server:hover:not(:disabled)::after {
  opacity: 1;
}

.btn-connect-server:active:not(:disabled) {
  transform: translateY(-1px) scale(0.98);
}

.btn-connect-server:disabled {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.25), rgba(107, 114, 128, 0.15));
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.15);
  border-color: rgba(107, 114, 128, 0.2);
}

.btn-copy-all {
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary);
  border: 1.5px solid rgba(59, 130, 246, 0.25);
  transition: all 0.3s ease;
}

.btn-copy-all:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--primary);
  color: var(--secondary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.btn-copy-all:active {
  transform: translateY(0);
}

/* ============= UPDATE INDICATOR ============= */
.update-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 6px;
  color: #22c55e;
  font-size: 12px;
  font-weight: 600;

}

.spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(34, 197, 94, 0.3);
  border-top-color: #22c55e;
  border-radius: 50%;

}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============= EMPTY & LOADING STATES ============= */
.loading {
  text-align: center;
  padding: 80px 20px;
  font-size: 18px;
  color: var(--text-light);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loading::before {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;

}

.empty-state {
  text-align: center;
  padding: 100px 20px;
  font-size: 22px;
  color: var(--text-light);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: rgba(17, 26, 46, 0.95);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 40px;
  max-width: 500px;
  text-align: center;

}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-main);
}

.modal-text {
  color: var(--text-light);
  margin-bottom: 30px;
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.modal-btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.modal-btn-secondary {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-light);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.modal-btn-secondary:hover {
  background: rgba(59, 130, 246, 0.2);
}

/* ========= INTRO SECTION ========= */
.intro-section {
  animation: fadeDown 0.6s ease;
  position: relative;
  overflow: hidden;
}

.intro-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, hwb(217 23% 4% / 0.1), transparent),
              radial-gradient(circle at 80% 80%, rgba(19, 103, 182, 0.1), transparent);
  pointer-events: none;
  border-radius: 16px;
}

.intro-section h2 {
  position: relative;
  z-index: 1;
}

/* ========= MOBILE ACTION BAR ========= */
@media (max-width: 768px) {
  #mobile-action-bar {
    display: flex !important;
    padding: 8px 8px 12px 8px;
  }
  
  .servers-container {
    padding-bottom: 100px;
  }

  .btn-mobile-action {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(34, 197, 94, 0.1));
    border: 1.5px solid rgba(59, 130, 246, 0.3);
    padding: 12px !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: 600 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
  }

  .btn-mobile-action:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(34, 197, 94, 0.2)) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25) !important;
  }
}

/* ========= MOBILE RESPONSIVE ========= */

@media (max-width: 768px) {
  .servers-container {
    max-width: 100%;
    margin: 15px auto;
    padding: 12px;
    padding-bottom: 60px;
  }

  .servers-title {
    font-size: 28px;
    margin-bottom: 25px;
  }

  .servers-stats {
    gap: 16px;
    padding: 12px 15px;
    margin-bottom: 20px;
  }

  .stat-item {
    gap: 6px;
  }

  .stat-label {
    font-size: 12px;
  }

  .stat-value {
    font-size: 16px;
  }

  .servers-toolbar {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .search-box {
    min-width: 100%;
  }

  .filter-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .sort-box {
    width: 100%;
  }

  .sort-select {
    width: 100%;
  }

  .servers-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .server-card {
    padding: 18px;
  }

  .server-actions {
    gap: 10px;
  }

  .btn-connect-server,
  .btn-copy-all {
    padding: 11px 14px;
    font-size: 12px;
  }

  .modal-content {
    padding: 28px 20px;
    max-width: 90%;
    margin: 20px;
    border-radius: 10px;
  }

  .modal-title {
    font-size: 24px;
  }

  .modal-text {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .modal-btn {
    padding: 10px 16px;
    font-size: 13px;
    width: 100%;
  }

  .modal-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .empty-state,
  .loading {
    padding: 50px 15px;
    font-size: 16px;
  }

  .servers-section-title {
    font-size: 22px;
    margin: 36px 0 24px 0;
    padding: 16px 18px;
    gap: 10px;
  }

  .servers-section-title::before {
    font-size: 24px;
  }

  .servers-section-title-primary::before {
    font-size: 28px;
  }

  .popular-badge {
    font-size: 10px;
    padding: 5px 10px;
  }
}

@media (max-width: 480px) {
  .servers-container {
    padding: 10px;
    padding-bottom: 50px;
    margin: 10px auto;
  }

  .servers-title {
    font-size: 22px;
    margin-bottom: 18px;
  }

  .servers-stats {
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 16px;
  }

  .stat-item {
    gap: 4px;
  }

  .stat-label {
    font-size: 11px;
  }

  .stat-value {
    font-size: 14px;
  }

  .servers-toolbar {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .filter-buttons {
    flex-wrap: wrap;
  }

  .filter-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .sort-select {
    width: 100%;
    padding: 10px 12px;
  }

  .servers-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .server-card {
    padding: 16px;
    gap: 12px;
  }

  .server-country {
    font-size: 18px;
  }

  .server-ping {
    padding: 6px 10px;
    font-size: 11px;
  }

  .detail-row {
    font-size: 12px;
    gap: 6px;
  }

  .detail-label {
    min-width: 45px;
    font-size: 10px;
  }

  .btn-connect-server,
  .btn-copy-all {
    padding: 10px 12px;
    font-size: 11px;
    min-height: 44px;
  }

  .modal-content {
    padding: 24px 16px;
    border-radius: 8px;
  }

  .modal-title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .modal-text {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .empty-state,
  .loading {
    padding: 40px 12px;
    font-size: 14px;
  }

  .servers-section-title {
    font-size: 19px;
    margin: 28px 0 16px 0;
    padding: 14px 16px;
    gap: 8px;
  }

  .servers-section-title::before {
    font-size: 20px;
  }

  .servers-section-title-primary::before {
    font-size: 24px;
  }

  .popular-badge {
    font-size: 9px;
    padding: 4px 8px;
  }
}
}

  .sort-box {
    width: 100%;
  }

  .sort-select {
    width: 100%;
  }

  .servers-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .servers-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .server-actions {
    flex-direction: column;
  }

  .btn-connect-server,
  .btn-copy-all {
    width: 100%;
  }
}

:root {
  --text-main: #ffffff;
  --text-light: rgba(255, 255, 255, 0.7);
  --bg-dark: #111e2e;
  --primary: #3b82f6;
  --secondary: #22c55e;
}

/* ============= UPDATE INDICATOR ============= */
.update-indicator {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 6px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;

}

.update-indicator.active {
  display: flex !important;
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(34, 197, 94, 0.3);
  border-top-color: var(--secondary);
  border-radius: 50%;

}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============= TOAST NOTIFICATIONS ============= */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  max-width: 400px;
}

.toast {
  background: rgba(17, 26, 46, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--text-main);
  padding: 14px 18px;
  border-radius: 6px;
  margin-bottom: 10px;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.toast.success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--secondary);
}

.toast.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
