/* 90s Pixel Art Hacker Theme for Hackercats */

/* Local Font Declarations */
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/PressStart2P-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/VT323-Regular.ttf') format('truetype');
}

:root {
  /* Golden Hacker Color Palette - Based on Logo */
  --primary-gold: #d4a574;
  --terminal-gold: #b8956a;
  --dark-gold: #8b6f47;
  --bg-dark: #2d1f1a;
  --bg-darker: #1a0f0a;
  --neon-amber: #f4c842;
  --accent-orange: #e68a00;
  --retro-yellow: #ffd700;
  --warning-red: #cc4400;
  --text-light: #d4a574;
  --text-lighter: #f0d0a0;
  --border-color: #5a4a3a;
  --scanline-color: rgba(212, 165, 116, 0.03);
}

/* Global Styles */
* {
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: 'VT323', monospace;
  font-size: 18px;
  line-height: 1.6; /* Improved line height for readability */
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      var(--scanline-color) 2px,
      var(--scanline-color) 4px
    );
}

/* Accessibility Improvements */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-green: #00ff00;
    --text-light: #ffffff;
    --bg-dark: #000000;
    --bg-darker: #000000;
    --neon-cyan: #ffffff;
  }
  
  .card, .box, .table {
    border-width: 3px;
  }
}

/* Focus styles for keyboard navigation */
*:focus {
  outline: 3px solid var(--neon-amber);
  outline-offset: 2px;
}

.button:focus,
.navbar-item:focus,
a:focus {
  outline: 3px solid var(--retro-yellow);
  outline-offset: 2px;
  box-shadow: 0 0 10px var(--retro-yellow);
}

/* Skip to content link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-gold);
  color: var(--bg-darker);
  padding: 8px;
  text-decoration: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  z-index: 1000;
  border: 2px solid var(--bg-darker);
}

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

/* Ensure sufficient color contrast */
.has-low-contrast {
  background: var(--bg-darker);
  color: var(--text-light);
  border: 1px solid var(--primary-gold);
}

/* Terminal Window Effect */
.terminal-window {
  background: var(--bg-darker);
  border: 3px solid var(--primary-gold);
  border-radius: 0;
  box-shadow: 
    0 0 10px var(--primary-gold),
    inset 0 0 20px rgba(212, 165, 116, 0.1);
  position: relative;
  margin-top: 20px;
  margin-bottom: 2rem;
  padding: 1rem;
}

