@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Orbitron:wght@500;700&display=swap");

:root {
  --bg: #05070b;
  --bg-2: #0a111e;
  --panel: rgba(8, 15, 25, 0.82);
  --panel-soft: rgba(12, 24, 40, 0.72);
  --text: #d8e9ff;
  --muted: #7f95b2;
  --accent: #41ffae;
  --secondary: #41c8ff;
  --danger: #ff4d9f;
  --line: rgba(65, 200, 255, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "JetBrains Mono", "SFMono-Regular", "Menlo", monospace;
  padding: 28px 20px 34px;
  background:
    linear-gradient(rgba(58, 173, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 173, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 8% 4%, rgba(65, 255, 174, 0.2), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(65, 200, 255, 0.18), transparent 34%),
    radial-gradient(circle at 70% 90%, rgba(255, 77, 159, 0.16), transparent 38%),
    linear-gradient(160deg, var(--bg) 0%, #040912 50%, var(--bg-2) 100%);
  background-size: 46px 46px, 46px 46px, auto, auto, auto, auto;
}

a {
  color: var(--secondary);
  text-decoration: none;
}

.scanlines,
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.scanlines {
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 3px;
  opacity: 0.24;
}

.noise {
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 0.48px, transparent 0.48px);
  background-size: 2px 2px;
  mix-blend-mode: soft-light;
  opacity: 0.3;
}

.terminal-header,
.terminal-main,
.terminal-footer {
  width: min(1280px, 96vw);
  margin: 0 auto;
}

.terminal-header {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(65, 200, 255, 0.08), transparent 60%),
    linear-gradient(0deg, rgba(10, 18, 30, 0.88), rgba(10, 18, 30, 0.88));
  backdrop-filter: blur(10px);
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(65, 255, 174, 0.15),
    0 26px 60px rgba(3, 8, 18, 0.75),
    0 0 44px rgba(65, 200, 255, 0.2);
}

.brand-title {
  color: var(--accent);
  font-family: "Orbitron", "JetBrains Mono", monospace;
  font-size: 24px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(65, 255, 174, 0.5);
}

.brand-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.terminal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.nav-link {
  color: var(--text);
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: 0.24s ease;
}

.nav-link .link-bracket {
  color: var(--accent);
}

.nav-link:hover,
.nav-link.is-active {
  border-color: rgba(65, 255, 174, 0.54);
  background: rgba(65, 255, 174, 0.11);
  box-shadow: inset 0 0 0 1px rgba(65, 255, 174, 0.2);
  color: #edfff7;
}

.terminal-main {
  padding-top: 22px;
}

.filter-hub {
  width: min(1280px, 96vw);
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8, 13, 22, 0.9), rgba(8, 15, 26, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(65, 200, 255, 0.14),
    0 14px 36px rgba(2, 8, 20, 0.64);
  padding: 15px;
}

.post-search-input {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(65, 200, 255, 0.5);
  background: rgba(4, 9, 16, 0.94);
  color: var(--text);
  padding: 0 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}

.post-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(65, 255, 174, 0.36), 0 0 18px rgba(65, 255, 174, 0.22);
}

.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.filter-label {
  color: var(--muted);
  min-width: 88px;
  padding-top: 5px;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 1px solid rgba(65, 255, 174, 0.28);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  transition: 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: var(--accent);
  color: #ebfff8;
  background: rgba(65, 255, 174, 0.14);
  box-shadow: 0 0 14px rgba(65, 255, 174, 0.18);
}

.terminal-panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(65, 200, 255, 0.16),
    0 20px 50px rgba(2, 8, 20, 0.76);
  overflow: hidden;
}

.panel-head {
  border-bottom: 1px solid var(--line);
  padding: 20px 22px;
  background: linear-gradient(180deg, rgba(65, 200, 255, 0.08), transparent 70%);
}

.panel-head h1 {
  margin: 0;
  font-family: "Orbitron", "JetBrains Mono", monospace;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-size: clamp(24px, 3vw, 36px);
}

