/*========================================
 * VALIS Brutalist CSS (2025)
 * Clean, Flat, Functional, FINAL
 * =========================================*/

/* Color Palette */
:root {
  --color-primary: #63D938; /* Cool Green */
  --color-text: #E0E0E1; /* White Text */
  --color-accent: #48C1C3; /* Blue Accent */
  --color-hover: #EE2A7D; /* Pink Hover */
  --color-bg: #000000; /* Black Background */
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Space Mono', monospace;
  background: var(--color-bg) url('/assets/img/background/wallpaper1.jpg') center top no-repeat;
  background-size: cover;
  color: var(--color-text);
  line-height: 1.4;
  overflow-x: hidden;
  padding: 0 0rem; /* Add some breathing room around the page */
}

/* Background Cover Layer */
.background-cover {
  background-color: rgba(0,0,0,0.85);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 2rem; /* Match the outer padding */
}

/* Header */
header {
  text-align: center;
  padding: 2rem 2rem 2rem 2rem;
}

header h1 {
  font-family: 'Orbitron', 'Space Mono', monospace;
  font-size: 3rem;
  color: var(--color-primary);
}

header h2 {
  font-size: 1rem;
  color: var(--color-text);
  margin-top: 0.5rem;
}

/* Navbar */
#nav {
  background: none;
  position: relative;
  padding: 1rem 0;
}

#nav::before {
  content: '═══════════════════════════════════════';
  display: block;
  text-align: center;
  color: var(--color-primary);
  opacity: 0.3;
  font-size: 0.6rem;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

#nav::after {
  content: '═══════════════════════════════════════';
  display: block;
  text-align: center;
  color: var(--color-primary);
  opacity: 0.3;
  font-size: 0.6rem;
  margin-top: 0.5rem;
  letter-spacing: -1px;
}

#nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0.5rem;
  flex-wrap: wrap;
}

#nav li {
  margin: 0.5rem 1rem;
  position: relative;
}

#nav li::before {
  content: '▸';
  color: var(--color-accent);
  margin-right: 0.5rem;
  opacity: 0.7;
  transition: all 0.2s ease;
}

#nav li:hover::before {
  color: var(--color-primary);
  opacity: 1;
  text-shadow: 0 0 5px var(--color-primary);
}

#nav a {
  color: var(--color-primary);
  text-decoration: none;
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: all 0.2s ease;
  display: inline-block;
  position: relative;
}

#nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-hover);
  box-shadow: 0 0 5px var(--color-hover);
  transition: width 0.3s ease;
}

#nav a:hover {
  color: var(--color-hover);
  background: rgba(238, 42, 125, 0.1);
  border-color: var(--color-hover);
  text-shadow: 0 0 8px var(--color-hover);
}

#nav a:hover::after {
  width: 100%;
}

#nav a.current-page {
  color: var(--color-accent);
  background: rgba(72, 193, 195, 0.15);
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(72, 193, 195, 0.3);
}

/* Main Layout */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 0; /* Add vertical breathing room */
}

.left-panel, .right-panel {
  background: none;
  overflow-y: auto;
  padding: 1rem;
}

.left-panel {
  width: 25%;
  min-width: 240px; /* Slightly wider */
}

.right-panel {
  flex: 1;
  padding-left: 2rem; /* Add margin between panels */
}

/* Footer */
.footer-area {
  background-color: var(--color-bg);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
}

.footer-area a {
  color: var(--color-accent);
  text-decoration: underline;
}

.footer-area a:hover {
  color: var(--color-hover);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  gap: 1.5rem; /* Space between logo and text */
}

.site-logo {
  max-height: 100px;
  margin: 0;
  padding-top: 0.4rem; /* Nudge logo down slightly */
}

.site-title {
  font-family: 'Orbitron', 'Space Mono', monospace;
  font-size: 3rem;
  color: var(--color-primary);
  text-align: center;
}



/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary);
  font-family: 'Orbitron', 'Space Mono', monospace;
  margin: 1.5rem 0 1rem 0;
  text-shadow: 0 0 5px rgba(99, 217, 56, 0.3);
}

h1 {
  font-size: 2.5rem;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 2rem;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 0.3rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--color-accent);
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--color-hover);
  text-shadow: 0 0 5px var(--color-hover);
}

blockquote {
  font-style: italic;
  border-left: 3px solid var(--color-primary);
  border-right: 1px solid var(--color-accent);
  padding: 1rem 1rem 1rem 1.5rem;
  margin: 1rem 0;
  background: rgba(99, 217, 56, 0.05);
  position: relative;
  box-shadow: 0 0 10px rgba(99, 217, 56, 0.2);
}

blockquote::before {
  content: '"';
  position: absolute;
  left: 0.3rem;
  top: 0;
  font-size: 3rem;
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
}

