/* SpeedTest Page Styles - css/speedtest.css */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0a0a0a;
  color: white;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(-45deg, #0a0a0a, #1a1a2e, #16213e, #0f3460);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Header */
.header {
  padding: 20px 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 245, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 45px;
  width: auto;
  filter: brightness(1.2);
  transition: all 0.3s ease;
}

.logo-img:hover {
  filter: brightness(1.4) drop-shadow(0 0 10px rgba(0, 245, 255, 0.5));
}

.back-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #00f5ff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 10px 20px;
  border-radius: 25px;
  border: 1px solid rgba(0, 245, 255, 0.3);
}

.back-link:hover {
  color: #fff;
  background: rgba(0, 245, 255, 0.1);
  transform: translateX(-5px);
}

/* Network Speed Test Section */
.speedtest-section {
  padding: 60px 0 100px;
  position: relative;
}

.speedtest-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(0, 245, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 0, 128, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.speedtest-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Header */
.speedtest-header {
  text-align: center;
  margin-bottom: 80px;
}

.speedtest-header h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #00f5ff, #ff0080);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.speedtest-header p {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: #ccc;
  max-width: 700px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.network-guarantee {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 50px;
  padding: 12px 25px;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.network-guarantee:hover {
  background: rgba(0, 245, 255, 0.15);
  border-color: rgba(0, 245, 255, 0.5);
}

.guarantee-badge {
  background: linear-gradient(45deg, #00f5ff, #0080ff);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.guarantee-text {
  color: #00f5ff;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Datacenters Grid */
.datacenters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  margin-bottom: 100px;
}

/* Datacenter Card */
.datacenter-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(0, 245, 255, 0.2);
  border-radius: 25px;
  padding: 35px 30px;
  backdrop-filter: blur(15px);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.datacenter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.datacenter-card:hover::before {
  left: 100%;
}

.datacenter-card:hover {
  transform: translateY(-8px);
  border-color: #00f5ff;
  box-shadow: 0 25px 50px rgba(0, 245, 255, 0.2);
}

.datacenter-card.featured {
  border-color: #ff0080;
  background: linear-gradient(135deg, rgba(255, 0, 128, 0.1), rgba(0, 245, 255, 0.05));
  transform: scale(1.02);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(45deg, #ff0080, #ff6b6b);
  color: white;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

/* Datacenter Header */
.dc-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dc-flag {
  font-size: 3rem;
  line-height: 1;
}

.dc-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00f5ff;
  margin-bottom: 8px;
}

.dc-details {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.dc-tier {
  background: rgba(0, 245, 255, 0.2);
  color: #00f5ff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.dc-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #00d26a;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d26a;
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px rgba(0, 210, 106, 0.5);
}

.status-dot.maintenance {
  background: #ff9800;
  box-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}

/* Ping Section */
.ping-section {
  text-align: center;
  margin-bottom: 35px;
  padding: 25px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  border: 1px solid rgba(0, 245, 255, 0.1);
  transition: all 0.3s ease;
}

.ping-section:hover {
  border-color: rgba(0, 245, 255, 0.3);
  background: rgba(0, 0, 0, 0.3);
}

.ping-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-bottom: 10px;
}

.ping-value {
  font-size: 3rem;
  font-weight: 900;
  color: #00f5ff;
  font-family: 'Courier New', monospace;
  line-height: 1;
  transition: all 0.3s ease;
}

.ping-unit {
  font-size: 1.2rem;
  color: #ccc;
  font-weight: 600;
}

.ping-label {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.ping-test-btn {
  background: rgba(0, 245, 255, 0.2);
  border: 1px solid rgba(0, 245, 255, 0.4);
  color: #00f5ff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ping-test-btn:hover {
  background: rgba(0, 245, 255, 0.3);
  transform: translateY(-1px);
}

.ping-test-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Download Tests */
.download-tests {
  margin-bottom: 30px;
}

.download-tests h4 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 20px;
  text-align: center;
}

.test-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.test-btn {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(0, 128, 255, 0.1));
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 15px;
  padding: 15px 10px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.test-btn i {
  font-size: 1.2rem;
  color: #00f5ff;
  margin-bottom: 5px;
}

.test-btn span {
  font-weight: 600;
  line-height: 1;
}

.test-btn small {
  color: #aaa;
  font-size: 0.8rem;
}

.test-btn:hover {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.3), rgba(0, 128, 255, 0.2));
  border-color: #00f5ff;
  transform: translateY(-2px);
}

.test-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.test-btn.testing {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 142, 142, 0.2));
  border-color: #ff6b6b;
  animation: testPulse 1s ease-in-out infinite;
}

.test-btn.completed {
  background: linear-gradient(135deg, rgba(0, 210, 106, 0.3), rgba(38, 222, 129, 0.2));
  border-color: #00d26a;
}

@keyframes testPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Test Progress */
.test-progress {
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00f5ff, #0080ff);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 3px;
}

.progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: #ccc;
}