.terminal-window::before {
  content: "● ● ●";
  position: absolute;
  top: -15px;
  left: 10px;
  color: var(--primary-gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  background: var(--bg-darker);
  padding: 2px 8px;
  border: 1px solid var(--primary-gold);
}

/* Navigation */
.navbar {
  background: var(--bg-darker) !important;
  border-bottom: 2px solid var(--primary-gold);
  box-shadow: 0 2px 10px rgba(212, 165, 116, 0.3);
  min-height: 60px;
  font-family: 'Press Start 2P', monospace;
  position: relative;
}

.navbar-brand .navbar-item {
  font-size: 16px;
  color: var(--primary-gold) !important;
  text-shadow: 0 0 5px var(--primary-gold);
  animation: glow 2s ease-in-out infinite alternate;
}

/* Only animate glow for users who haven't requested reduced motion */
@media (prefers-reduced-motion: reduce) {
  .navbar-brand .navbar-item {
    animation: none;
    text-shadow: 0 0 5px var(--primary-gold);
  }
}

@keyframes glow {
  from { text-shadow: 0 0 3px var(--primary-gold); }
  to { text-shadow: 0 0 8px var(--primary-gold); }
}

.navbar-item {
  color: var(--text-light) !important;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  text-transform: uppercase;
  border: 1px solid transparent;
  margin: 5px;
  padding: 10px 15px !important;
  transition: all 0.3s;
  min-height: 44px; /* Accessibility: minimum touch target */
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-item:hover,
.navbar-item:focus,
.navbar-item.is-active {
  background: var(--primary-gold) !important;
  color: var(--bg-darker) !important;
  border: 1px solid var(--primary-gold);
  box-shadow: 0 0 15px var(--primary-gold);
}

/* Mobile Navigation */
.navbar-burger {
  color: var(--primary-gold);
  height: 44px; /* Accessibility: minimum touch target */
  width: 44px;
  border: 2px solid var(--primary-gold);
  background: var(--bg-darker);
  border-radius: 0;
  cursor: pointer;
}

.navbar-burger:hover,
.navbar-burger:focus {
  background: var(--primary-gold);
  color: var(--bg-darker);
  box-shadow: 0 0 15px var(--primary-gold);
}

.navbar-burger span {
  height: 2px;
  width: 18px;
  background: currentColor;
}

.navbar-burger.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.navbar-burger.is-active span:nth-child(2) {
  opacity: 0;
}

.navbar-burger.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu styling */
@media (max-width: 1023px) {
  .navbar-menu {
    background: var(--bg-darker);
    border-top: 1px solid var(--primary-gold);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }
  
  .navbar-menu.is-active {
    display: block;
  }
  
  .navbar-item {
    font-size: 12px;
    padding: 15px 20px !important;
    margin: 2px 10px;
    border-bottom: 1px solid var(--border-color);
  }
  
  .navbar-item:last-child {
    border-bottom: none;
  }
}

/* Hero Section */
.hero {
  background: linear-gradient(45deg, var(--bg-darker), var(--bg-dark));
  border: 3px solid var(--neon-amber);
  position: relative;
  overflow: hidden;
}

/* Only show scanning animation if user hasn't requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.1), transparent);
    animation: scan 3s linear infinite;
  }
}

@keyframes scan {
  0% { left: -100%; }
  100% { left: 100%; }
}

.hero .title {
  font-family: 'Press Start 2P', monospace;
  color: #ffffff;
  text-shadow: 
    0 0 5px var(--neon-amber),
    0 0 10px var(--neon-amber),
    0 0 15px var(--neon-amber),
    4px 4px 0px var(--bg-darker),
    -1px -1px 0px var(--bg-darker),
    1px -1px 0px var(--bg-darker),
    -1px 1px 0px var(--bg-darker);
  font-size: 3rem !important;
  line-height: 1.2;
}

.hero .subtitle {
  font-family: 'VT323', monospace;
  color: var(--text-light);
  font-size: 1.5rem !important;
}

/* Buttons */
.button {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px !important;
  text-transform: uppercase;
  background: var(--primary-gold);
  color: var(--bg-darker);
  border: 2px solid var(--primary-gold);
  border-radius: 0;
  padding: 15px 25px;
  box-shadow: 0 0 5px rgba(212, 165, 116, 0.3);
  transition: all 0.3s;
  cursor: pointer;
  min-height: 44px; /* Minimum touch target size for accessibility */
  min-width: 44px;
}

.button:hover,
.button:focus {
  background: var(--retro-yellow);
  color: var(--bg-darker);
  border-color: var(--retro-yellow);
  box-shadow: 0 0 15px var(--retro-yellow);
  transform: translateY(-2px);
}

/* Remove transform for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .button:hover,
  .button:focus {
    transform: none;
  }
}

.button.is-light {
  background: var(--text-light);
  color: var(--bg-darker);
  border-color: var(--text-light);
}

.button.is-light:hover {
  background: var(--retro-yellow);
  border-color: var(--retro-yellow);
  box-shadow: 0 0 20px var(--retro-yellow);
}

.button.is-primary {
  background: var(--primary-gold) !important;
  color: var(--bg-darker) !important;
  border: 2px solid var(--primary-gold) !important;
  box-shadow: 0 0 5px rgba(212, 165, 116, 0.3) !important;
}

.button.is-primary:hover,
.button.is-primary:focus {
  background: var(--retro-yellow) !important;
  color: var(--bg-darker) !important;
  border-color: var(--retro-yellow) !important;
  box-shadow: 0 0 15px var(--retro-yellow) !important;
}

/* Cards */
.card {
  background: var(--bg-darker);
  border: 2px solid var(--terminal-gold);
  border-radius: 0;
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(212, 165, 116, 0.1);
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--neon-amber);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.7),
    0 0 25px rgba(244, 200, 66, 0.3);
  transform: translateY(-5px);
}

.card-content {
  background: var(--bg-darker);
  color: var(--text-light);
  padding: 20px;
}

/* Boxes (Stats) */
.box {
  background: var(--bg-darker);
  border: 1px solid var(--primary-gold);
  border-radius: 0;
  box-shadow: 
    inset 0 0 10px rgba(212, 165, 116, 0.1),
    0 0 5px rgba(212, 165, 116, 0.3);
  color: var(--text-light);
}

