/* Secret Orb - Retro Terminal Stylesheet */
/* CRT Monitor aesthetic with green phosphor display */

:root {
  /* Color palette - Green phosphor CRT */
  --bg-primary: #0a0e0a;
  --bg-secondary: #0d120d;
  --text-primary: #33dd33;
  --text-secondary: #00bb00;
  --text-dim: #008800;
  --accent: #00ee00;
  --highlight: #ffff00;
  --error: #ff3333;

  /* Amber alternative (uncomment to switch) */
  /*
  --text-primary: #ffb000;
  --text-secondary: #ff8800;
  --text-dim: #cc6600;
  --accent: #ffcc00;
  */

  /* Fonts */
  --font-mono: 'VT323', 'Courier Prime', 'Courier New', monospace;
  --font-size: 18px;
  --line-height: 1.6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-mono);
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  text-shadow: 0 0 2px rgba(51, 221, 51, 0.5);
}

/* CRT Effect Overlay */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  background: linear-gradient(
    to bottom,
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  animation: flicker 0.15s infinite;
}

/* Scanlines */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
}

@keyframes flicker {
  0% { opacity: 0.97; }
  50% { opacity: 1; }
  100% { opacity: 0.98; }
}

/* Terminal Container */
.terminal-container {
  max-width: 900px;
  margin: 40px auto;
  background: var(--bg-secondary);
  border: 2px solid var(--text-dim);
  border-radius: 8px;
  box-shadow:
    0 0 20px rgba(0, 255, 0, 0.3),
    0 0 40px rgba(0, 255, 0, 0.1),
    inset 0 0 100px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

/* Terminal Header */
.terminal-header {
  background: var(--text-dim);
  color: var(--bg-primary);
  padding: 8px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--text-primary);
  font-weight: bold;
  text-shadow: none;
}

.terminal-title {
  letter-spacing: 2px;
}

.terminal-controls {
  display: flex;
  gap: 10px;
  font-size: 20px;
  user-select: none;
}

.terminal-controls span {
  cursor: pointer;
  padding: 0 5px;
}

.terminal-controls span:hover {
  color: var(--accent);
}

/* Terminal Content */
.terminal-content {
  padding: 30px;
  min-height: 400px;
}

/* Boot Sequence */
.boot-sequence {
  font-size: 16px;
  color: var(--text-secondary);
  animation: boot-fade 1.5s ease-out;
}

.boot-sequence::before {
  content: "LOADING SECRET_ORB.EXE...\A\AINITIALIZING GAME ENGINE...\A\AOK\A\A";
  white-space: pre;
  display: block;
  margin-bottom: 10px;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
}

@keyframes boot-fade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Main Content */
#main-content {
  display: none;
  animation: content-fade 0.5s ease-in;
}

@keyframes content-fade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--accent);
  margin: 1.5em 0 0.75em 0;
  line-height: 1.3;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}

h1 {
  font-size: 2em;
  border-bottom: 2px solid var(--text-dim);
  padding-bottom: 0.3em;
  margin-top: 0;
}

h2 {
  font-size: 1.6em;
  color: var(--text-primary);
}

h3 {
  font-size: 1.3em;
  color: var(--text-secondary);
}

p {
  margin: 1em 0;
}

a {
  color: var(--highlight);
  text-decoration: none;
  border-bottom: 1px dotted var(--highlight);
  transition: all 0.2s;
}

a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 3px var(--accent);
}

/* Code blocks */
pre {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--text-dim);
  border-left: 3px solid var(--accent);
  padding: 15px;
  margin: 1.5em 0;
  overflow-x: auto;
  border-radius: 4px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent);
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

/* Lists */
ul, ol {
  margin: 1em 0;
  padding-left: 2em;
}

li {
  margin: 0.5em 0;
}

li::marker {
  color: var(--text-dim);
}

/* Horizontal rules */
hr {
  border: none;
  border-top: 1px solid var(--text-dim);
  margin: 2em 0;
  box-shadow: 0 0 5px var(--text-dim);
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--text-dim);
  padding-left: 20px;
  margin: 1.5em 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

th, td {
  border: 1px solid var(--text-dim);
  padding: 10px;
  text-align: left;
}

th {
  background: rgba(0, 255, 0, 0.1);
  color: var(--accent);
  font-weight: bold;
}

tr:hover {
  background: rgba(0, 255, 0, 0.05);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border: 2px solid var(--text-dim);
  margin: 1em 0;
  filter: contrast(1.1) brightness(0.9);
}

/* Terminal Footer */
.terminal-footer {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid var(--text-dim);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-dim);
  text-shadow: none;
}

.footer-right {
  animation: blink 1.5s step-end infinite;
}

/* ASCII Art */
pre:has(code:only-child) {
  font-size: 14px;
  line-height: 1.2;
  color: var(--accent);
  /* text-align: left by default - only center specific ASCII art blocks */
}

/* Emoji styling */
.terminal-content {
  /* Remove emoji text-shadow for better visibility */
}

.terminal-content h2::before,
.terminal-content h3::before {
  margin-right: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --font-size: 16px;
  }

  .terminal-container {
    margin: 20px;
    border-radius: 4px;
  }

  .terminal-content {
    padding: 20px;
  }

  h1 {
    font-size: 1.5em;
  }

  h2 {
    font-size: 1.3em;
  }

  .status-bar {
    flex-direction: column;
    text-align: center;
    gap: 5px;
  }

  pre {
    font-size: 12px;
    padding: 10px;
  }
}

/* Print styles */
@media print {
  .crt-overlay,
  .scanlines,
  .terminal-header,
  .terminal-footer {
    display: none;
  }

  body {
    background: white;
    color: black;
    text-shadow: none;
  }

  .terminal-container {
    border: none;
    box-shadow: none;
  }
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg-primary);
  text-shadow: none;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-dim);
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
