:root {
  --crt-red: rgb(218, 49, 49);
  --crt-green: rgb(112, 159, 115);
  --crt-blue: rgb(40, 129, 206);
  --crt-scanline-opacity: .50;
}

@font-face {
  font-family: "IBM VGA";
  src: url("../fonts/Ac437_IBM_VGA_8x16.ttf") format("truetype");
  font-display: swap;
}

/* global */
html {
  font-size: 1.85rem;
  font-family: "IBM VGA", "Courier New", monospace;
  -webkit-font-smoothing: none;
  font-smooth: never;
  min-height: 100%;
}
main {
  height: 100vh;
  height: 100dvh;
  color: rgba(255, 255, 255, 0.75);
}

.pink {
  color: pink;
}
.yellow {
  color: yellow;
}
.lightblue {
  color: lightblue;
}
.code {
  color: attr(data-color);
}
.wrapper {
  padding-top: 2rem;
  padding-left: 1rem;
  display: inline-block;
  white-space: nowrap;
}
.code {
  animation: typewriter 1s steps(14) 1s 1 normal both;
  line-height: 1;
  margin: 0;
  display: inline-block;
  white-space: nowrap;
  overflow-x: hidden;
}
.cursor {
  display: inline-block;
  animation: blinkTextCursor 500ms infinite normal;
}

/* animation */
.anim-typewriter {
}
@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
@keyframes blinkTextCursor {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.crt {
  background-color: rgb(25, 25, 30);
  text-shadow: 0 0 0.2em currentColor, 1px 1px rgba(255, 0, 255, 0.5),
    -1px -1px rgba(0, 255, 255, 0.4);
  position: relative;
  &:before,
  &:after {
    content: "";
    transform: translateZ(0);
    pointer-events: none;
    opacity: var(--crt-scanline-opacity);
    mix-blend-mode: overlay;
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 1;
  }

  &:before {
    background: repeating-linear-gradient(
      var(--crt-red) 0px,
      var(--crt-green) 2px,
      var(--crt-blue) 4px
    );
  }
  &:after {
    background: repeating-linear-gradient(
      90deg,
      var(--crt-red) 1px,
      var(--crt-green) 2px,
      var(--crt-blue) 3px
    );
  }
}

/* norton commander theme */
:root {
  --nc-blue: rgb(0, 0, 170);
  --nc-cyan: rgb(0, 170, 170);
  --nc-lightcyan: rgb(85, 255, 255);
  --nc-grey: rgb(170, 170, 170);
  --nc-white: rgb(255, 255, 255);
  --nc-yellow: rgb(255, 255, 85);
}

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

.commander {
  display: flex;
  height: calc(100% - 3rem);
  border: 3px double var(--nc-cyan);
  border-bottom: none;
}

.pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--nc-blue);
}
.pane + .pane,
.navigator + .pane {
  border-left: 3px double var(--nc-cyan);
}

.navigator {
  flex: 1;
  display: flex;
  min-width: 0;
}

.pane-parent {
  display: none;
}
.navigator.has-parent .pane-parent {
  display: flex;
  flex: 0.8;
}
.navigator.has-parent #pane-left {
  flex: 1.2;
}

.pane-title {
  background: var(--nc-grey);
  color: var(--nc-blue);
  text-align: center;
  font-size: 0.85rem;
  padding: 0 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  overflow-y: auto;
  flex: 1;
}
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.5rem;
  color: var(--nc-white);
  cursor: pointer;
  font-size: 0.85rem;
}
.file-list li.file {
  color: var(--nc-lightcyan);
}
.file-list li .size {
  color: var(--nc-cyan);
}
.file-list li.selected {
  background: var(--nc-cyan);
  color: var(--nc-blue);
}
.file-list li.selected .size {
  color: var(--nc-blue);
}
body.viewer-mode .file-list li.selected {
  background: rgba(0, 170, 170, 0.35);
  color: var(--nc-lightcyan);
}
body.viewer-mode .file-list li.selected .size {
  color: var(--nc-lightcyan);
}

.viewer-content {
  margin: 0;
  padding: 0.5rem;
  overflow-y: auto;
  flex: 1;
  color: var(--nc-yellow);
  font-family: inherit;
  font-size: 0.85rem;
  white-space: pre-wrap;
}
.viewer-link {
  color: inherit;
  text-decoration: underline;
}
.viewer-link:focus,
.viewer-link:hover {
  outline: none;
  background: var(--nc-cyan);
  color: var(--nc-blue);
}

.file-list li:hover:not(.selected) {
  background: rgba(255, 255, 255, 0.15);
}

.status-bar {
  background: var(--nc-grey);
  color: var(--nc-blue);
  padding: 0 0.5rem;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fkeys {
  display: flex;
  background: rgb(0, 0, 0);
  font-size: 0.7rem;
}
.fkeys span {
  flex: 1;
  color: var(--nc-white);
  text-align: center;
  border-left: 1px solid var(--nc-grey);
}
.fkeys span:first-child {
  border-left: none;
}
.fkeys span b {
  background: var(--nc-cyan);
  color: black;
}

