* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body,
#version-list,
#schema-panel,
main {
  scrollbar-width: none;
}
body::-webkit-scrollbar,
#version-list::-webkit-scrollbar,
#schema-panel::-webkit-scrollbar,
main::-webkit-scrollbar {
  display: none;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0a0a;
  color: #d4d4d4;
  min-height: 100vh;
}

header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 2rem;
  background: #141414;
  border-bottom: 1px solid #1a2a3a;
}

header h1 {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.logo-config {
  color: #38bdf8;
}
.logo-claw {
  color: #ef4444;
}

/* App layout: sidebar + content */
.app-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: calc(100vh - 52px);
}

#version-list {
  overflow-y: auto;
  background: #141414;
  border-right: 1px solid #1a2a3a;
  padding: 0.75rem 0;
  text-align: right;
  display: flex;
  flex-direction: column;
}

#version-list ul {
  flex: 1;
  overflow-y: auto;
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 0.6rem 1rem;
  border-top: 1px solid #1a2a3a;
  font-size: 0.75rem;
}
.sidebar-footer a {
  color: #555;
  text-decoration: none;
}
.sidebar-footer a:hover {
  color: #888;
}

#version-list ul {
  list-style: none;
  scrollbar-width: none;
}
#version-list ul::-webkit-scrollbar {
  display: none;
}

#version-list li {
  padding: 0.35rem 1rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: monospace;
  color: #888;
  transition:
    background 0.1s,
    color 0.1s;
}

#version-list li:hover {
  background: #121a25;
  color: #d4d4d4;
}
#version-list li.active {
  background: #152535;
  color: #38bdf8;
  border-right: 2px solid #38bdf8;
}
#version-list li.no-schema {
  color: #3a3a3a;
  cursor: default;
}
#version-list li a {
  color: inherit;
  text-decoration: none;
  display: block;
}

#versions-loading {
  padding: 1rem;
  color: #555;
  font-size: 0.85rem;
}

.content-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tab-bar {
  display: flex;
  gap: 0.25rem;
  padding: 0 1.5rem;
  background: #141414;
  border-bottom: 1px solid #1a2a3a;
  flex-shrink: 0;
}

.nav-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #777;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.nav-btn:hover {
  color: #ddd;
  border-bottom-color: #1a3050;
}
.nav-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  font-weight: 500;
}

main {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.view {
  display: none;
}
.view.active {
  display: block;
}
#view-browser.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

#schema-breadcrumb {
  flex-shrink: 0;
  background: #141414;
  padding: 0.4rem 1.5rem;
  min-height: 1.6em;
  font-family: monospace;
  font-size: 0.8rem;
  color: #555;
  border: 1px solid #1a2a3a;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}
#schema-breadcrumb .bc-seg {
  color: #79b8ff;
  cursor: pointer;
}
#schema-breadcrumb .bc-seg:hover {
  color: #a0d0ff;
  text-decoration: underline;
}
#schema-breadcrumb .bc-dot {
  color: #333;
  margin: 0 0.3rem;
}

/* Browser */
#schema-panel {
  background: #141414;
  border-radius: 0 0 10px 10px;
  border: 1px solid #1a2a3a;
  border-top: none;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

#schema-search-bar {
  flex-shrink: 0;
  padding: 0.6rem 0;
}

#schema-search {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: #141414;
  color: #d4d4d4;
  border: 1px solid #1a2a3a;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.85rem;
  outline: none;
}
#schema-search:focus {
  border-color: #38bdf8;
}
#schema-search::placeholder {
  color: #555;
}

#schema-placeholder {
  color: #555;
  text-align: center;
  margin-top: 4rem;
}

/* Schema tree — hover rules disabled for testing */
.prop-group {
  margin-left: 1.2rem;
}

.prop-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem;
  cursor: pointer;
  user-select: none;
  border-radius: 5px;
}

.prop-header:hover {
  background: #0d1520;
}
.prop-copy {
  display: none;
  color: #555;
  font-size: 0.7rem;
  margin-left: 0.5rem;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}
.prop-copy:hover {
  color: #888;
  background: #1a1a1a;
}
.prop-header:hover .prop-copy {
  display: inline;
}

.prop-toggle {
  width: 16px;
  text-align: center;
  color: #4488ff;
  font-size: 0.8rem;
  font-weight: bold;
}

.prop-name {
  color: #79b8ff;
  font-family: monospace;
  font-size: 0.9rem;
}

.prop-type {
  color: #d2a8ff;
  font-size: 0.8rem;
  font-family: monospace;
  opacity: 0.7;
}

