@import "https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap";
:root {
  --primary-color: #00ffcc;
  --secondary-color: #ff00aa;
  --bg-color: #020617;
  --surface-color: rgba(10, 25, 47, 0.4);
  --surface-raised: rgba(17, 34, 64, 0.6);
  --text-primary: #e6f1ff;
  --text-secondary: #94a3b8;
  --danger-color: #f05;
  --success-color: #0f6;
  --gauge-bg: rgba(0, 255, 204, 0.1);
  --gauge-tick: #00ffcc;
  --font-family: "Rajdhani", sans-serif;
  --font-title: "Orbitron", sans-serif;
  --border-color: rgba(0, 255, 204, 0.2);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-family);
  background: radial-gradient(circle at center, #0a192f 0%, #020617 100%);
  background-size: cover;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
}
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(rgba(0, 255, 204, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 204, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: -1;
  pointer-events: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 255, 204, 0.7); }
  70% { box-shadow: 0 0 0 30px rgba(0, 255, 204, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 204, 0); }
}
.go-button-pulse {
  animation: 2s infinite pulse;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
}
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--secondary-color);
}
.app-container {
  flex-direction: column;
  min-height: 100vh;
  display: flex;
}
.main-content {
  flex: 1;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
}
.sidebar {
  flex-direction: column;
  gap: 1rem;
  width: 160px;
  display: flex;
}
.sidebar.left-ad,
.sidebar.right-ad {
  display: none;
}
@media (width>=900px) {
  .sidebar.left-ad,
  .sidebar.right-ad {
    display: flex;
  }
}
.center-content {
  flex-direction: column;
  flex: 1;
  justify-content: flex-start;
  padding-top: 3rem;
  align-items: center;
  display: flex;
}
.top-ad-banner {
  display: none;
  width: 100%;
  max-width: 728px;
  margin: 0 auto 2rem;
}
.bottom-ad-banner {
  width: 100%;
  max-width: 728px;
  margin: 2rem auto 0;
}
.navbar {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  background-color: #141526cc;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  display: flex;
  position: sticky;
  top: 0;
}
.navbar-logo {
  color: var(--text-primary);
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
}
.navbar-links {
  gap: 1.5rem;
  display: flex;
}
.nav-link {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}
.ad-placeholder {
  background-color: var(--surface-raised);
  border: 1px dashed var(--border-color);
  color: var(--text-secondary);
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  display: flex;
  position: relative;
}
.ad-placeholder:before {
  content: "ADVERTISEMENT";
  letter-spacing: 1px;
  opacity: 0.5;
  font-size: 0.6rem;
  position: absolute;
  top: 4px;
}
.speed-test-container {
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 800px;
  display: flex;
}
.metrics-panel {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.1);
  border-radius: 12px;
  justify-content: space-around;
  width: 100%;
  margin-bottom: 2rem;
  padding: 1.5rem;
  display: flex;
  position: relative;
  overflow: hidden;
}
.metric-item {
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  display: flex;
  z-index: 2;
}
.metric-label {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  display: flex;
  font-family: var(--font-title);
}
.metric-label .icon {
  width: 16px;
  height: 16px;
}
.metric-value {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
  font-family: var(--font-title);
  align-items: baseline;
  gap: 0.2rem;
  font-size: 2.2rem;
  font-weight: 700;
  display: flex;
}
.metric-unit {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
}
.go-button-container {
  justify-content: center;
  align-items: center;
  width: 250px;
  height: 250px;
  display: flex;
  position: relative;
}
.go-button {
  border: 2px solid var(--primary-color);
  width: 180px;
  height: 180px;
  color: var(--text-primary);
  text-shadow: 0 0 5px var(--primary-color);
  box-shadow: inset 0 0 20px rgba(0, 255, 204, 0.2), 0 0 20px rgba(0, 255, 204, 0.4);
  cursor: pointer;
  z-index: 10;
  background: rgba(0, 255, 204, 0.05);
  backdrop-filter: blur(5px);
  border-radius: 50%;
  outline: none;
  justify-content: center;
  align-items: center;
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
}
.go-button:hover {
  background: rgba(0, 255, 204, 0.15);
  box-shadow: inset 0 0 30px rgba(0, 255, 204, 0.4), 0 0 40px rgba(0, 255, 204, 0.6);
  transform: scale(1.05);
  color: #fff;
}
.gauge-svg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(135deg);
}
.gauge-bg {
  fill: none;
  stroke: var(--surface-raised);
  stroke-width: 8px;
}
.gauge-progress {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 8px;
  stroke-linecap: round;
  transition:
    stroke-dashoffset 0.1s linear,
    stroke 0.3s;
}
.speed-display {
  z-index: 20;
  flex-direction: column;
  align-items: center;
  display: flex;
  position: absolute;
}
.speed-display .value {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
}
.speed-display .unit {
  color: var(--text-secondary);
  font-size: 1.2rem;
}
.speed-display .stage {
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.5rem;
  font-size: 1rem;
}
.server-info {
  color: var(--text-secondary);
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  display: flex;
}
.server-info strong {
  color: var(--text-primary);
}

/* Mobile Responsiveness Fixes */
@media (max-width: 768px) {
  /* Fix navbar for mobile */
  .navbar {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  .navbar-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .nav-link {
    font-size: 0.8rem;
  }
  
  /* Fix scrolling/layout for mobile */
  .main-content {
    padding: 1rem;
    gap: 1rem;
  }
  .center-content {
    padding-top: 1rem;
  }
  
  /* Make Speed metrics smaller */
  .metrics-panel {
    padding: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .metric-item {
    flex: 1 1 30%;
  }
  .metric-value {
    font-size: 1.5rem;
  }
  
  /* Make GO button smaller */
  .go-button-container {
    width: 200px;
    height: 200px;
    margin: 1rem 0;
  }
  .go-button {
    width: 150px;
    height: 150px;
    font-size: 2.5rem;
  }
  
  /* Adjust server info text */
  .server-info {
    margin-top: 1rem;
    font-size: 0.8rem;
    text-align: center;
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Hide Top Ad to prevent pushing content down */
.center-content > .ad-container:first-child {
  display: none !important;
}