blockquote p {
  margin: 0;
}

.quote-of-day {
  border: 2px solid var(--color-accent);
  border-radius: 4px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 15px rgba(72, 193, 195, 0.2);
  position: relative;
  margin: 1rem 0;
}

.quote-of-day::before {
  content: '[ QUOTE OF THE DAY ]';
  position: absolute;
  top: -12px;
  left: 15px;
  background: var(--color-bg);
  padding: 0 8px;
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.qotd-label {
  display: none; /* Hidden since we use ::before label */
}

.quote-author {
  font-size: 0.9rem;
  color: var(--color-accent);
  display: block;
  margin-top: 0.5rem;
  text-align: right;
  font-style: italic;
}

.greentext {
  color: #789922;
}

/* General Lists Enhancement */
ul:not(.folders-list):not(.files-list):not(#nav ul) {
  list-style: none;
  padding-left: 1.5rem;
}

ul:not(.folders-list):not(.files-list):not(#nav ul) li {
  position: relative;
  margin: 0.5rem 0;
  padding-left: 1rem;
}

ul:not(.folders-list):not(.files-list):not(#nav ul) li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.8rem;
}

/* Paragraph Spacing */
p {
  margin: 0.8rem 0;
  line-height: 1.6;
}

.blurb {
  border-left: 2px solid var(--color-primary);
  padding-left: 1rem;
  margin: 1rem 0;
  opacity: 0.9;
}

/* Background Switcher */
.bg-switcher {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  position: relative;
}

.bg-switcher::before {
  content: '[ BACKGROUND ]';
  position: absolute;
  top: -10px;
  left: 15px;
  background: var(--color-bg);
  padding: 0 8px;
  color: var(--color-accent);
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.bg-switcher button {
  background: rgba(99, 217, 56, 0.1);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  margin: 0.3rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.bg-switcher button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(238, 42, 125, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.bg-switcher button:hover {
  color: var(--color-hover);
  border-color: var(--color-hover);
  background: rgba(238, 42, 125, 0.2);
  text-shadow: 0 0 5px var(--color-hover);
  transform: scale(1.05);
}

.bg-switcher button:hover::before {
  width: 100%;
  height: 100%;
}

.bg-switcher button:active {
  transform: scale(0.98);
}

/* Mascot Image */
.mascot {
  max-height: 100px;
  opacity: 0.5;
  margin-top: 1rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mascot:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

/* Code Blocks */
code {
  background: rgba(99, 217, 56, 0.1);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

pre {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--color-accent);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  box-shadow: 0 0 15px rgba(72, 193, 195, 0.2);
  position: relative;
}

pre::before {
  content: '[ CODE ]';
  position: absolute;
  top: -12px;
  left: 15px;
  background: var(--color-bg);
  padding: 0 8px;
  color: var(--color-accent);
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 1px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text);
  display: block;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--color-primary);
}

th, td {
  border: 1px solid var(--color-accent);
  padding: 0.8rem;
  text-align: left;
}

th {
  background: rgba(99, 217, 56, 0.2);
  color: var(--color-primary);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

tr:hover {
  background: rgba(72, 193, 195, 0.1);
}

/* Horizontal Rule */
hr {
  border: none;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-primary),
    transparent
  );
  margin: 2rem 0;
  box-shadow: 0 0 10px rgba(99, 217, 56, 0.5);
}

/* =========================================
 * FILE BROWSER STYLES
 * Cyberpunk/NeoCities-inspired
 * ========================================= */

/* Current Folder Display */
.current-folder-name {
  color: var(--color-primary);
  font-weight: bold;
  font-size: 1.3rem;
  text-shadow: 0 0 10px var(--color-primary);
  display: inline-block;
  margin-bottom: 1.5rem;
}

.folder-path {
  color: var(--color-accent);
  font-size: 1rem;
  opacity: 0.8;
}

/* Folders List (Left Panel) */
.folders-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.folders-list li {
  position: relative;
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  transition: all 0.2s ease;
}

.folders-list li::before {
  content: '📁 ';
  position: absolute;
  left: 0;
  font-size: 1rem;
  filter: grayscale(100%) brightness(1.2);
  transition: filter 0.2s ease;
}

.folders-list li:hover::before {
  filter: grayscale(0%) brightness(1.5);
  animation: pulse 0.6s ease-in-out;
}

.folder-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: all 0.2s ease;
  position: relative;
}

.folder-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  box-shadow: 0 0 5px var(--color-primary);
  transition: width 0.3s ease;
}

.folder-link:hover {
  color: var(--color-primary);
  background: rgba(99, 217, 56, 0.1);
  border-color: var(--color-primary);
  text-shadow: 0 0 8px var(--color-primary);
  transform: translateX(4px);
}

