/* DOS Terminal Styles - Classic MS-DOS look */

@font-face {
  font-family: 'Perfect DOS VGA 437';
  src: url('../fonts/PerfectDOSVGA437.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Perfect DOS VGA 437 Win';
  src: url('../fonts/PerfectDOSVGA437Win.ttf') format('truetype');
  font-display: swap;
}

#dos-container {
  width: 100%;
  min-height: 100%;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-main {
  display: flex;
}

.dos-terminal {
  --dos-rows: 25;
  --dos-font-size: 16px;
  --dos-line-height-multiplier: 1.4;
  --dos-row-height: calc(var(--dos-font-size) * var(--dos-line-height-multiplier));

  background-color: #000;
  color: #aaa;
  font-family: 'Perfect DOS VGA 437 Win', 'Perfect DOS VGA 437', 'Courier New', 'Courier', monospace;
  font-size: var(--dos-font-size);
  line-height: var(--dos-row-height);
  padding: 0;
  margin: 0 auto;
  width: 82ch;
  min-width: 82ch;
  height: calc(var(--dos-rows) * var(--dos-row-height));
  overflow: hidden;
  border: 2px solid #555;
}

.dos-screen {
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  overscroll-behavior: none;
  touch-action: none;
}

.dos-output {
  white-space: pre;
}

.dos-output,
.dos-input-line {
  min-width: 80ch;
}

.dos-line {
  margin: 0;
  padding: 0;
  height: var(--dos-row-height);
  min-height: var(--dos-row-height);
  line-height: var(--dos-row-height);
}

.dos-line.dos-ansi-line {
  height: auto;
  min-height: 0;
  line-height: 1;
}

.dos-line.pagination-prompt {
  margin-top: 0;
}

.dos-input-line {
  display: flex;
  align-items: center;
  height: var(--dos-row-height);
  min-height: var(--dos-row-height);
  line-height: var(--dos-row-height);
  margin-top: 0;
}

.dos-prompt {
  color: #fff;
  white-space: pre;
  flex-shrink: 0;
  line-height: var(--dos-row-height);
}

.dos-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: inherit;
  line-height: var(--dos-row-height);
  height: var(--dos-row-height);
  flex-grow: 0;
  min-width: 0;
  width: 0;
  padding: 0;
  margin: 0 0 0 2px;
  caret-color: transparent;
}

.dos-input::selection {
  background: #fff;
  color: #000;
}

@keyframes blink {
  0%, 49% {
    border-right-color: #fff;
  }
  50%, 100% {
    border-right-color: transparent;
  }
}

.dos-input {
  border-right: 0.65em solid #fff;
  animation: blink 1s step-end infinite;
}

/* File content display */
.dos-file-header {
  color: #0f0;
  margin: 10px 0;
  padding: 5px 0;
  border-bottom: 1px solid #0f0;
}

.dos-heading {
  color: #ff0;
  font-weight: bold;
}

.dos-image {
  color: #0ff;
  margin: 5px 0;
}

.dos-link {
  color: #5bf;
  text-decoration: underline;
}

.dos-link:hover {
  color: #8df;
  background-color: #005;
}

.dos-link:visited {
  color: #b5f;
}

/* Classic DOS colors for different text types */
.dos-error {
  color: #f55;
}

.dos-success {
  color: #5f5;
}

.dos-warning {
  color: #ff5;
}

.dos-info {
  color: #5ff;
}

.dos-highlight {
  color: #fff;
  background-color: #00a;
}

/* Scanline effect (optional, can be disabled) */
.dos-terminal.scanlines::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
}

/* CRT screen glow effect (optional) */
.dos-terminal.crt-glow {
  text-shadow: 0 0 2px #aaa, 0 0 5px #888;
}

/* Responsive sizing */
@media (max-width: 768px) {
  .dos-terminal {
    --dos-font-size: 14px;
  }
}

@media (max-width: 480px) {
  .dos-terminal {
    --dos-font-size: 12px;
  }
}

/* Print styles - disable for printing */
@media print {
  .dos-terminal {
    display: none;
  }
}

/* Full-screen mode support */
.dos-terminal.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

/* ASCII art and box drawing characters */
.dos-ascii-art {
  font-family: 'Perfect DOS VGA 437 Win', 'Perfect DOS VGA 437', monospace;
  line-height: 1;
  letter-spacing: 0;
}
