@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
  font-family: "CloisterBlack";
  src: url("/CloisterBlack.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

.gothic-text {
  font-family: "CloisterBlack", cursive;
  text-shadow: 0 0 10px rgba(128, 0, 128, 0.8), 0 0 20px rgba(128, 0, 128, 0.5);
}

:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-width: 100vw;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

/* Custom Scrollbar Styles */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(35, 35, 35, 0.5);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(128, 90, 213, 0.7);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 130, 253, 0.8);
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 90, 213, 0.7) rgba(35, 35, 35, 0.5);
}

#root {
  max-width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* Add this to your existing CSS */
.command-output-ls {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Add to your index.css */
.terminal-image {
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin: 8px 0;
}

/* Add these styles to your index.css */
.terminal-window {
  transition: box-shadow 0.3s ease;
}

.terminal-window:hover {
  box-shadow: 0 0 25px rgba(128, 0, 255, 0.6), 0 0 40px rgba(128, 0, 255, 0.4);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(30, 30, 30, 0.5);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(138, 75, 215, 0.7);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(158, 95, 235, 0.9);
}

/* Command output styling */
.command-output-ls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.file-item {
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.file-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.file-item.directory {
  color: #7dd3fc;
}

.file-item.file {
  color: #d1d5db;
}

.file-item.image {
  color: #fca5a5;
}

/* Terminal command highlighting */
.text-terminal-command {
  color: #f9fafb;
}

.text-terminal-prompt {
  color: #a5b4fc;
}

/* Subtle typing animation for cursor */
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

input.caret-purple-400 {
  caret-color: #c084fc;
  animation: blink 1.2s infinite;
}

/* Ensure text wrapping for command outputs */
.whitespace-pre-line {
  white-space: pre-line;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* Handle ASCII art properly */
pre {
  max-width: 100%;
  overflow-x: hidden;
  font-size: 0.8em; /* Reduce font size for ASCII art */
}

/* Ensure all terminal content wraps properly */
.terminal-content * {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure command output wraps properly */
.command-output-ls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  max-width: 100%;
}