.folder-link:hover::after {
  width: 100%;
}

/* Special styling for parent directory (..) */
.folders-list li:has(.folder-link[data-dir*=".."]) {
  border-top: 1px dashed var(--color-accent);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.folders-list li:has(.folder-link[data-dir*=".."])::before {
  content: '⬆️ ';
}

/* Files List (Right Panel) */
.files-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  box-shadow:
    0 0 20px rgba(99, 217, 56, 0.3),
    inset 0 0 20px rgba(99, 217, 56, 0.05);
  padding: 1rem;
  position: relative;
}

.files-list::before {
  content: '[ FILES ]';
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--color-bg);
  padding: 0 10px;
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.files-list li {
  position: relative;
  padding: 0.6rem 0.8rem 0.6rem 2.2rem;
  margin: 0.4rem 0;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.files-list li::before {
  content: '▸';
  position: absolute;
  left: 0.8rem;
  color: var(--color-accent);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.files-list li:hover {
  background: rgba(99, 217, 56, 0.15);
  border-left-color: var(--color-primary);
  transform: translateX(4px);
  box-shadow:
    0 0 10px rgba(99, 217, 56, 0.4),
    inset 0 0 10px rgba(99, 217, 56, 0.1);
}

.files-list li:hover::before {
  color: var(--color-primary);
  transform: translateX(3px);
  text-shadow: 0 0 5px var(--color-primary);
}

.file-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 400;
  transition: all 0.2s ease;
  display: block;
}

.file-link:hover {
  color: var(--color-primary);
  text-shadow: 0 0 5px var(--color-primary);
  padding-left: 0.5rem;
}

/* No Files Message */
.no-files-found {
  text-align: center;
  color: var(--color-accent);
  opacity: 0.6;
  font-style: italic;
  padding: 2rem;
  margin-top: 1.5rem;
  border: 2px dashed var(--color-accent);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
}

/* Error Message */
.error-message {
  color: var(--color-hover);
  background: rgba(238, 42, 125, 0.1);
  border: 2px solid var(--color-hover);
  border-radius: 4px;
  padding: 1.5rem;
  margin: 1rem 0;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(238, 42, 125, 0.3);
}

/* Pulse Animation for Folder Icons */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Scanline Effect (Optional - subtle cyberpunk flair) */
.files-list::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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;
  opacity: 0.3;
}

/* =========================================
 * GOTCHA MODAL (Discord Troll)
 * ========================================= */

.gotcha-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: modalFadeIn 0.3s ease;
}

.gotcha-modal.gotcha-hidden {
  display: none;
}

.gotcha-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: var(--color-bg);
  border: 3px solid var(--color-hover);
  border-radius: 8px;
  padding: 2rem;
  box-shadow:
    0 0 30px rgba(238, 42, 125, 0.6),
    inset 0 0 20px rgba(238, 42, 125, 0.1);
  animation: modalPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gotcha-header {
  color: var(--color-hover);
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin: 0 0 1.5rem 0;
  text-shadow: 0 0 15px var(--color-hover);
  font-family: 'Orbitron', monospace;
  letter-spacing: 3px;
  border-bottom: 2px solid var(--color-hover);
  padding-bottom: 0.5rem;
}

.gotcha-text {
  margin: 1.5rem 0;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
}

.gotcha-text p {
  margin: 0.8rem 0;
}

.gotcha-footer {
  text-align: center;
  font-size: 1.5rem;
  color: var(--color-hover);
  font-style: italic;
  margin-top: 1.5rem;
  text-shadow: 0 0 10px var(--color-hover);
}

.gotcha-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(238, 42, 125, 0.2);
  border: 2px solid var(--color-hover);
  color: var(--color-hover);
  font-size: 2rem;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: Arial, sans-serif;
  line-height: 1;
  padding: 0;
  z-index: 10;
}

.gotcha-close:hover {
  background: var(--color-hover);
  color: var(--color-bg);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px var(--color-hover);
}

.gotcha-video {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  border: 2px solid var(--color-primary);
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(99, 217, 56, 0.4);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalPop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Scanline effect on modal for extra cyberpunk */
.gotcha-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(238, 42, 125, 0.03),
    rgba(238, 42, 125, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(50px);
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  html, body {
    padding: 0 1rem;
  }

  .background-cover {
    padding: 0 1rem;
  }

  .main-content {
    flex-direction: column;
    padding: 1rem 0;
  }

  .left-panel, .right-panel {
    width: 100%;
    padding: 1rem 0;
  }

  .gotcha-modal-content {
    padding: 1.5rem;
    max-width: 95%;
  }

  .gotcha-modal-content::before {
    font-size: 0.9rem;
    top: -12px;
  }

  .gotcha-close {
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
}
