/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #FC6736;
  color: #0C2D57;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 4px;
  font-weight: bold;
}

.skip-link:focus {
  top: 6px;
}

/* SEO-friendly hidden content */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Improved focus indicators for accessibility */
*:focus {
  outline: 2px solid #FC6736;
  outline-offset: 2px;
}

/* Better mobile responsiveness */
@media (max-width: 768px) {
  body {
    padding: 10px 15px;
    min-width: 320px;
    font-size: 14px;
  }
  
  #command {
    height: 40px;
  }
  
  .cursor {
    font-size: 10px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    background: #000000;
    color: #FFFFFF;
  }
  
  .cursor {
    background-color: #FFFFFF;
    color: #000000;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .cursor {
    animation: none;
  }
}

body {
    margin: 0;
    padding: 15px 20px;
    min-height: 99%;
    width: 100%;
    min-width: 550px;
    color: #FC6736;
    background: #0C2D57;
    font-family: cursor, monospace;
    overflow-x: hidden;
  }
  ::selection {
    color: #211830;
    background-color: #FC6736;
  }
  ::-moz-selection {
    color: #211830;
    background-color: #FC6736;
  }
  textarea {
    left: -1000px;
    position: absolute;
  }
  b {
    font-weight: bold;
    text-decoration: underline;
  }
  /* Cursor Start */
  .cursor {
    font-size: 12px;
    color: #FFB0B0;
    background-color: #FFB0B0;
    position: relative;
    opacity: 1;
    height: 1.5em;
    width: 10px;
    max-width: 10px;
    transform: translateY(4px);
    overflow: hidden;
    text-indent: -5px;
    display: inline-block;
    text-decoration: blink;
    animation: blinker 1s linear infinite;
  }
  @keyframes blinker {
    50% {
      opacity: 0;
    }
  }
  #command {
    cursor: text;
    height: 50px;
    color: #FFB0B0;
  }
  #liner {
    line-height: 1.3em;
    margin-top: -2px;
    animation: show 0.5s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
  }
  #liner::before {
    color: #FC6736;
    content: "faizan@faizantahir.dev:~$";
  }
  #liner.password::before {
    content: "Password:";
  }
  @keyframes show {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  /* Cursor End */
  p {
    display: block;
    line-height: 1.3em;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    margin: 0;
    letter-spacing: 0.05em;
    animation: typing 0.5s steps(30, end);
  }
  .no-animation {
    animation: typing 0 steps(30, end);
  }
  .margin {
    margin-left: 20px;
  }
  @keyframes typing {
    from {
      width: 0;
    }
    to {
      width: 100%;
    }
  }
  .index {
    color: #DCDCCC;
  }
  .color2 {
    color: #EFECEC;
  }
  .command {
    color: #FFB0B0;
    text-shadow: 0 0 5px #FFB0B0; 
  }
  .error {
    color: #EFECEC;
  }
  .white {
    color: #fff;
  }
  .inherit,
  a {
    color: #9C8394;
  }
  a {
    text-decoration: inherit;
  }
  a:hover {
    background: #FFB0B0;
    color: #211830;
  }
  a:focus {
    outline: 0;
  }

/* Additional SEO and Performance optimizations */
img {
  max-width: 100%;
  height: auto;
}

/* Font display optimization */
@font-face {
  font-family: 'MonospaceFont';
  src: local('Courier New'), local('Monaco'), local('Menlo');
  font-display: swap;
}

/* Optimize animations for performance */
* {
  will-change: auto;
}

.cursor {
  will-change: opacity;
}

/* Print styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .cursor {
    display: none !important;
  }
  
  #command {
    display: none !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background: #0C2D57;
    color: #FC6736;
  }
}

/* Light mode fallback */
@media (prefers-color-scheme: light) {
  body:not(.light-mode) {
    background: #0C2D57;
    color: #FC6736;
  }
}

/* Manual light mode toggle */
body.light-mode {
  background: #F5F4F0 !important;
  color: #1A1A1A !important;
}

body.light-mode .cursor {
  background-color: #1A1A1A;
  color: #1A1A1A;
}

body.light-mode #command {
  color: #4A4A4A;
}

body.light-mode #liner::before {
  color: #2563EB;
}

body.light-mode .color2 {
  color: #333;
}

body.light-mode .command {
  color: #2563EB;
  text-shadow: none;
}

body.light-mode .error {
  color: #555;
}

body.light-mode .inherit,
body.light-mode a {
  color: #6B7280;
}

body.light-mode a:hover {
  background: #2563EB;
  color: #FFF;
}

body.light-mode .index {
  color: #333;
}

body.light-mode ::selection {
  color: #FFF;
  background-color: #2563EB;
}