
:root {
  --bg: #05070b;
  --panel: rgba(10, 18, 24, 0.72);
  --panel-2: rgba(6, 12, 18, 0.88);
  --text: #dffef7;
  --muted: #87b8af;
  --line: rgba(20, 241, 199, 0.28);
  --line-strong: rgba(20, 241, 199, 0.64);
  --accent: #14f1c7;
  --accent-soft: rgba(20, 241, 199, 0.14);
  --shadow: 0 0 0 1px rgba(20, 241, 199, 0.18), 0 0 22px rgba(20, 241, 199, 0.1);
  --danger: #ff7373;
  --radius: 18px;
  --header-h: 108px;
  --footer-h: 48px;
  --safe-gap: 12px;
}
html[data-theme="blue"] {
  --line: rgba(87, 183, 255, 0.28); --line-strong: rgba(87, 183, 255, 0.64); --accent: #57b7ff; --accent-soft: rgba(87, 183, 255, 0.14); --shadow: 0 0 0 1px rgba(87, 183, 255, 0.18), 0 0 22px rgba(87, 183, 255, 0.1);
}
html[data-theme="lime"] {
  --line: rgba(176, 255, 95, 0.28); --line-strong: rgba(176, 255, 95, 0.64); --accent: #b0ff5f; --accent-soft: rgba(176, 255, 95, 0.14); --shadow: 0 0 0 1px rgba(176, 255, 95, 0.18), 0 0 22px rgba(176, 255, 95, 0.1);
}
html[data-theme="yellow"] {
  --line: rgba(255, 214, 74, 0.28); --line-strong: rgba(255, 214, 74, 0.64); --accent: #ffd64a; --accent-soft: rgba(255, 214, 74, 0.14); --shadow: 0 0 0 1px rgba(255, 214, 74, 0.18), 0 0 22px rgba(255, 214, 74, 0.1);
}
html[data-theme="orange"] {
  --line: rgba(255, 154, 76, 0.28); --line-strong: rgba(255, 154, 76, 0.64); --accent: #ff9a4c; --accent-soft: rgba(255, 154, 76, 0.14); --shadow: 0 0 0 1px rgba(255, 154, 76, 0.18), 0 0 22px rgba(255, 154, 76, 0.1);
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  font-family: Consolas, Menlo, Monaco, 'Courier New', monospace;
  background: radial-gradient(circle at top, rgba(20, 241, 199, 0.06), transparent 32%), var(--bg);
  color: var(--text);
  overflow: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 90%);
  pointer-events: none;
  opacity: 0.5;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea {
  font: inherit;
  color: var(--text);
}
body, .viewport-shell { display: flex; justify-content: center; align-items: center; }
.viewport-shell {
  width: min(100%, 1500px);
  height: 100dvh;
  max-height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + var(--safe-gap)) calc(env(safe-area-inset-right, 0px) + var(--safe-gap)) calc(env(safe-area-inset-bottom, 0px) + var(--safe-gap)) calc(env(safe-area-inset-left, 0px) + var(--safe-gap));
}
.site-shell {
  width: min(100%, 1360px);
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}
.shell-panel {
  background: linear-gradient(180deg, rgba(16, 24, 30, 0.78), rgba(8, 12, 17, 0.82));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.site-header { padding: 12px 16px; min-height: var(--header-h); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  font-size: clamp(1.25rem, 1rem + 1.6vw, 2rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 40%, transparent);
}
.primary-nav {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px;
  padding-top: 12px;
}
.primary-nav a, .card-link, .filter-chip, .btn, .theme-select, .menu-toggle {
  border: 1px solid var(--line-strong);
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  transition: 180ms ease;
}
.primary-nav a:hover, .card-link:hover, .filter-chip:hover, .btn:hover, .menu-toggle:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.header-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theme-label { color: var(--muted); font-size: 0.92rem; }
.theme-select, .menu-toggle { cursor: pointer; }
.menu-toggle { display: none; }
main.page-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 12px;
}
.page-main.single { grid-template-columns: 1fr; }
.panel {
  min-height: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel.scrollable { overflow: auto; }
.panel-title {
  margin: 0;
  font-size: clamp(1.05rem, 1rem + 0.7vw, 1.45rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.panel-subtitle, .muted { color: var(--muted); }
.grid-2, .grid-3 { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hero {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}
.terminal-window {
  min-height: 0;
  flex: 1;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(2, 8, 12, 0.92), rgba(4, 9, 12, 0.82));
  box-shadow: inset 0 0 30px rgba(0,0,0,0.32);
}
.typewriter { white-space: pre-wrap; line-height: 1.55; min-height: 220px; }
.cursor {
  display: inline-block; width: 10px; height: 1.15em; margin-left: 2px; vertical-align: bottom;
  background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat-card, .tile, .list-item, .download-item, .gallery-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10, 18, 24, 0.72), rgba(4, 8, 12, 0.92));
  padding: 14px;
  min-width: 0;
}
.stat-card strong { display: block; color: var(--accent); font-size: 1.2rem; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 8px; justify-content: space-between; }
.tile h3, .list-item h3, .download-item h3, .gallery-card h3 { margin: 0; font-size: 1rem; }
.tile p, .list-item p, .download-item p, .gallery-card p { margin: 0; color: var(--muted); }
.page-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search-input, .text-input, .text-area {
  width: 100%;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 12, 16, 0.78);
}
.filter-chip { cursor: pointer; }
.listing { display: grid; gap: 10px; min-height: 0; overflow: auto; padding-right: 4px; }
.list-item { cursor: pointer; }
.list-item .meta, .download-meta { color: var(--muted); font-size: 0.9rem; }
.site-footer { min-height: var(--footer-h); padding: 10px 16px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; color: var(--muted); font-size: 0.9rem; align-items: center; text-align: center; }
.modal-root {
  position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; padding: 12px; z-index: 30;
}
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; transition: 160ms ease;
}
.modal-root.open { pointer-events: auto; }
.modal-root.open .modal-backdrop { opacity: 1; }
.modal {
  position: relative;
  width: min(100%, 960px);
  max-height: min(84dvh, 84vh);
  background: linear-gradient(180deg, rgba(5, 12, 16, 0.96), rgba(4, 8, 12, 0.96));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  border-radius: 20px;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: 160ms ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-root.open .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-content { padding: 16px; overflow: auto; min-height: 0; }
.close-btn {
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { color: var(--accent); margin-top: 1.2em; margin-bottom: 0.5em; }
.markdown h1:first-child { margin-top: 0; }
.markdown p, .markdown li, .markdown blockquote, .markdown td, .markdown th { line-height: 1.6; }
.markdown pre {
  border: 1px solid var(--line);
  background: rgba(4, 10, 14, 0.96);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
}
.markdown code { color: var(--accent); }
.markdown table { width: 100%; border-collapse: collapse; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 8px; text-align: left; }
.markdown blockquote { border-left: 3px solid var(--accent); padding-left: 12px; color: var(--muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; overflow: auto; min-height: 0; }
.gallery-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); filter: saturate(0) hue-rotate(55deg) brightness(0.75) contrast(1.15) sepia(0.25); }
.download-item, .gallery-card { display: flex; flex-direction: column; gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-row { display: grid; gap: 6px; }
.password-output { font-size: clamp(1rem, 0.9rem + 1vw, 1.4rem); color: var(--accent); word-break: break-word; }
.helper { font-size: 0.9rem; color: var(--muted); }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.status-inline { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--muted); font-size: 0.92rem; }
.hidden { display: none !important; }
.center-stack { display: grid; place-items: center; height: 100%; text-align: center; }

@media (max-width: 1000px) {
  .site-header { min-height: unset; }
  main.page-main { grid-template-columns: 1fr; }
  .stats-grid, .tiles, .gallery-grid, .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .viewport-shell { padding: 8px; }
  .brand-row { align-items: flex-start; flex-direction: column; }
  .header-controls { width: 100%; justify-content: space-between; }
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }
  .primary-nav.open { display: flex; }
  .primary-nav a { text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
}