/* Tables */
.table {
  background: var(--bg-darker);
  color: var(--text-light);
  border: 2px solid var(--primary-gold);
  border-radius: 0;
  font-family: 'VT323', monospace;
  font-size: 16px;
}

.table thead th {
  background: var(--primary-gold);
  color: var(--bg-darker);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  text-transform: uppercase;
  border: none;
  padding: 15px 10px;
}

.table tbody tr {
  border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
  background: rgba(212, 165, 116, 0.15) !important;
}

/* Override Bulma's striped table with golden theme */
.table.is-striped tbody tr:nth-child(even) {
  background-color: rgba(212, 165, 116, 0.05) !important;
}

.table.is-striped tbody tr:nth-child(even):hover {
  background-color: rgba(212, 165, 116, 0.15) !important;
}

.table tbody td {
  border: none;
  padding: 10px;
}

/* Tags */
.tag {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  border-radius: 0;
  text-transform: uppercase;
}

.tag.is-primary {
  background: var(--primary-gold);
  color: var(--bg-darker);
}

.tag.is-light {
  background: var(--text-light);
  color: var(--bg-darker);
}

.tag.is-warning {
  background: var(--retro-yellow);
  color: var(--bg-darker);
}

/* Progress Bars */
.progress {
  height: 20px;
  border-radius: 0;
  background: var(--bg-darker);
  border: 1px solid var(--primary-gold);
}

.progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--primary-gold), var(--neon-amber));
  border-radius: 0;
}

.progress::-webkit-progress-bar {
  background: var(--bg-darker);
  border-radius: 0;
}

/* Typography */
.title {
  font-family: 'Press Start 2P', monospace;
  color: #ffffff;
  text-shadow: 
    0 0 5px var(--neon-amber),
    0 0 10px var(--neon-amber),
    0 0 15px var(--neon-amber),
    2px 2px 0px var(--bg-darker);
  line-height: 1.4;
}

.title.is-2 { 
  font-size: 24px;
  color: #ffffff;
  text-shadow: 
    0 0 8px var(--neon-amber),
    0 0 16px var(--neon-amber),
    0 0 24px var(--neon-amber),
    3px 3px 0px var(--bg-darker);
}
.title.is-3 { 
  font-size: 18px;
  color: #ffffff;
  text-shadow: 
    0 0 6px var(--neon-amber),
    0 0 12px var(--neon-amber),
    2px 2px 0px var(--bg-darker);
}
.title.is-4 { 
  font-size: 14px;
  color: #ffffff;
  text-shadow: 
    0 0 4px var(--neon-amber),
    0 0 8px var(--neon-amber),
    1px 1px 0px var(--bg-darker);
}
.title.is-5 { 
  font-size: 12px;
  color: #ffffff;
  text-shadow: 
    0 0 3px var(--neon-amber),
    0 0 6px var(--neon-amber),
    1px 1px 0px var(--bg-darker);
}

.subtitle {
  font-family: 'VT323', monospace;
  color: var(--text-light);
}

.content {
  font-family: 'VT323', monospace;
  font-size: 18px;
  color: var(--text-light);
  line-height: 1.6;
}

.content p {
  margin-bottom: 1rem;
}

.content strong {
  color: var(--primary-gold);
  font-weight: normal;
}

.content a {
  color: var(--neon-amber);
  text-decoration: underline;
}

.content a:hover {
  color: var(--neon-pink);
  text-shadow: 0 0 10px var(--neon-pink);
}

/* Lists */
.content ul,
ul.content {
  margin-left: 20px;
  list-style: none; /* Remove default bullets */
}

.content li,
ul.content li {
  position: relative;
  margin-bottom: 5px;
  list-style: none; /* Ensure no bullets */
}

.content li::before,
ul.content li::before {
  content: ">";
  color: var(--primary-gold);
  font-weight: bold;
  position: absolute;
  left: -20px;
}

/* Ensure nested lists also use arrows */
.content ul ul li::before,
ul.content ul li::before {
  content: ">>";
  color: var(--terminal-gold);
}

/* Force no bullets everywhere */
ul.no-bullets,
ul.content.no-bullets {
  list-style-type: none !important;
  padding-left: 0;
  margin-left: 20px;
}

ul.no-bullets li,
ul.content.no-bullets li {
  list-style: none !important;
}

