/* CyberShield Super Fast VPN - World-Class UI */

.vpn-card {
  margin-bottom: 30px;
  position: relative;
  overflow: visible;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.vpn-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

.vpn-card.vpn-connected {
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3), 0 20px 50px rgba(16, 185, 129, 0.12);
}

.vpn-card-glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.1));
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease;
}

.vpn-card-glow.active {
  opacity: 1;
  animation: vpn-glow-pulse 3s ease-in-out infinite;
}

@keyframes vpn-glow-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.vpn-title-icon {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #3b82f6;
  transition: all 0.3s ease;
}

.vpn-title-icon .vpn-icon-ring {
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
}

.vpn-title-icon.connected .vpn-icon-ring {
  opacity: 1;
  animation: vpn-icon-ring 2s ease-out infinite;
}

@keyframes vpn-icon-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.vpn-title-icon.connected {
  color: #10b981;
}

.vpn-card .vpn-ip-label i {
  font-size: 12px;
}

.vpn-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.vpn-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #6b7280;
  transition: all 0.3s ease;
}

.vpn-status-indicator {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vpn-status-badge .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.vpn-status-badge .status-ring {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #10b981;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vpn-status-badge .status-ring.active {
  opacity: 0.6;
  animation: vpn-status-ring 1.5s ease-out infinite;
}

@keyframes vpn-status-ring {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 0; }
}

.vpn-status-badge .status-dot.connected {
  background: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
  animation: vpn-dot-pulse 2s ease-in-out infinite;
}

.vpn-status-badge .status-dot.disconnected {
  background: #9ca3af;
}

@keyframes vpn-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px rgba(16, 185, 129, 0.6); }
  50% { opacity: 0.85; transform: scale(1.1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.8); }
}

.vpn-status-badge:has(.connected) {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.2);
}

/* Threat Banner - Attention-grabbing */
.vpn-threat-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 12px;
  color: #92400e;
  animation: vpn-threat-attention 2s ease-in-out infinite;
}

@keyframes vpn-threat-attention {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.vpn-threat-banner i:first-child {
  font-size: 18px;
  color: #d97706;
  flex-shrink: 0;
  animation: vpn-icon-bounce 1.5s ease-in-out infinite;
}

@keyframes vpn-icon-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.vpn-threat-banner strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.vpn-threat-banner p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.vpn-threat-banner .btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  margin-left: auto;
  white-space: nowrap;
  animation: vpn-btn-glow 2s ease-in-out infinite;
}

@keyframes vpn-btn-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 12px 2px rgba(59, 130, 246, 0.3); }
}

/* IP Section */
.vpn-ip-section {
  margin-bottom: 20px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
  transition: all 0.3s ease;
}

.vpn-ip-section:hover {
  border-left-color: #60a5fa;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.08);
}

.vpn-ip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
}

.vpn-ip-row:not(:last-child) {
  border-bottom: 1px solid #e2e8f0;
}

.vpn-ip-label {
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vpn-ip-label i {
  color: #3b82f6;
}

.vpn-ip-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: #1e293b;
  font-size: 13px;
}

.vpn-extra-row .vpn-ip-value {
  font-size: 12px;
  font-weight: 500;
}

/* Changed IP Box - Premium highlight when connected */
.vpn-changed-ip-box {
  margin: 12px 0;
  padding: 16px 18px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #10b981;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  animation: vpn-box-appear 0.5s ease-out;
}

.vpn-changed-ip-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10b981, transparent);
  animation: vpn-shimmer 3s ease-in-out infinite;
}

@keyframes vpn-box-appear {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes vpn-shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.vpn-changed-ip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #059669;
}

.vpn-changed-ip-header i {
  font-size: 14px;
  animation: vpn-check-pulse 2s ease-in-out infinite;
}

@keyframes vpn-check-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.vpn-refresh-ip-btn {
  margin-left: auto;
  padding: 6px 12px;
  border: none;
  background: rgba(16, 185, 129, 0.2);
  color: #059669;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.25s ease;
}

.vpn-refresh-ip-btn:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.35);
  transform: rotate(180deg);
}

.vpn-refresh-ip-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.vpn-refresh-ip-btn:disabled i {
  animation: vpn-spin 1s linear infinite;
}

@keyframes vpn-spin {
  to { transform: rotate(360deg); }
}

.vpn-changed-ip-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #047857;
  margin-bottom: 12px;
  word-break: break-all;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.vpn-copy-ip-btn {
  padding: 8px 16px;
  border: 1px solid #10b981;
  background: white;
  color: #059669;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.vpn-copy-ip-btn:hover {
  background: #ecfdf5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Servers Section */
.vpn-servers-section {
  margin-bottom: 20px;
}

.vpn-servers-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vpn-servers-section h3 i {
  color: #3b82f6;
  font-size: 12px;
}

.vpn-servers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.vpn-server-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vpn-server-item:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.vpn-server-item.selected {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 4px 16px rgba(59, 130, 246, 0.2);
  animation: vpn-server-selected 0.3s ease-out;
}

@keyframes vpn-server-selected {
  from { transform: scale(0.98); }
  to { transform: scale(1); }
}

.vpn-server-flag {
  font-size: 18px;
  line-height: 1;
}

.vpn-server-name {
  font-weight: 600;
  font-size: 13px;
  color: #1e293b;
}

.vpn-server-meta {
  font-size: 11px;
  color: #64748b;
}

.vpn-loading,
.vpn-error {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.vpn-loading::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: vpn-spin 0.8s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

/* Signal Bars - Active tunnel indicator */
.vpn-signal-bars {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  animation: vpn-signal-appear 0.5s ease-out;
}

@keyframes vpn-signal-appear {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.vpn-signal-label {
  font-size: 13px;
  font-weight: 600;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vpn-signal-label i {
  font-size: 14px;
}
.vpn-signal-wave {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 24px;
}

.vpn-signal-wave span {
  width: 4px;
  background: linear-gradient(180deg, #10b981, #059669);
  border-radius: 2px;
  animation: vpn-wave 1.2s ease-in-out infinite;
}

.vpn-signal-wave span:nth-child(1) { height: 8px; animation-delay: 0s; }
.vpn-signal-wave span:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.vpn-signal-wave span:nth-child(3) { height: 20px; animation-delay: 0.3s; }
.vpn-signal-wave span:nth-child(4) { height: 14px; animation-delay: 0.45s; }
.vpn-signal-wave span:nth-child(5) { height: 8px; animation-delay: 0.6s; }

@keyframes vpn-wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Actions */
.vpn-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.vpn-connect-btn,
.vpn-disconnect-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vpn-connect-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.vpn-disconnect-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(107, 114, 128, 0.2);
}

.vpn-connect-btn.vpn-connecting .vpn-btn-icon i {
  animation: vpn-spin 1s linear infinite;
}

.vpn-btn-icon {
  display: inline-flex;
  transition: transform 0.3s ease;
}

.vpn-connect-btn:hover:not(:disabled) .vpn-btn-icon {
  transform: scale(1.1);
}

.vpn-footer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 10px;
  font-size: 12px;
  color: #64748b;
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.vpn-footer:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.vpn-footer i {
  color: #3b82f6;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Ensure card content above glow */
.vpn-card > *:not(.vpn-card-glow) {
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .vpn-servers-grid {
    grid-template-columns: 1fr;
  }

  .vpn-threat-banner {
    flex-wrap: wrap;
  }

  .vpn-threat-banner .btn-sm {
    margin-left: 0;
    width: 100%;
  }
}
