:root {
  --bg-0: #050d1a;
  --bg-1: #0f2340;
  --bg-2: #142e56;
  --card-bg: rgba(7, 22, 48, 0.86);
  --card-border: rgba(245, 226, 143, 0.42);
  --text: #eef4ff;
  --muted: #acbad5;
  --accent: #f7cf4f;
  --accent-2: #4ec9ff;
  --ok: #7ee58e;
  --warn: #ffc857;
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Merriweather", "Georgia", "Times New Roman", serif;
  color: var(--text);
  line-height: 1.55;
}

body {
  background:
    radial-gradient(circle at 12% 6%, rgba(78, 203, 255, 0.2), transparent 34%),
    radial-gradient(circle at 86% 3%, rgba(247, 207, 79, 0.15), transparent 40%),
    linear-gradient(150deg, var(--bg-0) 0%, var(--bg-1) 52%, var(--bg-2) 100%);
}

a {
  color: var(--accent-2);
}

.site-wrap {
  display: flex;
  min-height: 100vh;
}

aside {
  width: 280px;
  background: rgba(7, 18, 38, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(4px);
  transition: width 0.22s ease;
  position: relative;
  z-index: 4;
}

aside.collapsed {
  width: 86px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.2rem;
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.brand h1 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

aside.collapsed .brand h1,
aside.collapsed .menu-label,
aside.collapsed .hint,
aside.collapsed .version-badge {
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  overflow: hidden;
}

.menu,
.lang {
  display: flex;
  flex-direction: column;
  padding: 0.4rem 0.6rem;
  gap: 0.25rem;
}

.menu button,
.menu a {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  padding: 0.75rem 0.9rem;
  font-size: 0.98rem;
  font-family: "Trebuchet MS", "Verdana", sans-serif;
  cursor: pointer;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  position: relative;
  transition: background 0.18s, transform 0.18s;
}

.menu a:hover,
.menu a:focus-visible,
.menu button:hover,
.menu button:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  outline: 0;
  transform: translateX(4px);
}

.menu a.active {
  background: linear-gradient(90deg, rgba(247, 207, 79, 0.16), rgba(78, 201, 255, 0.16));
  box-shadow: inset 0 0 0 1px rgba(247, 207, 79, 0.3);
}

.menu .icon {
  width: 1.2rem;
  text-align: center;
}

.menu .menu-label {
  white-space: nowrap;
}

.hint {
  margin: 0.5rem 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.version-badge {
  margin: 0.75rem;
  margin-top: auto;
  padding: 0.6rem 0.75rem;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

#railToggle {
  position: absolute;
  top: 12px;
  right: -16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--card-bg);
  color: var(--accent);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}

main {
  flex: 1;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(8px);
  background: rgba(7, 14, 30, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.8rem 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar h2 {
  margin: 0;
  font-size: 1.1rem;
}

.lang-switch {
  display: flex;
  gap: 0.45rem;
}

.lang-switch button {
  border: 1px solid rgba(255, 255, 255, 0.23);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.lang-switch button.active {
  background: linear-gradient(90deg, rgba(247, 207, 79, 0.35), rgba(78, 201, 255, 0.3));
  border-color: rgba(247, 207, 79, 0.8);
  color: #0f1222;
  font-weight: 700;
}

.content {
  padding: 1.2rem 1.4rem 1.8rem;
}

.panel {
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem 1.2rem 1.2rem;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
  opacity: 0;
  animation: panelReveal 500ms ease-out forwards;
}

.panel + .panel {
  margin-top: 0.9rem;
}

@keyframes panelReveal {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

h1,
h2,
h3,
h4 {
  font-family: "Trebuchet MS", "Verdana", sans-serif;
  letter-spacing: 0.01em;
}

h1 {
  margin-top: 0;
  margin-bottom: 0.15rem;
  font-size: 1.7rem;
}

.muted {
  color: var(--muted);
}

code,
pre,
pre code {
  font-family: "Consolas", "Courier New", monospace;
}

pre {
  background: rgba(4, 7, 15, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 10px;
  padding: 0.9rem;
  overflow-x: auto;
}

.inline-code {
  background: rgba(4, 7, 15, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 0 0.35rem;
}

.grid-two {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: rgba(8, 22, 45, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 0.8rem;
}

.status-success {
  color: var(--ok);
  font-weight: 700;
}

.status-note {
  color: var(--warn);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.65rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

th {
  text-align: left;
  color: #d9e8ff;
  white-space: nowrap;
  cursor: pointer;
  background: rgba(10, 24, 50, 0.76);
}

th:hover {
  background: rgba(10, 24, 50, 0.92);
}

th .sort {
  font-size: 0.77rem;
  margin-left: 0.35rem;
  opacity: 0.8;
}

td a {
  color: var(--accent-2);
}

footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.22);
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 1080px) {
  aside {
    position: sticky;
    top: 0;
    height: 100vh;
  }

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

@media (max-width: 860px) {
  aside {
    width: 230px;
  }

  .topbar {
    gap: 0.8rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .site-wrap {
    flex-direction: column;
  }

  aside {
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  }

  aside.collapsed {
    width: 100%;
  }

  aside.collapsed .brand h1,
  aside.collapsed .menu-label,
  aside.collapsed .hint,
  aside.collapsed .version-badge {
    opacity: 1;
    width: auto;
    height: auto;
    pointer-events: auto;
  }

  #railToggle {
    display: none;
  }
}