/* Footer */
.footer {
  background: var(--bg-darker);
  border-top: 2px solid var(--primary-gold);
  color: var(--text-light);
  font-family: 'VT323', monospace;
}

/* Responsive Design & Optimal Reading */

/* Base typography scaling */
html {
  font-size: 16px; /* Base size */
}

/* Container optimizations for different screen sizes */
.container.is-fluid {
  padding: 0 1rem;
}

/* Optimal reading width - never too wide, never too narrow */
.reading-optimized {
  max-width: 75ch; /* Optimal reading width in characters */
  margin: 0 auto;
}

/* Content containers for different screen sizes */
.content-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Wide screen optimizations (1200px+) */
@media (min-width: 1200px) {
  html { font-size: 18px; }
  
  .content-container {
    padding: 0 2rem;
  }
  
  .columns.is-desktop-optimized .column {
    max-width: 45ch; /* Optimal reading width for side-by-side content */
  }
  
  .hero .title {
    font-size: 4rem !important;
  }
  
  .hero .subtitle {
    font-size: 2rem !important;
    max-width: 60ch;
    margin: 0 auto;
  }
  
  .card {
    min-height: 200px;
  }
}

/* Tablet optimizations (769px - 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  html { font-size: 17px; }
  
  .hero .title {
    font-size: 3.5rem !important;
  }
  
  .columns.is-tablet .column {
    max-width: none;
  }
}

/* Mobile optimizations (up to 768px) */
@media (max-width: 768px) {
  html { font-size: 16px; }
  
  .container.is-fluid {
    padding: 0 0.5rem;
  }
  
  .hero .title {
    font-size: 2rem !important;
    line-height: 1.3;
  }
  
  .hero .subtitle {
    font-size: 1.2rem !important;
    line-height: 1.4;
  }
  
  .button {
    min-width: 48px !important; /* Larger touch targets on mobile */
    min-height: 48px !important;
    padding: 12px 20px !important;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .box {
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  .title.is-2 { font-size: 20px; }
  .title.is-3 { font-size: 16px; }
  .title.is-4 { font-size: 12px; }
  .title.is-5 { font-size: 10px; }
  
  /* Stack columns on mobile */
  .columns {
    display: block;
  }
  
  .column {
    width: 100% !important;
    margin-bottom: 1rem;
  }
  
  /* Reduce border clutter on mobile */
  .box {
    border-width: 1px !important; /* Reduce from 2px */
  }
  
  .card {
    border-width: 1px !important; /* Reduce from 2px */
  }
  
  .button {
    border-width: 1px !important; /* Reduce from 2px */
  }
  
  .table {
    border-width: 1px !important;
  }
  
  .table td, .table th {
    border-width: 1px !important;
    padding: 0.5rem !important; /* Reduce padding too */
  }
  
  /* Remove decorative borders from content elements */
  .content h1, .content h2, .content h3 {
    border-width: 1px !important; /* Reduce header borders */
  }
  
  .notification {
    border-width: 1px !important;
  }
}

/* Small mobile optimizations (up to 480px) */
@media (max-width: 480px) {
  html { font-size: 15px; }
  
  .container.is-fluid {
    padding: 0 0.25rem;
  }
  
  .hero {
    padding: 1rem 0;
  }
  
  .hero .title {
    font-size: 1.5rem !important;
  }
  
  .hero .subtitle {
    font-size: 1rem !important;
  }
  
  .section {
    padding: 1.5rem 0;
  }
  
  .button {
    font-size: 8px !important;
    padding: 10px 15px !important;
    border-width: 1px !important; /* Even thinner on small screens */
  }
  
  /* Minimal borders for very small screens */
  .box, .card, .notification {
    border-width: 1px !important;
    padding: 0.75rem !important; /* Reduce padding further */
  }
  
  /* Simplify table styling */
  .table td, .table th {
    padding: 0.25rem !important;
    border-bottom-width: 1px !important;
  }
}

/* Special Effects - Override Bulma colors with golden theme */
.has-text-success {
  color: var(--primary-gold) !important;
}

.has-text-warning {
  color: var(--neon-amber) !important;
}

.has-text-info {
  color: var(--primary-gold) !important;
}

.has-text-danger {
  color: var(--warning-red) !important;
}

.has-text-primary {
  color: var(--primary-gold) !important;
}

/* Override tag colors to match golden theme */
.tag.is-primary {
  background-color: var(--primary-gold) !important;
  color: var(--bg-darker) !important;
}

.tag.is-warning {
  background-color: var(--neon-amber) !important;
  color: var(--bg-darker) !important;
}

.tag.is-success {
  background-color: var(--terminal-gold) !important;
  color: var(--bg-darker) !important;
}

.tag.is-info {
  background-color: var(--primary-gold) !important;
  color: var(--bg-darker) !important;
}

/* ASCII Art Borders */
.ascii-border {
  border: none;
  position: relative;
  padding: 20px;
}

.ascii-border::before {
  content: "╔══════════════════════════════════════╗";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--primary-gold);
  font-family: monospace;
}

.ascii-border::after {
  content: "╚══════════════════════════════════════╝";
  position: absolute;
  bottom: 0;
  left: 0;
  color: var(--primary-gold);
  font-family: monospace;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
  border: 1px solid var(--primary-gold);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border: 1px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neon-amber);
}

