html, body {
  margin: 0;
  padding: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  background-color: #f4f4f4;
}


a {
    position: relative;
    color:#0090e0;
    text-decoration:none;
}

.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: 192px;
  height: 100%;
  padding: 10px;
  overflow-y: auto;
  background: #181818;
  border-right: 1px solid #333;
}

.main {
  margin-left: 212px;
  margin-right: 0;
  padding: 20px;
  max-width: 800px;
  position: relative;
  z-index: 2;
  background-color: transparent;
}

.sidenav ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  color: #fff;
}

.sidenav li {
  margin: 3px 0;
  color: #fff;
}

.sidenav ul ul {
  padding-left: 14px;
}

.toggle {
  display: none;
}

.toggle + label + a + ul {
  display: none;
}

.toggle:checked + label + a + ul {
  display: block;
}

label {
  cursor: pointer;
  font-weight: bold;
  user-select: none;
}

.sidenav label {
  color: #fff;
}

.label-admin {
  color:#181818;
}

hr {
  border: none;
  border-top: 1px solid #333;
  margin: 8px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  margin: 20px 0;
}

th {
  text-align: left;
  vertical-align: top;
  padding: 4px;
  font-size: 14px;
  font-weight: normal;
  background-image: url("/img/bg_dither.png");
}

td {
  padding: 4px;
  font-size: 14px;
  vertical-align: top;
  background-image: url("/img/bg_dither.png");
}

.htb {
  border-bottom: 1px dotted #888;
}

h2 {
  display: inline-block;
  margin: 0;
}

table li {
  list-style: none;
  padding-left: 16px;
  margin: 2px 0;
}
.fm-window {
  max-width: 880px;
  margin: 16px 0;
  border: 1px solid #333;
}

.fm-breadcrumb {
  padding: 6px 8px;
  border-bottom: 1px solid #333;
  font-size: 12px;
}

.fm-breadcrumb a {
  color: #0090e0;
}

.fm-body {
  display: flex;
  align-items: stretch;
}

.fm-tree {
  width: 200px;
  flex: none;
  padding: 8px 6px;
  overflow-x: auto;
  border-right: 1px solid #333;
}

.fm-tree-node {
  white-space: nowrap;
  padding: 1px 4px;
}

.fm-tree-node a {
  color: #181818;
}

.fm-tree-node a.selected {
  background: #181818;
  color: #fff;
  padding: 0 3px;
}

.fm-tree-node a.fm-hidden-item {
  color: #aaa;
  text-decoration: line-through;
}

.fm-list {
  flex: 1;
  padding: 8px;
  overflow-x: auto;
}

.fm-list-header {
  display: flex;
  gap: 8px;
  padding: 2px 4px;
  font-weight: bold;
  font-size: 11px;
  color: #555;
  border-bottom: 1px solid #333;
  margin-bottom: 2px;
}

.fm-row:nth-child(odd) .fm-row-main {
  background: #f0f0f0;
}

.fm-row-main {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
}

.fm-row-main:hover {
  background: #181818;
  color: #fff;
}

.fm-row-main:hover a,
.fm-row-main:hover .fm-name,
.fm-row-main:hover .fm-type {
  color: #fff;
}

.fm-icon {
  width: 44px;
  flex: none;
  font-size: 11px;
  color: #808080;
}

.fm-row-main:hover .fm-icon {
  color: #eee;
}

.fm-name {
  flex: 1 1 auto;
  min-width: 100px;
}

.fm-name.fm-hidden-item {
  color: #aaa;
  text-decoration: line-through;
}

.fm-type {
  width: 130px;
  flex: none;
  color: #808080;
  font-size: 11px;
}

.fm-actions {
  flex: none;
  display: flex;
  gap: 6px;
  font-size: 12px;
}

.fm-inline-form {
  display: inline;
}

.fm-edit-toggle {
  display: none;
}

.fm-edit-panel {
  display: none;
  background: #ffffe1;
  border: 1px solid #333;
  padding: 8px;
  margin: 2px 0 8px 0;
}