.prop-required {
  color: #4488ff;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #4488ff18;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.prop-desc {
  color: #888;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.prop-meta {
  color: #555;
  font-size: 0.75rem;
  margin-left: 2rem;
  font-family: monospace;
}

.prop-values {
  margin-left: 2rem;
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.prop-value-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #1a1210;
  border: 1px solid #3a2a1a;
  border-radius: 12px;
  font-family: monospace;
  font-size: 0.75rem;
  color: #e8a040;
}

.prop-sample {
  margin-left: 2rem;
  margin-top: 0.25rem;
  padding: 0.4rem 0.6rem;
  background: #0a0a0a;
  border: 1px solid #1a2a3a;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.75rem;
  color: #88cc88;
  white-space: pre;
  max-width: 500px;
  overflow-x: auto;
}

.prop-children {
  height: 0;
  overflow: hidden;
}
.prop-children.open {
  height: auto;
  overflow: visible;
  border-left: 1px solid #333;
  margin-left: 7px;
  padding-left: 0.5rem;
}

.prop-group.search-current > .prop-header {
  background: #38bdf835;
  border-radius: 5px;
}

#search-count {
  color: #555;
  font-size: 0.8rem;
  font-family: monospace;
  margin-left: 0.5rem;
}

#schema-search-bar {
  display: flex;
  align-items: center;
}

#schema-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

#search-suggestions {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #1a2a3a;
  border-radius: 8px;
  margin-bottom: 4px;
  overflow-y: auto;
  max-height: calc(5 * 2.1rem);
  z-index: 10;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
#search-suggestions::-webkit-scrollbar {
  width: 6px;
}
#search-suggestions::-webkit-scrollbar-track {
  background: transparent;
}
#search-suggestions::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

.search-suggestion {
  padding: 0.5rem 0.85rem;
  font-family: monospace;
  font-size: 0.82rem;
  color: #79b8ff;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestion:hover,
.search-suggestion.active {
  background: #152535;
  color: #a0d0ff;
}

/* Validator */
.validator-layout {
}

select,
button,
textarea {
  font-family: inherit;
  font-size: 0.9rem;
}

select {
  background: #1a1a1a;
  color: #d4d4d4;
  border: 1px solid #1a2a3a;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}
select:focus {
  border-color: #38bdf8;
  outline: none;
}

button {
  background: #0284c7;
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s;
}

button:hover {
  background: #0ea5e9;
}

textarea {
  width: 100%;
  height: 400px;
  background: #0a0a0a;
  color: #d4d4d4;
  border: 1px solid #1a2a3a;
  border-radius: 10px;
  padding: 1rem;
  font-family: monospace;
  font-size: 0.85rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
textarea:focus {
  border-color: #38bdf8;
}

#validate-btn {
  margin-top: 0.75rem;
}

#validate-privacy {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #555;
}

#validate-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  font-family: monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.result-valid {
  background: #0d2818;
  border: 1px solid #238636;
  color: #3fb950;
}

.result-invalid {
  background: #2d0a0a;
  border: 1px solid #cc2222;
  color: #ff4444;
}

.result-error {
  background: #2d1a00;
  border: 1px solid #d29922;
  color: #e3b341;
}

/* Diff */
.diff-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.diff-arrow {
  color: #555;
  font-size: 1.1rem;
}
.diff-target {
  color: #79b8ff;
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 500;
}

#diff-result {
  max-width: 900px;
}

.diff-entry {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 2px;
  font-family: monospace;
  font-size: 0.85rem;
}

.diff-added {
  background: #0d2818;
}
.diff-removed {
  background: #2d0a0a;
}
.diff-changed {
  background: #2d1a00;
}

.diff-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-weight: bold;
  text-transform: uppercase;
  flex-shrink: 0;
}

.diff-added .diff-badge {
  background: #238636;
  color: #fff;
}
.diff-removed .diff-badge {
  background: #cc2222;
  color: #fff;
}
.diff-changed .diff-badge {
  background: #9e6a03;
  color: #fff;
}

.diff-path {
  color: #79b8ff;
}
.diff-details {
  color: #888;
}
.diff-desc {
  color: #555;
  font-size: 0.8rem;
}

.diff-summary {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #141414;
  border: 1px solid #1a2a3a;
  border-radius: 10px;
  font-size: 0.9rem;
}

.diff-summary span {
  margin-right: 1.5rem;
}
.diff-summary .added {
  color: #3fb950;
}
.diff-summary .removed {
  color: #ff4444;
}
.diff-summary .changed {
  color: #e3b341;
}

.no-changes {
  color: #555;
  text-align: center;
  margin-top: 3rem;
}
