:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-light: #1f2937;
  --text: #f8fafc;
  --muted: #cbd5f5;
  --green: #0f3d2e;
  --red: #4a1111;
  --accent: #fbbf24;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f2937 0%, #0b1020 55%, #070b16 100%);
  color: var(--text);
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.hero {
  margin-bottom: 28px;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #172554 0%, #1e293b 60%, #0f172a 100%);
  border: 1px solid rgba(248, 250, 252, 0.1);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 2vw + 1rem, 2.6rem);
}

h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.lead {
  margin: 0;
  color: var(--muted);
}

.card {
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.ip-box {
  font-size: 1.4rem;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--panel-light);
  display: inline-block;
  margin-bottom: 10px;
}

.hint {
  margin: 0;
  color: var(--muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.ip-select {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 16px;
}

.ip-choice {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
}

#manualIp {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: var(--panel-light);
  color: var(--text);
}

.ip-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.btn {
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.btn.start {
  background: var(--accent);
  color: #1f2937;
}

.btn.stop {
  background: #ef4444;
  color: white;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.status {
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--panel-light);
}

.log-box {
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.log-box.green {
  background: var(--green);
}

.log-box.red {
  background: var(--red);
}

.log-header {
  font-weight: 700;
  margin-bottom: 10px;
}

.log-output {
  max-height: 280px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.6);
  padding: 12px;
  border-radius: 10px;
  white-space: pre-wrap;
  color: #f8fafc;
  margin: 0;
}

.instructions {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .controls {
    flex-direction: column;
    align-items: flex-start;
  }
}