.panel-head h1::before {
  content: "> ";
  color: var(--secondary);
}

.panel-head p {
  margin: 10px 0 0;
  color: var(--muted);
}

.stream-search-row {
  margin-top: 15px;
}

.post-grid {
  display: grid;
  gap: 18px;
  padding: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  border: 1px solid rgba(65, 200, 255, 0.28);
  border-radius: 12px;
  padding: 15px;
  background:
    linear-gradient(180deg, rgba(4, 10, 17, 0.96), rgba(8, 16, 28, 0.98)),
    radial-gradient(circle at top right, rgba(65, 255, 174, 0.18), transparent 60%);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  transition: 0.26s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(65, 255, 174, 0.42);
  box-shadow: 0 14px 30px rgba(2, 10, 22, 0.82), 0 0 22px rgba(65, 200, 255, 0.2);
}

.post-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--secondary), var(--danger));
}

.post-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.post-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.post-card h2 a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.25s ease;
}

.post-card h2 a:hover {
  color: #f1fff9;
  border-bottom-color: var(--accent);
  text-shadow: 0 0 12px rgba(65, 200, 255, 0.4);
}

.post-categories {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.post-categories a {
  color: #9fd7ff;
  font-size: 12px;
}

.post-card time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.post-card-body {
  color: #d1def4;
  line-height: 1.8;
  margin: 12px 0 10px;
  flex: 1;
  overflow: hidden;
}

.post-card-body p {
  margin: 0;
}

.post-empty {
  display: none;
  color: var(--muted);
  text-align: center;
  padding: 10px 18px 24px;
}

.pagination-source {
  display: none;
}

.infinite-loader {
  color: var(--muted);
  text-align: center;
  padding: 10px 18px 22px;
  font-size: 13px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.post-tags a {
  color: var(--accent);
  font-size: 12px;
}

.post-meta-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-author-wrapper {
  min-width: 120px;
  flex-shrink: 0;
}

.post-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-author:hover {
  color: var(--accent);
}

.post-author-placeholder {
  display: inline-block;
  min-width: 120px;
  height: 20px;
}

.author-icon {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.open-post-btn {
  border: 1px solid var(--secondary);
  background: rgba(65, 200, 255, 0.08);
  color: #bfe9ff;
  padding: 7px 12px;
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
  transition: 0.22s ease;
}

.open-post-btn:hover {
  color: #04101d;
  background: var(--secondary);
  box-shadow: 0 0 14px rgba(65, 200, 255, 0.38);
}

.taxonomy-list {
  list-style: none;
  margin: 0;
  padding: 12px 20px 22px;
}

.taxonomy-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.post-page .post-content {
  padding: 18px 20px;
  line-height: 1.9;
}

.post-bottom {
  border-top: 1px solid var(--line);
  padding: 12px 20px 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.plain-link {
  color: var(--secondary);
}

.pagination-wrap {
  width: min(1280px, 96vw);
  margin: 16px auto 0;
}

.pagination {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.page-number,
.extend {
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(8, 18, 30, 0.72);
}

.page-number.current {
  border-color: var(--accent);
  color: var(--accent);
}

.post-modal {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: 0.24s ease;
  z-index: 40;
}

.post-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.post-modal-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(65, 200, 255, 0.2), transparent 36%),
    rgba(2, 6, 14, 0.82);
  backdrop-filter: blur(7px);
}

.post-modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(900px, 94vw);
  height: min(88vh, 800px);
  overflow-y: auto;
  overflow-x: hidden;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(165deg, rgba(65, 200, 255, 0.06), transparent 40%),
    linear-gradient(180deg, rgba(5, 12, 20, 0.98), rgba(6, 11, 19, 0.98));
  border: 1px solid rgba(65, 200, 255, 0.4);
  border-radius: 20px;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(65, 200, 255, 0.2),
    inset 0 0 0 1px rgba(65, 255, 174, 0.12);
}

.post-modal-panel:focus-visible {
  outline: 2px solid rgba(65, 255, 174, 0.72);
  outline-offset: 3px;
}

.modal-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(4, 10, 18, 0.98), rgba(4, 10, 18, 0.9));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(65, 200, 255, 0.2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(65, 255, 174, 0.4);
  color: var(--accent);
  background: rgba(65, 255, 174, 0.1);
  border-radius: 6px;
  min-height: 28px;
  padding: 0 10px;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

.modal-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.modal-meta {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-progress {
  position: sticky;
  top: 53px;
  z-index: 9;
  width: 100%;
  height: 2px;
  background: rgba(65, 200, 255, 0.1);
}

.modal-progress span {
  display: block;
  width: 6%;
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  box-shadow: 0 0 10px rgba(65, 255, 174, 0.4);
  transition: width 0.1s linear;
}

.modal-layout {
  display: block;
  padding: 0;
  min-height: calc(100% - 55px);
}

.modal-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.modal-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(65, 255, 174, 0.35);
  background: rgba(65, 255, 174, 0.08);
  color: #d8ffef;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.modal-copy-btn:hover {
  background: rgba(65, 255, 174, 0.15);
  border-color: rgba(65, 255, 174, 0.5);
  box-shadow: 0 0 12px rgba(65, 255, 174, 0.2);
}

.modal-copy-btn:active {
  transform: scale(0.96);
}

.modal-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(65, 200, 255, 0.35);
  background: rgba(65, 200, 255, 0.08);
  color: #d8f3ff;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  min-height: 32px;
  min-width: 32px;
  padding: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.modal-top-btn:hover {
  background: rgba(65, 200, 255, 0.15);
  border-color: rgba(65, 200, 255, 0.5);
  box-shadow: 0 0 12px rgba(65, 200, 255, 0.2);
}

.modal-top-btn:active {
  transform: scale(0.92);
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 77, 159, 0.35);
  background: rgba(255, 77, 159, 0.08);
  color: #ffcce4;
  min-height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 77, 159, 0.15);
  border-color: rgba(255, 77, 159, 0.5);
  box-shadow: 0 0 12px rgba(255, 77, 159, 0.2);
}

