/* Dragonheart MUD - 90s Terminal Aesthetic */

:root {
  --bg-color: #0a0a0a;
  --text-color: #00ff00;
  --text-dim: #008800;
  --text-bright: #55ff55;
  --link-color: #00ccff;
  --link-hover: #00ffff;
  --accent: #ffaa00;
  --border-color: #333;
  --terminal-bg: #0d0d0d;
}

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

html {
  font-size: 14px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Courier New', 'Lucida Console', Monaco, monospace;
  line-height: 1.4;
  min-height: 100vh;
}

/* CRT scanline effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  z-index: 1000;
}

/* Terminal window */
.terminal {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: var(--terminal-bg);
  border: 2px solid var(--border-color);
  box-shadow:
    0 0 10px rgba(0, 255, 0, 0.1),
    inset 0 0 50px rgba(0, 0, 0, 0.5);
  min-height: 100vh;
}

/* Terminal title bar */
.terminal-header {
  background: linear-gradient(to right, #444, #222);
  border-bottom: 1px solid var(--border-color);
  padding: 5px 10px;
  margin: -20px -20px 20px -20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-button.red { background: #ff5f56; }
.terminal-button.yellow { background: #ffbd2e; }
.terminal-button.green { background: #27ca40; }

.terminal-title {
  color: #888;
  font-size: 12px;
  margin-left: auto;
  margin-right: auto;
}

/* Navigation */
nav {
  border-bottom: 1px dashed var(--text-dim);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

nav li::before {
  content: "[";
  color: var(--text-dim);
}

nav li::after {
  content: "]";
  color: var(--text-dim);
}

nav a {
  color: var(--link-color);
  text-decoration: none;
  padding: 2px 5px;
}

nav a:hover {
  color: var(--link-hover);
  text-shadow: 0 0 5px var(--link-hover);
}

nav a.active {
  color: var(--accent);
  text-shadow: 0 0 5px var(--accent);
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ASCII Art */
.ascii-art {
  color: var(--text-bright);
  white-space: pre;
  font-size: 10px;
  line-height: 1.1;
  overflow-x: auto;
  margin: 20px 0;
}

.ascii-art .dragon-green { color: #00ff00; }
.ascii-art .dragon-bright { color: #55ff55; }
.ascii-art .dragon-grey { color: #888888; }
.ascii-art .dragon-red { color: #ff4444; }

/* Headings */
h1, h2, h3 {
  color: var(--accent);
  border-bottom: 1px solid var(--text-dim);
  padding-bottom: 5px;
  margin-bottom: 15px;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }

/* Content sections */
.content {
  margin: 20px 0;
}

p {
  margin-bottom: 1em;
}

/* Lists */
ul, ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
  padding-left: 0.5em;
}

li {
  margin-bottom: 0.3em;
}

/* Help file list */
.help-list {
  columns: 3;
  column-gap: 20px;
  list-style: none;
}

.help-list li {
  break-inside: avoid;
  padding: 2px 0;
}

.help-list a::before {
  content: "> ";
  color: var(--text-dim);
}

/* Help content */
.help-content {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 15px;
  white-space: pre-wrap;
  overflow-x: auto;
  margin-bottom: 1em;
}

/* Fight logs */
.log-entry {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  padding: 15px;
}

.log-header {
  border-bottom: 1px dashed var(--text-dim);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.log-meta {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.log-content {
  white-space: pre-wrap;
  font-size: 0.9rem;
}

/* Damage colors */
.damage-high { color: #ff4444; }
.damage-medium { color: #ffaa00; }
.damage-low { color: #ffff00; }
.heal { color: #44ff44; }
.spell { color: #aa88ff; }

/* Form elements */
input, textarea, select {
  background: var(--bg-color);
  border: 1px solid var(--text-dim);
  color: var(--text-color);
  font-family: inherit;
  font-size: inherit;
  padding: 5px 10px;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--link-color);
  box-shadow: 0 0 5px var(--link-color);
}

button {
  background: var(--text-dim);
  border: 1px solid var(--text-color);
  color: var(--bg-color);
  font-family: inherit;
  font-size: inherit;
  padding: 5px 15px;
  cursor: pointer;
}

button:hover {
  background: var(--text-color);
  box-shadow: 0 0 10px var(--text-color);
}

/* Contact info */
.contact-info {
  font-size: 1.1rem;
}

.contact-info dt {
  color: var(--accent);
  margin-top: 15px;
}

.contact-info dd {
  margin-left: 20px;
}

/* Footer */
footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px dashed var(--text-dim);
  color: var(--text-dim);
  text-align: center;
  font-size: 0.85rem;
}

/* Blinking cursor */
.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--text-color);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Prompt */
.prompt::before {
  content: "> ";
  color: var(--accent);
}

/* Responsive */
@media (max-width: 600px) {
  .ascii-art {
    font-size: 6px;
  }

  .help-list {
    columns: 1;
  }

  nav ul {
    flex-direction: column;
  }
}

/* Glow effect for important text */
.glow {
  text-shadow: 0 0 10px currentColor;
}

/* Category headers in help */
.category-header {
  color: var(--accent);
  margin-top: 20px;
  margin-bottom: 10px;
  padding: 5px;
  background: rgba(255, 170, 0, 0.1);
}

/* Table styling for 90s look */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 15px 0;
}

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

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

tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.3);
}

/* Under construction gif placeholder */
.under-construction {
  text-align: center;
  padding: 20px;
  color: var(--accent);
  animation: flash 1s infinite;
}

@keyframes flash {
  50% { opacity: 0.5; }
}

/* Visitor counter style */
.visitor-counter {
  font-family: 'Courier New', monospace;
  background: #000;
  border: 2px inset #444;
  padding: 5px 10px;
  display: inline-block;
}
