﻿/* dm-mono-300 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 300;
  src: url("../fonts/dm-mono-v15-latin-300.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* dm-mono-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/dm-mono-v15-latin-regular.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* dm-mono-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/dm-mono-v15-latin-500.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  background-color: #0f1b21;
  color: #dd9aff;
  font-family: "DM Mono", monospace;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 800px;
  gap: 2rem;
}

#terminal {
  background-color: #16272f;
  width: 100%;
  max-width: 800px;
  height: 600px;
  border-radius: 6px;
  position: relative;
  box-shadow: 0px 0px 50px #050c0e;
  display: flex;
  flex-direction: column;
}

.terminal-content {
  padding: 12px;
  flex-grow: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #4a7571 #16272f;
}
.terminal-content::-webkit-scrollbar {
  width: 8px;
}
.terminal-content::-webkit-scrollbar-track {
  background: #16272f;
  border-radius: 4px;
}
.terminal-content::-webkit-scrollbar-thumb {
  background: #4a7571;
  border-radius: 4px;
}
.terminal-content::-webkit-scrollbar-thumb:hover {
  background: #5a857f;
}

.terminal-indent {
  padding-left: 1rem;
}

.terminal-header {
  background-color: #0e1b21;
  padding: 10px 12px;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.terminal-header .terminal-title.windows {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dd9aff;
  font-family: "DM Mono", monospace;
  font-size: 12px;
}
.terminal-header .terminal-title.windows .terminal-icon {
  width: 12px;
  height: 12px;
}

.window-controls {
  display: flex;
  gap: 8px;
}
.window-controls.mac .control-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: transform 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}
.window-controls.mac .control-btn:hover {
  transform: scale(1.1);
  opacity: 0.8;
}
.window-controls.mac .control-btn.close {
  background-color: #ff5f56;
}
.window-controls.mac .control-btn.minimize {
  background-color: #ffbd2e;
}
.window-controls.mac .control-btn.maximize {
  background-color: #27c93f;
}
.window-controls.windows {
  margin-left: auto;
}
.window-controls.windows .control-btn {
  width: 45px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: system-ui;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  line-height: 1;
  padding-bottom: 2px;
}
.window-controls.windows .control-btn:hover.close {
  background-color: #e81123;
}
.window-controls.windows .control-btn:hover.minimize, .window-controls.windows .control-btn:hover.maximize {
  background-color: rgba(255, 255, 255, 0.1);
}
.window-controls.windows .control-btn.close {
  font-size: 20px;
  padding-bottom: 3px;
}

#input-line {
  display: flex;
  align-items: center;
}

#prompt {
  margin-right: 10px;
}

#command-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: "DM Mono", monospace;
  font-size: 16px;
  flex-grow: 1;
  outline: none;
}

.output {
  margin: 0;
  line-height: 1.4;
  white-space: pre-wrap;
}
.output.error {
  color: #ff0000;
}
.output.command-prompt {
  color: #dd9aff;
}
.output.command-output {
  color: #d1d1d1;
  margin-bottom: 1rem;
}

.error {
  color: #ff0000;
  text-shadow: 0 0 5px #ff0000;
  animation: glitch 0.3s infinite;
}

.terminal-highlight {
  color: #77ffcb;
}

@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}
.welcome-msg {
  color: #ffe998;
  margin-top: 4px;
}

.terminal-link {
  color: #53c0ff;
  text-decoration: none;
  transition: opacity 0.2s ease;
  display: inline-block;
  margin: 4px 0;
}
.terminal-link:hover {
  text-decoration: underline;
}

footer {
  padding: 1rem;
  width: 100%;
}
footer nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
}
footer nav a {
  color: #53c0ff;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
footer nav a:hover {
  opacity: 1;
  transform: translateY(-2px);
}
footer nav a:focus {
  outline: 2px solid rgba(83, 192, 255, 0.5);
  outline-offset: 4px;
  border-radius: 2px;
}

[data-tooltip] {
  position: relative;
}
[data-tooltip]::before, [data-tooltip]::after {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
[data-tooltip]::before {
  content: attr(data-tooltip);
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 6px 10px;
  width: max-content;
  max-width: 200px;
  background-color: rgba(0, 0, 0, 0.925);
  color: #ffffff;
  font-size: 0.875rem;
  border-radius: 4px;
  text-align: center;
}
[data-tooltip]::after {
  content: "";
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.925);
  margin-bottom: 4px;
}
[data-tooltip]:hover::before, [data-tooltip]:hover::after, [data-tooltip]:focus::before, [data-tooltip]:focus::after {
  opacity: 1;
  visibility: visible;
}

[data-tooltip-position=bottom]::before {
  bottom: auto;
  top: 100%;
  margin-bottom: 0;
  margin-top: 8px;
}
[data-tooltip-position=bottom]::after {
  bottom: auto;
  top: 100%;
  border-top-color: transparent;
  border-bottom-color: rgba(0, 0, 0, 0.925);
  margin-bottom: 0;
  margin-top: 4px;
}

@media (max-width: 840px) {
  body {
    padding: 10px;
  }
  #terminal {
    height: 400px;
  }
  footer nav {
    gap: 1rem;
    flex-wrap: wrap;
  }
  footer nav a {
    padding: 10px;
  }
}
@media (max-width: 600px) {
  body {
    margin: 0;
    padding: 0;
    min-height: 100dvh;
    background-color: #0f1b21;
  }
  main {
    width: 100%;
    height: 100dvh;
    max-width: none;
    margin: 0;
    gap: 0;
  }
  #terminal {
    width: 100%;
    height: calc(100dvh - 20px);
    border-radius: 0;
  }
  #terminal .terminal-header {
    border-radius: 0;
  }
  .terminal-content {
    height: calc(100% - 40px);
    padding: 10px;
  }
  footer {
    display: none;
  }
  .command-input {
    font-size: 16px;
    width: 100%;
  }
  .output {
    word-break: break-word;
    white-space: pre-wrap;
  }
  .profile {
    padding: 12px;
    margin-bottom: 0;
  }
}
.profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.profile .profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #dd9aff;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.profile .profile-avatar:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(221, 154, 255, 0.2);
}
.profile .profile-text h1 {
  color: #ffffff;
  font-size: 1.5rem;
  margin: 0;
  font-weight: 500;
}
.profile .profile-text p {
  color: #dd9aff;
  margin: 4px 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}