.fm-edit-toggle:checked ~ .fm-edit-panel {
  display: block;
}

.fm-empty {
  color: #888;
  font-size: 12px;
  padding: 4px;
}

.fm-add-bar {
  border-top: 1px solid #333;
  margin-top: 8px;
  padding-top: 8px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: #0090e0;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: none;
}

.link-btn:hover {
  color: #181818;
}

.link-btn.danger {
  color: #c0392b;
}

.pagetree-form {
  max-width: 500px;
}

.img-error {
  color: #c0392b;
  font-weight: bold;
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  padding: 8px;
}

.img-card {
  border: 1px solid #333;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.img-card img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #f4f4f4;
}

.img-path {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  padding: 2px 4px;
}

.cm-field {
  max-width: 520px;
}

.cm-field .CodeMirror {
  border: 1px solid #333;
  font-size: 13px;
}

.cm-enlarge-btn {
  font-size: 11px;
  margin-left: 8px;
}

footer {
  margin-top: 20px;
}

footer hr {
  margin-bottom: 12px;
}

footer .buttons {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  gap: 8px; 
}

footer img {
  image-rendering: pixelated;
  max-height: 31px;
}

a:hover {
    color:#181818;
    background-color:#e6e6e69d;
}

a:hover::after {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 2px; 
    background-image: url("/img/ants.gif");
    background-repeat: repeat;
    pointer-events: none;
    z-index: -1;
}

.side-image {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

.side-image img {
  height: 100%;
  width: auto;
  display: block;
}

.carousel {
  overflow: hidden;
  width: 100%;
}

.track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scroll 25s linear infinite;
}

.track a {
  flex: 0 0 auto;
  width: 220px;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.image-carousel {
  max-width: 100%;
}

.image-carousel .track a {
  width: auto;
}

.track a:hover {
  transform: scale(1.06);
}

.track img {
  width: 100%;
  height: auto;
  display: block;
}

/* Animation */
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

  :root {
    --win95-gray: #c0c0c0;
    --win95-dark: #808080;
    --win95-light: #ffffff;
    --win95-black: #000000;
    --win95-blue: #000080;
  }

  @font-face {
    font-family: 'W95FA'; 
    src: url('/W95FA.otf') format('opentype'),
        url('/W95FA.woff2') format('woff2'),
        url('/W95FA.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
  }

  .doom-window {
    position: fixed;
    top: 120px;
    left: 120px;
    width: 640px;
    background: var(--win95-gray);
    border: 2px solid var(--win95-black);
    box-shadow:
      inset -2px -2px var(--win95-dark),
      inset 2px 2px var(--win95-light);
    z-index: 9999;
    font-family: "WIN95FA";
  }

  .hidden {
    display: none;
  }

  /* --- Title bar --- */
  .doom-titlebar {
    background: var(--win95-blue);
    color: white;
    padding: 4px 6px;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    font-size: 13px;
  }

  .doom-titlebar span {
    font-weight: bold;
  }

  /* --- Win95 close button --- */
  .doom-titlebar button {
    width: 18px;
    height: 18px;
    background: var(--win95-gray);
    border: 2px solid var(--win95-black);
    box-shadow:
      inset -2px -2px var(--win95-dark),
      inset 2px 2px var(--win95-light);
    font-family: inherit;
    font-size: 12px;
    line-height: 12px;
    cursor: pointer;
    padding: 0;
  }

  .doom-titlebar button:active {
    box-shadow:
      inset 2px 2px var(--win95-dark),
      inset -2px -2px var(--win95-light);
  }

  /* --- Content frame --- */
  .dosbox-container {
    width: 640px;
    height: 400px;
    background: black;
    border-top: 2px solid var(--win95-dark);
    border-left: 2px solid var(--win95-dark);
    border-right: 2px solid var(--win95-light);
    border-bottom: 2px solid var(--win95-light);
  }