.modal-close:active {
  transform: scale(0.92);
}

.modal-main {
  min-width: 0;
  padding: 28px 32px 40px;
  max-width: 100%;
}

.modal-head {
  padding: 0 0 20px;
  text-align: center;
  border-bottom: 1px solid rgba(65, 200, 255, 0.12);
  margin-bottom: 24px;
}

.modal-head-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.head-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(65, 255, 174, 0.5));
}

.head-line:last-child {
  background: linear-gradient(90deg, rgba(65, 255, 174, 0.5), transparent);
}

.head-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(65, 255, 174, 0.6);
}

.modal-head h2 {
  margin: 0;
  color: #f0fff9;
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-summary-wrap {
  margin-bottom: 28px;
  border: 1px solid rgba(65, 200, 255, 0.15);
  background:
    linear-gradient(135deg, rgba(65, 200, 255, 0.08), transparent 60%),
    rgba(6, 14, 24, 0.5);
  border-radius: 14px;
  padding: 18px 20px;
  position: relative;
}

.modal-summary-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(65, 200, 255, 0.3), transparent);
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.summary-header svg {
  color: var(--secondary);
}

.modal-summary-wrap h3 {
  margin: 0;
  color: #9ee4ff;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.modal-summary-wrap p {
  margin: 0;
  color: #c8ddf5;
  line-height: 1.7;
  font-size: 14px;
}

.modal-body-wrap {
  position: relative;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.modal-tags span {
  border: 1px solid rgba(65, 255, 174, 0.3);
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--accent);
  font-size: 12px;
  background: rgba(65, 255, 174, 0.05);
  transition: all 0.2s ease;
}

.modal-tags span:hover {
  background: rgba(65, 255, 174, 0.12);
  border-color: rgba(65, 255, 174, 0.45);
}