/* Test Result */
.test-result {
  text-align: center;
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 15px;
  padding: 20px;
  transition: all 0.3s ease;
}

.test-result:hover {
  background: rgba(0, 245, 255, 0.15);
  border-color: rgba(0, 245, 255, 0.5);
}

.result-speed {
  font-size: 2rem;
  font-weight: 900;
  color: #00f5ff;
  margin-bottom: 5px;
  font-family: 'Courier New', monospace;
}

.result-details {
  font-size: 0.9rem;
  color: #ccc;
}

/* Datacenter Specs */
.dc-specs {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #ccc;
  transition: all 0.3s ease;
}

.spec-item:hover {
  color: #00f5ff;
}

.spec-item i {
  color: #00f5ff;
  font-size: 1rem;
}

/* CLI Testing */
.cli-testing {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 25px;
  padding: 40px;
  margin-bottom: 80px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.cli-testing:hover {
  border-color: rgba(0, 245, 255, 0.4);
}

.cli-header {
  text-align: center;
  margin-bottom: 30px;
}

.cli-header i {
  font-size: 2.5rem;
  color: #00f5ff;
  margin-bottom: 15px;
}

.cli-header h3 {
  font-size: 1.8rem;
  color: #00f5ff;
  margin-bottom: 10px;
}

.cli-header p {
  color: #ccc;
  font-size: 1rem;
}

.cli-tabs {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 30px;
}

.cli-tab {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ccc;
  padding: 10px 25px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.cli-tab.active {
  background: rgba(0, 245, 255, 0.2);
  border-color: rgba(0, 245, 255, 0.4);
  color: #00f5ff;
}

.cli-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.15);
}

.cli-content {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 0 15px 15px 15px;
  padding: 30px;
}

.cli-tab-content {
  display: none;
}

.cli-tab-content.active {
  display: block;
}

.cli-commands {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cli-command {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cli-command:hover {
  border-color: rgba(0, 245, 255, 0.4);
}

.command-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0, 245, 255, 0.1);
  border-bottom: 1px solid #333;
}

.command-location {
  color: #00f5ff;
  font-weight: 600;
  font-size: 0.9rem;
}

.copy-btn {
  background: rgba(0, 245, 255, 0.2);
  border: 1px solid rgba(0, 245, 255, 0.4);
  color: #00f5ff;
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: rgba(0, 245, 255, 0.3);
  transform: translateY(-1px);
}

.cli-command code {
  display: block;
  padding: 15px 20px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #00f5ff;
  background: #1a1a1a;
  border: none;
  word-break: break-all;
  line-height: 1.4;
}

/* Network Stats */
.network-stats {
  text-align: center;
}

.network-stats h3 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #00f5ff;
  margin-bottom: 50px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 20px;
  padding: 35px 25px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-align: center;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: #00f5ff;
  box-shadow: 0 15px 35px rgba(0, 245, 255, 0.15);
}

.stat-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: #00f5ff;
  margin-bottom: 8px;
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.stat-detail {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.4;
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .datacenters-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .speedtest-section {
    padding: 40px 0 80px;
  }
  
  .speedtest-container {
    padding: 0 15px;
  }
  
  .speedtest-header {
    margin-bottom: 50px;
  }
  
  .datacenters-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 60px;
  }
  
  .datacenter-card {
    padding: 30px 25px;
  }
  
  .datacenter-card.featured {
    transform: none;
  }
  
  .dc-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .dc-details {
    justify-content: center;
  }
  
  .test-buttons {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .dc-specs {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  
  .cli-testing {
    padding: 30px 20px;
    margin-bottom: 50px;
  }
  
  .cli-tabs {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .cli-tab {
    flex: 1;
    min-width: 100px;
    border-radius: 10px;
  }
  
  .cli-content {
    border-radius: 15px;
    padding: 20px;
  }
  
  .command-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .copy-btn {
    width: 100%;
  }
  
  .cli-command code {
    font-size: 0.8rem;
    padding: 12px 15px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .stat-card {
    padding: 25px 20px;
  }
  
  .network-guarantee {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .nav {
    padding: 0 15px;
  }

  .back-link {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .datacenter-card {
    padding: 25px 20px;
  }
  
  .ping-section {
    padding: 20px 15px;
  }
  
  .ping-value {
    font-size: 2.5rem;
  }
  
  .test-result {
    padding: 15px;
  }
  
  .result-speed {
    font-size: 1.6rem;
  }
  
  .cli-testing {
    padding: 25px 15px;
  }
  
  .cli-content {
    padding: 15px;
  }
  
  .cli-command code {
    font-size: 0.75rem;
    padding: 10px 12px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 20px 15px;
  }
  
  .stat-icon {
    font-size: 2.5rem;
  }
  
  .stat-number {
    font-size: 1.8rem;
  }

  .nav {
    flex-direction: column;
    gap: 15px;
  }

  .back-link {
    width: 100%;
    justify-content: center;
  }
}