/* Root variables for dark and light themes */
:root {
  --background: #282A36;
  --primaryTextColor: #F8F8F2;
  --secundaryTextColor: #BD93F9;
  --highlightTextColor: #8BE9FD;
  --white: #F8F8F2;
  --baseDirectory: "guest@rajeevnandan.rweb.site:~$ ";
}

[data-theme="light"] {
  --background: #f0f0f0;
  --primaryTextColor: #333333;
  --secundaryTextColor: #282A36;
  --highlightTextColor: #BD93F9;
}

[data-theme="dark"] {
  --background: #282A36;
  --primaryTextColor: #F8F8F2;
  --secundaryTextColor: #BD93F9;
  --highlightTextColor: #8BE9FD;
}

/* Global styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 15px 20px;
  min-height: 99%;
  width: 100%;
  height: 100%;
  color: var(--primaryTextColor);
  background: var(--background);
  font-family: cursor, monospace;
  overflow-x: hidden;
}

::selection, ::-moz-selection {
  color: var(--background);
  background-color: var(--primaryTextColor);
}

textarea {
  position: absolute;
  left: -100vw;
  background-color: var(--background);
  border: none;
  color: var(--primaryTextColor);
  font-family: monospace;
  font-size: 1rem;
  outline: none;
}

b {
  font-weight: bold;
  text-decoration: underline;
}

.cursor {
  font-size: 0.75rem;
  color: var(--secundaryTextColor);
  background-color: var(--secundaryTextColor);
  position: relative;
  opacity: 1;
  height: 1.5em;
  width: 10px;
  max-width: 10px;
  transform: translateY(4px);
  overflow: hidden;
  text-indent: -5px;
  display: inline-block;
  animation: blinker 1s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

#command {
  cursor: text;
  height: 50px;
  color: var(--secundaryTextColor);
}

#liner {
  line-height: 1.3em;
  margin-top: -2px;
  animation: show 0.5s ease forwards 1.2s;
  opacity: 0;
}

#liner::before {
  color: var(--highlightTextColor);
  content: var(--baseDirectory);
}

@keyframes show {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

p {
  display: block;
  line-height: 1.3em;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.05em;
  animation: typing 0.5s steps(30, end);
}

.no-animation {
  animation: none !important;
}

.typing-animation {
  animation: typing 0.5s steps(30, end);
}

.margin {
  margin-left: 20px;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.index {
  color: #DCDCCC;
}

.highlightColor {
  color: var(--highlightTextColor);
}

.command {
  color: var(--secundaryTextColor);
  text-shadow: 0 0 5px var(--secundaryTextColor);
}

.error {
  color: var(--highlightTextColor);
}

.white {
  color: var(--white);
}

.inherit,
a {
  color: #FF79C6;
}

a {
  text-decoration: inherit;
}

a:hover {
  background: var(--secundaryTextColor);
  color: var(--background);
}

a:focus {
  outline: 0;
}

#mobileInput {
  display: none;
}

@media (max-width:600px) {
  body {
    padding: 0.5rem 0.8rem;
    overflow-x: auto;
  }

  #cursor, textarea, .cursor {
    display: none;
  }

  #mobileInput {
    display: block;
  }

  #mobileInput input {
    border: none;
    background-color: var(--background);
    width: 85%;
    color: var(--primaryTextColor);
    font-family: monospace;
    font-size: 1rem;
    outline: none;
    font-weight: 500;
    vertical-align: middle;
  }

  #mobileInput::before {
    content: ">";
    color: var(--primaryTextColor);
    margin-right: 10px;
  }

  #terminal {
    font-size: small;
  }
}
