:root {
  --bg: #0b0f1a;
  --panel: #141b2d;
  --accent: #00bfa6;
  --accent2: #007f74;
  --text: #e8f1ff;
  --muted: #94a3b8;
  --red: #ff5252;
  --green: #2dd36f;
}

body {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  text-align: center;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  padding: 16px;
  color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  flex-grow: 1;
  padding: 20px;
}

.panel {
  background: var(--panel);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
}

.form-panel h2, .result-panel h2 {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
}

label {
  display: block;
  margin-top: 12px;
  font-weight: bold;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #22304a;
  background: #1b2338;
  color: var(--text);
  margin-top: 4px;
}

.btn {
  width: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border: none;
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  margin-top: 18px;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.2);
}

.info-box {
  margin-top: 20px;
  background: #1d2a45;
  border-left: 4px solid var(--accent);
  padding: 10px;
  font-size: 13px;
  color: var(--muted);
}

.result-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.result-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.result-table div {
  background: #1c2742;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  border-left: 4px solid var(--accent);
  transition: transform 0.15s;
}

.result-table div:hover {
  transform: translateX(4px);
  background: #202e4d;
}

.result-table div {
  background: #1c2742;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
}

.binary-zone {
  background: #1a2238;
  padding: 12px;
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.bin-display {
  background: #0f1628;
  color: var(--text);
  padding: 8px;
  border-radius: 6px;
  font-family: monospace;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 14px;
  margin-bottom: 8px;
}

.red { color: var(--red); font-weight: bold; }
.green { color: var(--green); font-weight: bold; }

.legend {
  font-size: 13px;
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin: 0 4px;
}

.red-dot { background: var(--red); }
.green-dot { background: var(--green); }

.hidden { display: none; }

.footer {
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
  background: #0d1322;
}

a {
  text-decoration: none;
  color: inherit;
}

a div:hover {
  cursor: pointer;
}