/**
 * Neksu Looking Glass — theme matched to neksu.net
 * (Inter, near-black navy background, indigo → violet → fuchsia accents)
 */

:root {
  --bg: #030712;
  --bg-2: #070c18;
  --card: #0a1020;
  --card-2: #111a2e;
  --border: #1e293b;
  --border-2: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --indigo: #6366f1;
  --indigo-400: #818cf8;
  --violet: #8b5cf6;
  --violet-400: #a78bfa;
  --fuchsia: #f0abfc;
  --accent: var(--indigo);
  --accent-2: var(--violet-400);
  --accent-grad: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #f0abfc 100%);
  --danger: #f43f5e;
  --success: #22c55e;
  --radius: 14px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
  --mono: "SFMono-Regular", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(99, 102, 241, 0.14), transparent 55%),
    radial-gradient(700px 500px at 88% 6%, rgba(139, 92, 246, 0.1), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--violet-400);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--fuchsia);
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 30px;
  flex-wrap: wrap;
}

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

.brand .logo {
  display: grid;
  place-items: center;
  height: 42px;
}
.brand .logo img {
  height: 40px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(139, 92, 246, 0.55));
}

.brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand .brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.brand .brand-sub {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.loc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}
.loc-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.loc-badge b {
  color: var(--text);
  font-weight: 600;
}

/* ---- Hero ---- */
.hero {
  margin: 8px 0 30px;
}
.hero h1 {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.03em;
  color: #fff;
}
.hero h1 .accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 640px;
}

/* ---- Cards ---- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
  margin: 0 0 16px;
}
.card-title svg {
  width: 15px;
  height: 15px;
  color: var(--violet-400);
}

/* ---- Info grid ---- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.info-item {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px 16px;
}
.info-item .label {
  font-size: 12px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.info-item .value {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  word-break: break-all;
}
.info-item .value.empty {
  color: var(--muted-2);
  font-family: var(--sans);
  font-style: italic;
}

.testfiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.testfiles .testfile {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 8px;
  color: var(--indigo-400);
  font-family: var(--mono);
  font-size: 13px;
}

.your-ip {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}
.your-ip a {
  font-family: var(--mono);
  font-weight: 600;
  color: #fff;
  padding: 3px 10px;
  background: var(--card-2);
  border: 1px solid var(--border-2);
  border-radius: 7px;
  cursor: pointer;
}
.your-ip a:hover {
  border-color: var(--indigo);
  color: var(--violet-400);
}

/* ---- Form ---- */
.lg-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}
.field {
  flex: 1 1 260px;
  min-width: 0;
}
.field input[type="text"] {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--mono);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input[type="text"]::placeholder {
  color: var(--muted-2);
  font-family: var(--sans);
}
.field input[type="text"]:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.field.error input[type="text"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2);
}

.select-wrap {
  position: relative;
  flex: 0 0 160px;
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select-wrap select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 50px;
  padding: 0 38px 0 16px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--mono);
  cursor: pointer;
}
.select-wrap select:focus {
  outline: none;
  border-color: var(--indigo);
}

.btn {
  flex: 0 0 auto;
  height: 50px;
  padding: 0 30px;
  border: none;
  border-radius: 10px;
  background: var(--accent-grad);
  color: #0b0620;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 10px 24px -8px rgba(139, 92, 246, 0.6);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -8px rgba(139, 92, 246, 0.75);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-hint {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted-2);
}

/* ---- Results ---- */
#results .card-title {
  justify-content: space-between;
}
.result-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--card-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.copy-btn:hover {
  border-color: var(--indigo);
  color: var(--violet-400);
}
.copy-btn svg {
  width: 14px;
  height: 14px;
}

#response {
  margin: 0;
  padding: 18px;
  background: #04060f;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: #d7def0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-height: 560px;
  overflow-y: auto;
}

/* ---- Footer ---- */
.footer {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: 13px;
  text-align: center;
}
.footer a {
  color: var(--muted);
}
.footer a:hover {
  color: var(--violet-400);
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .hero h1 {
    font-size: 26px;
  }
  .lg-form {
    flex-direction: column;
  }
  .field,
  .select-wrap,
  .btn {
    flex: 1 1 auto;
    width: 100%;
  }
}