/* Equal height cards for index page */
.equal-height-cards {
  align-items: stretch;
}

.equal-height-cards .column {
  display: flex;
}

.equal-height-cards .card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.equal-height-cards .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.equal-height-cards .card-content p {
  flex-grow: 1;
  margin-bottom: 1rem;
}

.equal-height-cards .button {
  margin-top: auto;
}

/* Terminal search and visual mode styles */
.terminal-output-search-prompt {
  color: var(--neon-amber);
  font-weight: bold;
}

.search-highlight {
  background-color: var(--primary-gold) !important;
  color: var(--bg-darker) !important;
  font-weight: bold;
  animation: search-pulse 1s ease-in-out;
}

@keyframes search-pulse {
  0% { background-color: var(--neon-amber); }
  50% { background-color: var(--primary-gold); }
  100% { background-color: var(--primary-gold); }
}


/* Equal height stats boxes */
.equal-height-stats {
  align-items: stretch;
}

.equal-height-stats .column {
  display: flex;
}

.equal-height-stats .box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px; /* Ensure consistent minimum height */
}

/* Member cards - clean redesign */
.member-grid {
  align-items: stretch;
}

.member-grid .column {
  display: flex;
}

.member-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.member-content {
  padding: 1rem !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.member-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.member-rank {
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-lighter);
  margin-bottom: 0.25rem;
}

.member-details {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.2;
}

.member-stats {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  line-height: 1.3;
}

.stat-label {
  color: var(--text-light);
}

.stat-value {
  font-weight: 600;
  color: var(--neon-amber);
}

.member-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: auto;
}

.specialty-tag {
  background-color: var(--neon-amber);
  color: var(--bg-darker);
  font-size: 0.65rem;
  padding: 0.25em 0.4em;
  border-radius: 0;
  font-weight: 500;
  border: 1px solid var(--primary-gold);
}

/* Mobile Terminal Button */
.mobile-terminal-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-gold);
  border: 2px solid var(--neon-amber);
  color: var(--bg-darker);
  font-size: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(212, 165, 116, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 9998;
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
}

.mobile-terminal-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(244, 200, 66, 0.5);
  background: var(--neon-amber);
}

.mobile-terminal-button:active {
  transform: translateY(0);
}

/* Show button only on mobile */
@media (max-width: 768px) {
  .mobile-terminal-button {
    display: flex;
  }
}

/* Hide button when terminal is active */
.terminal-overlay.active ~ .mobile-terminal-button {
  display: none;
}

/* Terminal Command Line Interface */
.terminal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 15, 10, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.terminal-overlay.active {
  display: flex;
}

.terminal-content {
  background: var(--bg-darker);
  border: 3px solid var(--primary-gold);
  border-radius: 0;
  box-shadow: 
    0 0 20px var(--primary-gold),
    inset 0 0 20px rgba(212, 165, 116, 0.1);
  width: 90vw;
  max-width: 1000px;
  height: 75vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.terminal-header {
  background: var(--bg-dark);
  border-bottom: 2px solid var(--primary-gold);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terminal-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--primary-gold);
}

