:root {
  --bg-color: #0d1117;
  --section-bg: #161b22;
  --card-bg: #21262d;
  --border-color: #30363d;
  --text-main: #c9d1d9;
  --text-muted: #8b949e;
  --accent-color: #1178ff;
  --accent-hover: #0a5bc9;
  --success: #238636;
  --font-family: "Inter", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  scroll-behavior: smooth;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.main-header {
  background-color: rgba(13, 17, 23, 0.95);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.accent {
  color: var(--accent-color);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent-color);
}

/* Hero */
.hero {
  padding: 100px 0;
  text-align: center;
  background: radial-gradient(circle at top, #1f2937 0%, var(--bg-color) 70%);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: #fff;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #fff;
  box-shadow: 0 4px 14px rgba(17, 120, 255, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
}

.btn-outline:hover {
  background-color: rgba(17, 120, 255, 0.1);
}

/* Sections */
.section-tool {
  padding: 80px 0;
  border-top: 1px solid var(--border-color);
}

.alt-bg {
  background-color: var(--section-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 10px;
}

.action-area {
  text-align: center;
  margin-top: 40px;
}

/* Speed Test Cards */
.speedtest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background-color: var(--section-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
}

.card h3 {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.metric-value {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
}

.metric-value small {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.progress-bar {
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  margin-top: 20px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  width: 0%;
  background-color: var(--accent-color);
  transition: width 0.2s;
}

/* Ping Terminal */
.terminal-window {
  background-color: #000;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  font-family: "Courier New", Courier, monospace;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  background-color: var(--card-bg);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}

.red {
  background-color: #ff5f56;
}
.yellow {
  background-color: #ffbd2e;
}
.green {
  background-color: #27c93f;
}

.terminal-header .title {
  margin-left: 15px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.terminal-body {
  padding: 20px;
  height: 250px;
  overflow-y: auto;
  color: #fff;
  font-size: 0.9rem;
}

.stats-row {
  display: flex;
  justify-content: space-around;
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.stat-box {
  text-align: center;
}

.stat-box span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.stat-box strong {
  font-size: 1.5rem;
  color: #fff;
}

/* Traceroute Table */
.table-container {
  overflow-x: auto;
  background-color: var(--section-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.trace-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.trace-table th,
.trace-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.trace-table th {
  background-color: var(--card-bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.trace-table td {
  color: var(--text-main);
  font-family: "Courier New", monospace;
}

.trace-table tr:last-child td {
  border-bottom: none;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
}

/* Footer */
footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Utility */
.text-green {
  color: var(--success);
}
.text-red {
  color: #ff5f56;
}