.modal-body {
  line-height: 1.8;
  color: #d4e5fa;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 15px;
  max-width: 100%;
}

.modal-footer {
  margin-top: 48px;
  padding-top: 24px;
  text-align: center;
}

.footer-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.divider-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(65, 200, 255, 0.3), transparent);
}

.divider-icon {
  color: var(--accent);
  font-size: 10px;
  opacity: 0.6;
}

.footer-text {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.modal-body > *:first-child {
  margin-top: 0;
}

.modal-body > *:last-child {
  margin-bottom: 0;
}

.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body h4 {
  color: #f0fff9;
  line-height: 1.4;
  margin-top: 32px;
  margin-bottom: 16px;
  font-weight: 600;
}

.modal-body h1 {
  font-size: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(65, 200, 255, 0.15);
}

.modal-body h2 {
  font-size: 20px;
  position: relative;
  padding-left: 16px;
}

.modal-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--secondary));
  border-radius: 2px;
}

.modal-body h3 {
  font-size: 17px;
  color: #e0f7ff;
}

.modal-body h4 {
  font-size: 15px;
  color: #c8ebff;
}

.modal-body p {
  margin: 0 0 16px;
}

.modal-body a {
  color: #7dd3ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(125, 211, 255, 0.3);
  transition: all 0.2s ease;
}

.modal-body a:hover {
  color: #a8e4ff;
  border-bottom-color: rgba(125, 211, 255, 0.6);
}

.modal-body blockquote {
  margin: 24px 0;
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  background:
    linear-gradient(90deg, rgba(65, 255, 174, 0.08), transparent),
    rgba(6, 14, 24, 0.4);
  border-radius: 0 10px 10px 0;
  font-style: italic;
}

.modal-body blockquote p:last-child {
  margin-bottom: 0;
}

.modal-body ul,
.modal-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.modal-body li {
  margin: 8px 0;
  line-height: 1.7;
}

.modal-body li::marker {
  color: var(--accent);
}

.modal-body pre {
  margin: 24px 0;
  border: 1px solid rgba(65, 200, 255, 0.2);
  background: rgba(3, 8, 14, 0.9);
  border-radius: 12px;
  padding: 16px;
  overflow: auto;
  position: relative;
}

.modal-body pre::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--secondary), transparent);
  opacity: 0.5;
}

.modal-body pre,
.modal-body code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-family: "JetBrains Mono", "SFMono-Regular", "Menlo", monospace;
  font-size: 13px;
}

.modal-body code {
  color: #a8ffd4;
  background: rgba(65, 255, 174, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.modal-body pre code {
  background: none;
  padding: 0;
  color: #c4ffe4;
}

.modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 20px 0;
  border: 1px solid rgba(65, 200, 255, 0.15);
}

.modal-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(65, 200, 255, 0.2), transparent);
  margin: 32px 0;
}

.modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.modal-body th,
.modal-body td {
  padding: 10px 12px;
  border: 1px solid rgba(65, 200, 255, 0.15);
  text-align: left;
}

.modal-body th {
  background: rgba(65, 200, 255, 0.1);
  color: #9ee4ff;
  font-weight: 500;
}

.modal-body tr:nth-child(even) {
  background: rgba(6, 14, 24, 0.3);
}

.post-modal-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(65, 200, 255, 0.45) rgba(6, 14, 24, 0.85);
}

.post-modal-panel::-webkit-scrollbar {
  width: 10px;
}

.post-modal-panel::-webkit-scrollbar-track {
  background: rgba(6, 14, 24, 0.85);
  border-radius: 999px;
}

.post-modal-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(65, 200, 255, 0.88), rgba(65, 255, 174, 0.7));
  border-radius: 999px;
  border: 2px solid rgba(6, 14, 24, 0.85);
}

.post-modal-panel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(65, 200, 255, 1), rgba(65, 255, 174, 0.92));
}