.terminal-close {
  background: none;
  border: 1px solid var(--primary-gold);
  color: var(--primary-gold);
  font-size: 16px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal-close:hover {
  background: var(--primary-gold);
  color: var(--bg-darker);
}

.terminal-body {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  font-family: 'VT323', monospace;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 1rem;
  padding: 0.5rem;
}

.terminal-output-line {
  margin-bottom: 0.1rem;
}

.terminal-output-command {
  color: var(--neon-amber);
}

.terminal-output-error {
  color: var(--warning-red);
}

.terminal-output-header {
  color: var(--neon-amber);
  font-weight: bold;
  text-align: center;
  font-size: 18px;
  background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.1), transparent);
  padding: 0.25rem;
  margin: 0.25rem 0;
}

.terminal-output-section {
  color: var(--primary-gold);
  font-weight: bold;
  text-transform: uppercase;
  background: rgba(139, 111, 71, 0.2);
  padding: 0.1rem 0.5rem;
  margin: 0.15rem 0;
  border-left: 3px solid var(--primary-gold);
}

.terminal-output-command-item {
  color: var(--text-lighter);
  background: rgba(212, 165, 116, 0.05);
  padding: 0.1rem 1rem;
  margin: 0.1rem 0;
}

.terminal-output-current-page {
  color: var(--neon-amber);
  background: rgba(244, 200, 66, 0.15);
  padding: 0.1rem 1rem;
  margin: 0.1rem 0;
  font-weight: bold;
}

.terminal-output-hint {
  color: var(--terminal-gold);
  font-style: italic;
  opacity: 0.8;
  padding-left: 1rem;
}

.terminal-output-vim-indicator {
  color: var(--neon-amber);
  font-weight: bold;
  text-align: center;
  background: rgba(244, 200, 66, 0.2);
  padding: 0.25rem;
  margin: 0.5rem 0;
  border: 1px solid var(--neon-amber);
}

.terminal-output-vim-help {
  color: var(--terminal-gold);
  font-style: italic;
  text-align: center;
  opacity: 0.9;
  padding: 0.25rem;
}

/* Vim mode styling */
.terminal-overlay.vim-mode .terminal-input {
  opacity: 0.5;
  pointer-events: none;
}

.terminal-overlay.vim-mode .terminal-prompt {
  color: var(--neon-amber);
  font-weight: bold;
}

.terminal-output-matrix {
  color: #00ff00;
  font-family: 'VT323', monospace;
  letter-spacing: 2px;
  opacity: 0.8;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  font-family: 'VT323', monospace;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.terminal-prompt {
  color: var(--primary-gold);
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-lighter);
  font-family: 'VT323', monospace;
  font-size: 16px;
  letter-spacing: 0.5px;
  caret-color: var(--neon-amber);
}

.terminal-input::placeholder {
  color: var(--text-light);
  opacity: 0.6;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .terminal-content {
    width: 98vw;
    height: 85vh;
    max-height: none;
    border-width: 2px;
  }
  
  .terminal-header {
    padding: 0.25rem 0.5rem;
  }
  
  .terminal-title {
    font-size: 8px;
  }
  
  .terminal-close {
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 22px;
  }
  
  .terminal-body {
    padding: 0.5rem;
  }
  
  .terminal-output {
    font-size: 14px;
    line-height: 1.1;
    padding: 0.25rem;
    margin-bottom: 0.5rem;
  }
  
  .terminal-output-line {
    margin-bottom: 0.05rem;
  }
  
  .terminal-output-section {
    font-size: 12px;
    padding: 0.05rem 0.25rem;
    margin: 0.1rem 0;
  }
  
  .terminal-output-header {
    font-size: 14px;
    padding: 0.15rem;
    margin: 0.15rem 0;
  }
  
  .terminal-input-line {
    font-size: 14px;
    letter-spacing: 0.25px;
  }
  
  .terminal-input {
    font-size: 14px;
    letter-spacing: 0.25px;
  }
  
  .terminal-prompt {
    margin-right: 0.25rem;
  }
  
  /* Mobile touch improvements */
  .terminal-input {
    /* Prevent zoom on focus for iOS */
    font-size: 16px !important;
  }
  
  .terminal-overlay {
    /* Prevent scrolling behind terminal on mobile */
    position: fixed;
    touch-action: none;
  }
  
  .terminal-content {
    /* Better mobile viewport handling */
    position: relative;
  }
  
  /* Hide complex vim/emacs indicators on mobile */
  .terminal-output-vim-indicator,
  .terminal-output-vim-help {
    display: none;
  }
}