/* ═══════════════════════════════════════════════════════════════════════════════
   SIMPLE ENEMY FORGE - Documentation Theme
   Black & Crimson
   ═══════════════════════════════════════════════════════════════════════════════ */

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px;
  background: #121212;
}

/* ─── NAVBAR ─── */

.navbar {
  background: #1a1a1a;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #2a2a2a;
}

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.navbar a {
  color: #b0b0b0;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
  font-size: 14px;
}

.navbar a:hover {
  background: #2a2a2a;
  color: #C43A31;
}

.navbar a.active {
  background: #C43A31;
  color: #121212;
  font-weight: 600;
}

/* ─── HEADER / HERO ─── */

/* Cover image disabled - using hero text instead
.header {
  background: url('SimpleEnemyForgeCover.png') center/cover no-repeat;
  color: #C43A31;
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 30px;
  height: 150px;
  border: 1px solid #3a2020;
}
*/

.hero {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 30px;
}

.hero h1 {
  color: #C43A31;
  font-size: 2.5em;
  border: none;
  margin: 0;
  padding: 0;
}

.hero .tagline {
  color: #a0a0a0;
  font-size: 1.2em;
  margin-top: 10px;
}

/* ─── SECTIONS ─── */

.section {
  background: #1a1a1a;
  margin: 20px 0;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
}

h1, h2 {
  color: #C43A31;
  border-bottom: 3px solid #C43A31;
  padding-bottom: 10px;
  margin-top: 0;
}

h3 {
  color: #e05a4f;
  margin-top: 25px;
}

h4 {
  color: #C43A31;
  margin-top: 0;
}

a {
  color: #C43A31;
}

a:hover {
  color: #e05a4f;
}

code {
  background: #2a2a2a;
  color: #e05a4f;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
}

/* ─── FEATURE GRID ─── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.feature-card {
  background: #222222;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #C43A31;
}

.feature-card p {
  color: #b0b0b0;
}

/* ─── STEPS ─── */

.step-container {
  background: #222222;
  padding: 20px;
  border-radius: 8px;
  margin: 15px 0;
  border-left: 3px solid #3a2020;
}

.step-number {
  background: #C43A31;
  color: #121212;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 15px;
}

/* ─── CODE BLOCKS ─── */

.code-block {
  background: #0d0d0d;
  color: #d4d4d4;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  overflow-x: auto;
  margin: 15px 0;
  border-left: 4px solid #C43A31;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.file-tree {
  background: #0d0d0d;
  color: #c9d1d9;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.4;
  overflow-x: auto;
  margin: 15px 0;
  border-left: 4px solid #C43A31;
  border: 1px solid #2a2a2a;
  white-space: pre;
}

.file-tree .folder {
  color: #C43A31;
  font-weight: bold;
}

.file-tree .cs-file {
  color: #9cdcfe;
}

/* ─── ALERTS ─── */

.warning {
  background: #2a1818;
  border: 1px solid #C43A31;
  color: #e05a4f;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
}

.success {
  background: #1a2a1a;
  border: 1px solid #4caf50;
  color: #81c784;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
}

.info {
  background: #1a1a2a;
  border: 1px solid #5c6bc0;
  color: #9fa8da;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
}

/* ─── BREADCRUMB ─── */

.breadcrumb {
  background: #1a1a1a;
  padding: 10px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #2a2a2a;
}

.breadcrumb a {
  color: #a0a0a0;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #C43A31;
  text-decoration: underline;
}

/* ─── PAGE NAV ─── */

.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #2a2a2a;
}

.page-nav a {
  background: #C43A31;
  color: #121212;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s;
}

.page-nav a:hover {
  background: #e05a4f;
  color: #121212;
}

/* ─── FORMAT SELECTOR ─── */

.format-selector {
  text-align: right;
  margin-bottom: 10px;
  font-size: 13px;
}

.format-label {
  color: #808080;
  margin-right: 8px;
}

.format-link {
  color: #808080;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 0.2s;
}

.format-link:hover {
  color: #C43A31;
}

.format-link.active {
  background: #2a2a2a;
  color: #C43A31;
}

/* ─── TABLES ─── */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

th {
  background: #222222;
  color: #C43A31;
  padding: 12px 15px;
  text-align: left;
  border-bottom: 2px solid #C43A31;
  font-weight: 600;
}

td {
  padding: 10px 15px;
  border-bottom: 1px solid #2a2a2a;
  color: #c0c0c0;
}

tr:hover {
  background: #1e1e1e;
}

/* ─── LISTS ─── */

ul, ol {
  padding-left: 25px;
}

li {
  margin: 8px 0;
  color: #c0c0c0;
}

li strong {
  color: #e0e0e0;
}

/* ─── RESPONSIVE ─── */

@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .navbar ul {
    gap: 4px;
  }

  .navbar a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .hero h1 {
    font-size: 1.8em;
  }
}

/* ─── SMOOTH SCROLLING ─── */

html {
  scroll-behavior: smooth;
}

/* ─── PAGE LAYOUT (sidebar + content) ─── */

.page-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.content {
  flex: 1;
  min-width: 0;
}

/* ─── STICKY TABLE OF CONTENTS ─── */

.toc {
  position: sticky;
  top: 20px;
  width: 220px;
  min-width: 220px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 20px;
}

.toc h3 {
  color: #C43A31;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2a2a;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 6px 10px;
  color: #b0b0b0;
  text-decoration: none;
  font-size: 13px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.toc a:hover {
  color: #C43A31;
  background: #222;
  border-left-color: #C43A31;
}

/* ─── SCROLL BUTTONS ─── */

.scroll-btn {
  position: fixed;
  right: 30px;
  width: 40px;
  height: 40px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 50%;
  color: #C43A31;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 100;
  transition: all 0.2s;
}

.scroll-btn:hover {
  background: #2a2a2a;
  color: #e05a4f;
}

.scroll-to-top {
  bottom: 80px;
}

.scroll-to-bottom {
  bottom: 30px;
}

/* ─── RESPONSIVE: SIDEBAR ─── */

@media (max-width: 900px) {
  .page-layout {
    flex-direction: column;
  }

  .toc {
    display: none;
  }

  .scroll-btn {
    right: 15px;
  }
}
