@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=Silkscreen&display=swap');

/* Global variables: sets up the Outfit/RoboMono fonts and defines our core dark-mode color scheme (bonfire warm theme) */
:root, [data-md-color-scheme="default"] {
  --md-text-font: 'Outfit', sans-serif;
  --md-code-font: 'Roboto Mono', monospace;
  font-family: 'Outfit', sans-serif !important;

  --md-primary-color: #180f0a !important;
  --md-primary-color--dark: #000000 !important;
  --md-accent-color: #ff6600 !important;

  --md-default-bg-color: #120e0b !important;
  --md-default-bg-color--light: #1a130f !important;
  --md-default-fg-color: #f5ede8 !important;
  --md-default-fg-color--light: #bfa89c !important;

  --md-card-bg-color: #1a130f !important;
  --md-card-bg-color--active: #261c16 !important;
  --md-code-bg-color: #1d1511 !important;

  --md-typeset-border-color: rgba(255, 102, 0, 0.15) !important;
}

/* Scrollbar customization: custom thin track and thumb styling matching the dark theme */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #120e0b;
}
::-webkit-scrollbar-thumb {
  background: #2e1e14;
  border-radius: 4px;
  border: 1px solid #482f20;
}
::-webkit-scrollbar-thumb:hover {
  background: #ff6600;
}

/* Typography overrides: Silkscreen headers for a pixelated retro vibe */
h1, h2, h3, h4, h5, h6, .md-nav__title, .md-header__topic, .md-nav__link--active {
  font-family: 'Silkscreen', monospace !important;
  font-weight: normal !important;
  letter-spacing: 0.8px;
}

h1 {
  color: #ff9d00 !important;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.9);
  border-bottom: 2px dashed rgba(255, 102, 0, 0.4) !important;
  padding-bottom: 12px;
  margin-top: 1.5em !important;
  margin-bottom: 1em !important;
}

h2 {
  color: #ffd280 !important;
  text-shadow: 1.5px 1.5px 0px rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(255, 102, 0, 0.15);
  padding-bottom: 6px;
  margin-top: 1.8em !important;
}

h3 {
  color: #ff8000 !important;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8);
}

/* Sidebar navigation: smooth hover transitions with a small indent effect */
.md-nav__link {
  transition: transform 0.2s ease, color 0.2s ease, padding-left 0.2s ease !important;
}
.md-nav__link:hover {
  color: #ff9d00 !important;
  transform: translateX(4px);
}

/* Admonitions: styled details blocks and cards with orange borders and subtle shadows */
.md-typeset .admonition, .md-typeset details {
  background-color: #1a130f !important;
  border-left: 4px solid var(--md-accent-color) !important;
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.02) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2) !important;
}

/* Code blocks: customized background colors, spacing, and inner inset shadow */
.md-typeset pre {
  background-color: #120e0b !important;
  border: 1px solid rgba(255, 102, 0, 0.15) !important;
  border-radius: 4px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8) !important;
}

/* Inline code tags: high contrast orange-yellow text against a dark background badge */
.md-typeset :not(pre) > code {
  color: #ff9d00 !important;
  background-color: #1d1511 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 102, 0, 0.25) !important;
  font-size: 0.85em !important;
  font-weight: 500 !important;
}

.md-typeset strong :not(pre) > code {
  color: #ff9d00 !important;
  font-weight: 700 !important;
}

/* Minecraft-inspired UI elements: beveled 3D borders for crafting grids, slots, and orange neon tooltips */
.mc-recipe {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #c6c6c6 !important;
  padding: 12px;
  border: 4px solid #373737;
  border-color: #dfdfdf #555555 #555555 #dfdfdf;
  border-radius: 2px;
  width: fit-content;
  margin-bottom: 25px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.mc-grid {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  gap: 4px;
}

.mc-slot {
  width: 36px;
  height: 36px;
  background: #8b8b8b !important;
  border: 2px solid;
  border-color: #373737 #ffffff #ffffff #373737;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s ease;
}

.mc-slot img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.mc-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-arrow img {
  width: 28px;
  height: auto;
  image-rendering: pixelated;
  filter: brightness(0.28) drop-shadow(1px 1px 0px rgba(0, 0, 0, 0.4));
}

.mc-result {
  width: 56px;
  height: 56px;
  background: #8b8b8b !important;
  border: 2px solid;
  border-color: #373737 #ffffff #ffffff #373737;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease;
}

.mc-result img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.mc-slot:hover, .mc-result:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.2);
}

.mc-slot[data-title]:hover::after, .mc-result[data-title]:hover::after {
  content: attr(data-title);
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  
  background: rgba(16, 0, 16, 0.94) !important;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 6px 12px;
  border-radius: 4px;
  border: 2px solid #6c2d09 !important;
  box-shadow: 0 0 0 2px rgba(16, 0, 16, 0.94), 0 0 10px #ff6600, 0 8px 24px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.6);
  animation: tooltipFadeIn 0.12s ease-out;
}

.mc-result[data-title]:hover::after {
  bottom: 64px;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Glassmorphic header: frosted glass navbar with active backdrop-filtering */
.md-header {
  background-color: rgba(24, 15, 10, 0.7) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255, 102, 0, 0.15) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4) !important;
}

/* Portal cards: premium navigation cards with clean animations and glow-on-hover borders */
.wiki-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.wiki-portal-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: #1a130f !important;
  border: 1px solid rgba(255, 102, 0, 0.15) !important;
  border-radius: 8px;
  text-decoration: none !important;
  color: #f5ede8 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wiki-portal-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: #ff9d00 !important;
  box-shadow: 0 8px 24px rgba(255, 102, 0, 0.25), 0 0 10px rgba(255, 157, 0, 0.15);
  background: #261c16 !important;
}

.wiki-portal-card .card-icon {
  font-size: 32px;
  line-height: 1;
  padding-top: 2px;
}

.wiki-portal-card .card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wiki-portal-card h3 {
  margin: 0 !important;
  padding: 0 !important;
  color: #ffd280 !important;
  font-family: 'Silkscreen', monospace !important;
  font-size: 15px !important;
  font-weight: normal !important;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
  border: none !important;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8);
}

.wiki-portal-card:hover h3 {
  color: #ff9d00 !important;
}

.wiki-portal-card p {
  margin: 0 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  color: #bfa89c !important;
  line-height: 1.4 !important;
}

/* Index grid: responsive card layouts for the Trinkets and Items list pages */
.trinket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.trinket-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #1a130f !important;
  border: 1px solid rgba(255, 102, 0, 0.15) !important;
  border-radius: 8px;
  text-decoration: none !important;
  color: #f5ede8 !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease-in-out;
}

.trinket-card:hover {
  transform: translateY(-3px);
  border-color: #ff9d00 !important;
  background: #261c16 !important;
  box-shadow: 0 8px 16px rgba(255, 102, 0, 0.2);
}

.trinket-card img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  margin-bottom: 8px;
}

.trinket-card span {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  color: #ffd280;
  transition: color 0.2s ease;
}

.trinket-card:hover span {
  color: #ff9d00;
}
