:root {
  --bg: #1e2429;
  --panel: #12171b;
  --panel-2: #1f2730;
  --text: #e6edf3;
  --muted: #9db2c3;
  --accent: #00b4d8;
  --danger: #d9534f;
  --border: #303a43;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #2b3640, var(--bg) 60%);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  padding: 20px;
}

.brand-bar {
  position: sticky;
  top: 10px;
  z-index: 30;
  max-width: 1000px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid #3b4a57;
  background: rgba(17, 24, 30, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.brand-main {
  min-width: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand-tagline {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.brand-links {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  color: #8ecfdf;
  font-size: 13px;
}

.brand-links a {
  color: #a6e8f6;
  text-decoration: none;
  white-space: nowrap;
}

.brand-links a:hover {
  text-decoration: underline;
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.brand-footer {
  max-width: 1000px;
  margin: 20px auto 6px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #33424f;
  background: linear-gradient(180deg, #18232a, #121a20);
  color: #cbeefa;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-align: center;
}

.hero {
  background: linear-gradient(180deg, #1a232b, #11161a);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0.4px;
}

.hero p {
  margin: 6px 0 0;
  color: var(--muted);
}

.panel {
  background: linear-gradient(180deg, #171f25, var(--panel));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.meta-card {
  background: var(--panel-2);
  border: 1px solid #2d3842;
  border-radius: 10px;
  padding: 10px;
}

.meta-card .label {
  font-size: 12px;
  color: var(--muted);
}

.meta-card .value {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 700;
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2b3842;
  margin-bottom: 16px;
  background: #0f1418;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #00b4d8, #d9534f);
  transition: width 200ms ease;
}

.tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.node {
  margin-bottom: 8px;
  border: 1px solid #2c3740;
  border-radius: 10px;
  background: #1a232a;
}

.node > button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.node > button:hover {
  background: rgba(255, 255, 255, 0.03);
}

.child-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 10px 20px;
  display: none;
}

.child-list.open {
  display: block;
}

.file-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px dashed #2c3740;
  font-size: 14px;
}

.file-row:last-child {
  border-bottom: none;
}

.bad {
  color: #ff9f9b;
}

.good {
  color: #7be8fb;
}

.center {
  text-align: center;
  color: var(--muted);
}

.copy-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.copy-row input {
  flex: 1;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #10161a;
  color: var(--text);
  padding: 8px 10px;
}

.copy-row button {
  min-height: 38px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #00c1e8, #00a3c1);
  color: #0b171d;
  cursor: pointer;
  font-weight: 700;
}

.tree-controls {
  display: flex;
  gap: 8px;
  margin: 12px 0 10px;
}

.tree-controls button {
  min-height: 36px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #00c1e8, #00a3c1);
  color: #0b171d;
  cursor: pointer;
  font-weight: 700;
}

.tree-controls button.secondary {
  background: #27313a;
  color: var(--text);
  border: 1px solid var(--border);
}

@media (max-width: 900px) {
  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body {
    padding: 14px;
  }

  .brand-bar {
    top: 6px;
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-links {
    justify-content: flex-start;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }
}
