/* Gothador II Custom Theme - Blood & Fire */

:root {
  --md-primary-fg-color: #8b0000;
  --md-primary-fg-color--light: #dc143c;
  --md-primary-fg-color--dark: #4a0000;
  --md-accent-fg-color: #ff4500;
  --md-accent-fg-color--transparent: #ff450020;
}

[data-md-color-scheme="slate"] {
  --md-hue: 0;
  --md-default-bg-color: #1a0a0a;
  --md-default-bg-color--light: #2d0f0f;
  --md-default-bg-color--lighter: #3a1515;
  --md-default-bg-color--lightest: #4a1a1a;
  --md-code-bg-color: #250808;
  --md-code-hl-color: #ff450020;
}

/* Gothic header styling */
.md-header {
  background: linear-gradient(180deg, rgba(80, 10, 10, 0.95) 0%, rgba(40, 5, 5, 0.9) 100%);
  box-shadow: 0 4px 20px rgba(139, 0, 0, 0.5);
}

/* Typography adjustments for consistency */
.md-typeset {
  font-size: 0.8rem;
  line-height: 1.5;
}

.md-typeset h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.md-typeset h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
}

.md-typeset h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.md-typeset h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
}

.md-typeset h5 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.6rem;
  margin-bottom: 0.3rem;
}

.md-typeset p, .md-typeset ul, .md-typeset ol {
  font-size: 0.8rem;
  line-height: 1.5;
}

/* Card grid styling */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.grid.cards > div {
  background: linear-gradient(135deg, var(--md-default-bg-color--light) 0%, var(--md-default-bg-color--lighter) 100%);
  border: 1px solid var(--md-primary-fg-color--dark);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.grid.cards > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(220, 20, 60, 0.4);
  border-color: var(--md-primary-fg-color--light);
}

/* Table styling - improved readability */
.md-typeset table {
  background: rgba(26, 10, 10, 0.6);
  border: 2px solid #4a0000;
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
  table-layout: auto;
  overflow-wrap: break-word;
  display: table !important;
}

/* Override MkDocs table wrapper */
.md-typeset__scrollwrap {
  overflow-x: visible !important;
}

.md-typeset__table {
  display: block;
  overflow-x: auto;
}

.md-typeset table th {
  background: #5a0000;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.1px;
  text-transform: none;
  border: 1px solid #8b0000;
  padding: 0.3rem 0.2rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.md-typeset table td {
  border: 1px solid #3a1a1a;
  padding: 0.25rem 0.2rem;
  color: #f5e5e5;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.md-typeset table tr:hover td {
  background: rgba(139, 0, 0, 0.2);
  color: #ffffff;
}

.md-typeset table tr:nth-child(even) td {
  background: rgba(40, 0, 0, 0.2);
}

/* Special styling for first column if it's a header-like cell */
.md-typeset table td:first-child strong {
  color: #ff9999;
}

/* Admonition styling */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: var(--md-primary-fg-color);
}

.md-typeset .admonition.note > .admonition-title,
.md-typeset details.note > summary {
  background-color: var(--md-primary-fg-color--dark);
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: #4caf50;
}

.md-typeset .admonition.tip > .admonition-title,
.md-typeset details.tip > summary {
  background-color: #2e7d32;
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-color: #ff9800;
}

.md-typeset .admonition.warning > .admonition-title,
.md-typeset details.warning > summary {
  background-color: #e65100;
}

.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: #2196f3;
}

.md-typeset .admonition.info > .admonition-title,
.md-typeset details.info > summary {
  background-color: #0d47a1;
}

/* Hero banner */
.hero-banner {
  background: linear-gradient(135deg, #4a0000 0%, #8b0000 50%, #dc143c 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  margin: -1rem -1rem 2rem -1rem;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 4px 20px rgba(139, 0, 0, 0.4);
}

.hero-banner h1 {
  font-size: 3rem;
  margin: 0;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.hero-banner p {
  font-size: 1.2rem;
  margin-top: 1rem;
  opacity: 0.95;
}

/* Navigation tabs */
.md-tabs {
  background: linear-gradient(180deg, var(--md-default-bg-color--lighter) 0%, var(--md-default-bg-color--light) 100%);
  border-bottom: 2px solid var(--md-primary-fg-color--dark);
}

/* Code blocks */
.md-typeset code {
  background: var(--md-code-bg-color);
  border: 1px solid var(--md-primary-fg-color--dark);
  color: var(--md-accent-fg-color);
}

.md-typeset pre > code {
  border: none;
}

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

::-webkit-scrollbar-track {
  background: var(--md-default-bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--md-primary-fg-color--dark);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--md-primary-fg-color);
}

/* Stat badges */
.stat-badge {
  display: inline-block;
  background: var(--md-primary-fg-color--dark);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0 0.2rem;
}

/* Resource icons */
.resource-icon {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  margin-right: 0.3em;
}

/* Tier colors - Blood & Fire progression */
.tier-1 { color: #9e9e9e; }
.tier-2 { color: #ff6b6b; }
.tier-3 { color: #ff4444; }
.tier-4 { color: #dc143c; }
.tier-5 { color: #b22222; }
.tier-6 { color: #8b0000; }

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .grid.cards {
    grid-template-columns: 1fr;
  }
  
  .hero-banner h1 {
    font-size: 2rem;
  }
  
  .md-typeset table {
    font-size: 0.7rem;
  }
  
  .md-typeset table th,
  .md-typeset table td {
    padding: 0.25rem 0.2rem;
    font-size: 0.7rem;
  }
}

/* Wide table optimization */
@media screen and (min-width: 1400px) {
  .md-typeset table {
    max-width: 100%;
  }
}

/* Force tables to fit content area */
.md-content__inner {
  overflow-x: hidden;
  max-width: 100%;
}

/* Hide right-side TOC completely */
.md-sidebar--secondary {
  display: none !important;
}

/* Make content use full width without TOC */
.md-content {
  max-width: 100% !important;
}

.md-content__inner {
  margin-right: 0 !important;
  padding-right: 1rem !important;
}

.md-typeset__table {
  overflow-x: auto;
  margin: 0 -1rem;
  padding: 0 1rem;
}

/* Compact table styles for data-heavy tables */
.md-typeset table.compact th,
.md-typeset table.compact td {
  padding: 0.15rem 0.15rem;
  font-size: 0.65rem;
}

/* Hide less important columns on smaller screens */
@media screen and (max-width: 1200px) {
  .md-typeset table th:nth-child(n+6),
  .md-typeset table td:nth-child(n+6) {
    display: none;
  }
}

@media screen and (max-width: 900px) {
  .md-typeset table th:nth-child(n+5),
  .md-typeset table td:nth-child(n+5) {
    display: none;
  }
}

@media screen and (max-width: 600px) {
  .md-typeset table th:nth-child(n+4),
  .md-typeset table td:nth-child(n+4) {
    display: none;
  }
}