.modal-body pre {
  scrollbar-width: thin;
  scrollbar-color: rgba(65, 200, 255, 0.5) rgba(4, 9, 15, 0.9);
}

.modal-body pre::-webkit-scrollbar {
  height: 9px;
  width: 9px;
}

.modal-body pre::-webkit-scrollbar-track {
  background: rgba(4, 9, 15, 0.9);
  border-radius: 999px;
}

.modal-body pre::-webkit-scrollbar-thumb {
  background: rgba(65, 200, 255, 0.75);
  border-radius: 999px;
}

.modal-body .gutter {
  display: none;
}

.modal-body figure.highlight table {
  width: 100%;
  table-layout: fixed;
}

.modal-body figure.highlight .code {
  width: 100%;
}

.modal-body svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
}

.modal-body foreignObject {
  width: 100%;
  height: 100%;
}

.modal-body foreignObject div {
  max-width: 100%;
}

@media (max-width: 1024px) {
  .modal-main {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .modal-main {
    padding: 20px;
  }

  .modal-head h2 {
    font-size: 20px;
  }

  .modal-body {
    font-size: 14px;
  }

  .modal-body h1 {
    font-size: 20px;
  }

  .modal-body h2 {
    font-size: 18px;
  }

  .modal-body h3 {
    font-size: 16px;
  }
}

@media (max-width: 720px) {
  .post-modal-panel {
    top: 0;
    left: 0;
    transform: none;
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .modal-toolbar {
    padding: 10px 12px;
  }

  .modal-toolbar-left {
    gap: 8px;
  }

  .modal-meta {
    display: none;
  }

  .modal-actions {
    gap: 6px;
  }

  .modal-copy-btn span {
    display: none;
  }

  .modal-head {
    padding-bottom: 16px;
    margin-bottom: 20px;
  }

  .modal-summary-wrap {
    padding: 14px 16px;
    margin-bottom: 20px;
  }

  .modal-footer {
    margin-top: 32px;
  }
}

.terminal-footer {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(8, 16, 28, 0.9), rgba(8, 14, 24, 0.9));
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(65, 200, 255, 0.15), rgba(65, 255, 174, 0.1));
  backdrop-filter: blur(10px);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    inset 0 0 0 1px rgba(65, 255, 174, 0.2),
    0 8px 24px rgba(3, 8, 18, 0.6),
    0 0 20px rgba(65, 255, 174, 0.15);
  z-index: 100;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: linear-gradient(135deg, rgba(65, 200, 255, 0.25), rgba(65, 255, 174, 0.18));
  box-shadow:
    inset 0 0 0 1px rgba(65, 255, 174, 0.35),
    0 12px 32px rgba(3, 8, 18, 0.7),
    0 0 30px rgba(65, 255, 174, 0.25);
  transform: translateY(-2px);
}

.back-to-top:active {
  transform: translateY(0);
}

.back-to-top svg {
  filter: drop-shadow(0 0 6px rgba(65, 255, 174, 0.6));
}

@media (max-width: 720px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

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

@media (max-width: 720px) {
  body {
    padding: 14px 12px 22px;
    background-size: 34px 34px, 34px 34px, auto, auto, auto, auto;
  }

  .terminal-header {
    padding: 14px;
    border-radius: 12px;
  }

  .post-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .filter-group {
    flex-direction: column;
    gap: 6px;
  }

  .filter-label {
    min-width: auto;
  }
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
}

.tag-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(65, 255, 174, 0.28);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 13px;
}

.tag-cloud-item:hover {
  border-color: var(--accent);
  color: #ebfff8;
  background: rgba(65, 255, 174, 0.14);
  box-shadow: 0 0 14px rgba(65, 255, 174, 0.18);
}

.tag-cloud-item .tag-name {
  color: inherit;
}

.tag-cloud-item .tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(65, 200, 255, 0.15);
  border-radius: 999px;
  font-size: 11px;
  color: var(--secondary);
}
