:root {
  --bg-base: #090405;
  --bg-panel: #110708;
  --bg-card: #180b0d;
  --bg-card-hover: #230f12;
  --bg-input: #15090b;
  --border: #3b171a;
  --border-soft: #250f11;
  --border-bright: #632328;

  --text-main: #f9fafb;
  --text-body: #d1d5db;
  --text-dim: #9ca3af;
  --text-faint: #6b7280;

  --accent: #dc2626;
  --accent-hover: #ef4444;
  --accent-light: #fca5a5;
  --accent-soft: rgba(220, 38, 38, 0.15);
  --accent-glow: rgba(220, 38, 38, 0.35);

  --common: #9ca3af;
  --uncommon: #10b981;
  --rare: #3b82f6;
  --epic: #a855f7;
  --legendary: #f59e0b;
  --mythic: #ef4444;

  --sidebar-width: 310px;
  --header-height: 64px;
  --font-reading-size: 16.5px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

::-webkit-scrollbar-track {
  background: var(--bg-panel);
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 12px var(--accent-soft);
  }

  50% {
    box-shadow: 0 0 24px var(--accent-glow);
  }
}

.animated-fade {
  animation: fadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animated-scale {
  animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== HEADER & TOP NAVIGATION ===== */
.brand-header {
  height: var(--header-height, 64px);
  background: rgba(9, 4, 5, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(220, 38, 38, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 30;
  flex-shrink: 0;
  box-sizing: border-box;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.sidebar-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-toggle-btn:hover {
  color: #fff;
  border-color: var(--accent);
}

.brand-logo-wrap {
  width: 36px;
  height: 36px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex-shrink: 0;
  border: none;
  box-shadow: none;
  animation: none;
}

.brand-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.25s ease;
  display: block;
}

.brand-logo-wrap img:hover {
  transform: scale(1.08);
}

.brand-logo-fallback {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  gap: 2px;
}

.brand-title-wrap a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.brand-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0;
  padding: 0;
  display: block;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

.breadcrumbs span.crumb-active {
  color: var(--accent-light);
  font-weight: 600;
}

.breadcrumbs .sep {
  color: var(--text-faint);
  font-size: 10px;
}

.brand-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-soft);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.stats-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stats-item strong {
  color: #fff;
}

.btn-global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-global-search:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--bg-card-hover);
}

.kbd-shortcut {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-soft);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-dim);
}

/* ===== DOWNLOAD BUTTON STYLES ===== */
.btn-download-mod {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #ffffff !important;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 22px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid var(--border-bright);
  box-shadow: 0 4px 18px var(--accent-soft), 0 0 12px var(--accent-glow);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-download-mod:hover {
  background: var(--accent-hover);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px var(--accent-soft), 0 0 20px var(--accent-glow);
}

.btn-download-mod:active {
  transform: translateY(0);
}

.btn-extras-mod {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-body);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-extras-mod:hover {
  background: var(--accent-soft);
  color: var(--accent-light);
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: 0 4px 18px var(--accent-soft);
}

.btn-extras-mod:active {
  transform: translateY(0);
}

.extras-modal-window {
  max-width: 860px !important;
  max-height: 85vh !important;
}


.btn-header-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent-light) !important;
  border: 1px solid var(--border-bright);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-header-download:hover {
  background: var(--accent);
  color: #ffffff !important;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--accent-soft);
}


/* ===== MAIN APP BODY ===== */
.app-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ===== MOD SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: linear-gradient(180deg, rgba(17, 7, 8, 0.98) 0%, rgba(9, 4, 5, 0.98) 100%);
  border-right: 1px solid rgba(220, 38, 38, 0.22);
  display: flex;
  flex-direction: column;
  z-index: 20;
  transition: transform 0.3s ease;
}

.sidebar-head {
  padding: 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.sidebar-search {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.sidebar-search:focus {
  outline: none;
  border-color: var(--accent);
}

.sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mod-card {
  background: linear-gradient(145deg, rgba(50, 16, 22, 0.78) 0%, rgba(28, 8, 12, 0.92) 100%);
  border: 1px solid rgba(220, 38, 38, 0.32);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  border-left: 3px solid rgba(220, 38, 38, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.mod-card:hover {
  background: linear-gradient(145deg, rgba(70, 22, 28, 0.9) 0%, rgba(42, 12, 16, 0.96) 100%);
  border-color: rgba(239, 68, 68, 0.65);
  border-left-color: var(--accent);
  transform: translateX(4px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 18px rgba(220, 38, 38, 0.28);
}

.mod-card.selected {
  border-left-color: var(--accent);
  border-color: rgba(239, 68, 68, 0.75);
  background: linear-gradient(145deg, rgba(80, 24, 30, 0.95) 0%, rgba(48, 14, 18, 0.98) 100%);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.7), 0 0 24px rgba(220, 38, 38, 0.35);
}

.mod-card-logo {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  background: #060203;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-bright);
  transition: all 0.25s ease;
}

.mod-card:hover .mod-card-logo,
.mod-card.selected .mod-card-logo {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-soft);
}

.mod-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mod-card-logo-fallback {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--accent-light);
}

.mod-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mod-card-name {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.mod-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.mod-status-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-dev {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-beta {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.status-archived {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  border: 1px solid var(--border-soft);
}

.mod-card-count-tag {
  font-size: 10.5px;
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
}

/* No-Animations preference mode */
body.no-animations *,
body.no-animations *:before,
body.no-animations *:after {
  animation: none !important;
  transition: none !important;
}

/* ===== SIDEBAR FOOTER (SOCIALS + PREFERENCES) ===== */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.4);
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.sidebar-social-icons {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.sidebar-social-btn {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.sidebar-social-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.sidebar-social-btn.discord:hover {
  color: #5865F2;
  border-color: #5865F2;
  background: rgba(88, 101, 242, 0.18);
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.4);
}

.sidebar-social-btn.twitter:hover {
  color: #ffffff;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.5), 0 0 6px #ffffff;
}

.sidebar-social-btn.youtube:hover {
  color: #FF0000;
  border-color: #FF0000;
  background: rgba(255, 0, 0, 0.18);
  box-shadow: 0 0 16px rgba(255, 0, 0, 0.4);
}

.sidebar-social-btn.instagram:hover {
  color: #E4405F;
  border-color: #E4405F;
  background: rgba(228, 64, 95, 0.18);
  box-shadow: 0 0 16px rgba(228, 64, 95, 0.4);
}

.sidebar-pref-btn,
.preferences-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  color: #fff;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-pref-btn svg,
.preferences-btn svg {
  transition: transform 0.4s ease, color 0.25s ease;
  color: var(--accent-light);
}

.sidebar-pref-btn:hover,
.preferences-btn:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--bg-card-hover);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 16px var(--accent-soft);
  transform: translateY(-2px);
}

.sidebar-pref-btn:hover svg,
.preferences-btn:hover svg {
  transform: rotate(90deg);
  color: #fff;
}

/* Preferences Option Cards & Controls */
.pref-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 14px 18px;
  border-radius: 12px;
  transition: border-color 0.2s ease;
}

.pref-option-card:hover {
  border-color: var(--border);
}

.pref-option-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pref-option-title {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.pref-option-desc {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.4;
}



/* Toggle Switch UI */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-dim);
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
  background-color: var(--accent-soft);
  border-color: var(--accent);
}

.toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(20px);
  background-color: var(--accent-light);
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}

.main-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 32px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100%;
  box-sizing: border-box;
}

/* Empty State */
.empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  gap: 12px;
  text-align: center;
  padding: 40px;
}

.empty-state > svg,
.empty-state > div > svg {
  width: 52px;
  height: 52px;
  opacity: 0.4;
  color: var(--accent);
}

.empty-state h3 {
  color: var(--text-body);
  font-size: 17px;
  font-weight: 600;
}

.empty-state p {
  font-size: 13px;
  max-width: 340px;
  line-height: 1.5;
}

/* Status Pills & Badges */
.mod-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.mod-status-pill.status-active {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.mod-status-pill.status-dev {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.mod-status-pill.status-archived {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.mod-status-pill.status-beta {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

/* Mod Header & Banner */
.mod-header,
.mod-hero-banner {
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  position: relative;
}

.mod-header-left,
.mod-hero-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.mod-logo-large {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 16px;
  background: var(--bg-panel);
  border: 1.5px solid var(--border-bright);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 16px var(--accent-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mod-logo-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mod-header-right,
#mod-banner-wrap {
  flex-shrink: 0;
  max-width: 280px;
  max-height: 80px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-right: 24px;
  margin-left: 16px;
}

.mod-banner-img,
#mod-banner-img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 8px;
  box-shadow: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.mod-banner-img:hover,
#mod-banner-img:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 12px var(--accent-glow));
}

.mod-hero-title,
.mod-title-text,
.mod-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.mod-game-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-bright);
  text-transform: uppercase;
}

.mod-status-badge {
  font-size: 10px;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  text-transform: uppercase;
}

.mod-desc {
  color: var(--text-body);
  font-size: 13.5px;
  margin-top: 6px;
  max-width: 760px;
  line-height: 1.6;
}

/* Main Navigation Tabs */
.nav-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 24px;
  position: relative;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-bright) rgba(0, 0, 0, 0.2);
  cursor: grab;
  user-select: none;
}

.nav-tabs:active {
  cursor: grabbing;
}

.nav-tabs::-webkit-scrollbar {
  height: 4px;
}

.nav-tabs::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 4px;
}

.nav-tabs::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.nav-tabs::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  bottom: -1px;
  background: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-card);
}

.tab-btn.active {
  background: rgba(220, 38, 38, 0.16);
  color: #ffffff;
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.2);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 12px var(--accent);
}

.tab-btn .badge-count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.tab-btn.active .badge-count {
  background: var(--accent-soft);
  color: var(--accent-light);
}

/* Toolbar Filter, View Toggle & Sorting */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
  position: relative;
  z-index: 100;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-faint);
}

.search-input-field {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px 8px 34px;
  color: var(--text-main);
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.search-input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chip:hover {
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.chip.active {
  background: var(--accent-soft);
  color: var(--accent-light);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-soft);
}

/* ===== TAG FILTER DROPDOWN & POPUP BOX ===== */
.tag-filter-dropdown-wrap {
  position: relative;
  display: inline-block;
  z-index: 200;
}

.tag-filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 135px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  color: var(--text-main);
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  height: 35px;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.tag-btn-left {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.tag-btn-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.tag-filter-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 12px var(--accent-soft);
}

.tag-filter-btn.active {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: 0 0 16px var(--accent-glow);
}

.tag-filter-btn .tag-chevron {
  transition: transform 0.2s ease;
  color: var(--text-dim);
}

.tag-filter-btn.active .tag-chevron {
  transform: rotate(180deg);
  color: var(--accent-light);
}

.tag-count-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  padding: 2px 7px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.tag-count-badge.filtered {
  background: var(--accent-soft);
  color: var(--accent-light);
  border: 1px solid var(--accent);
}

/* POPUP DROPDOWN BOX */
.tag-filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 9999;
  width: 280px;
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.95), 0 0 25px rgba(220, 38, 38, 0.25);
  backdrop-filter: blur(16px);
  animation: dropdownFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tag-dropdown-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-dropdown-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tag-dropdown-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.tag-dropdown-counter-text {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

.tag-dropdown-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-tag-action {
  flex: 1;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border-soft);
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: center;
}

.btn-tag-action.select-all {
  background: var(--accent-soft);
  color: var(--accent-light);
  border-color: var(--border-bright);
}

.btn-tag-action.select-all:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-tag-action.reset-all {
  background: var(--bg-card);
  color: var(--text-body);
}

.btn-tag-action.reset-all:hover {
  background: var(--bg-card-hover);
  color: #ffffff;
  border-color: var(--border);
}

.tag-dropdown-body {
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tag-checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.tag-checkbox-item:hover {
  background: var(--bg-card-hover);
}

.tag-checkbox-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag-checkbox-item input[type="checkbox"] {
  display: none;
}

.tag-checkbox-custom {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.tag-checkbox-item input[type="checkbox"]:checked+.tag-checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.tag-checkbox-item input[type="checkbox"]:checked+.tag-checkbox-custom::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.tag-checkbox-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.18s ease;
}

.tag-checkbox-item.checked .tag-checkbox-label {
  color: #ffffff;
  font-weight: 600;
}

.tag-item-count {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 8px;
}

.tag-checkbox-item:hover .tag-item-count {
  color: var(--text-dim);
}

/* View Mode Toggle & Sort Selector */
.view-toggle {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.view-btn.active {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid var(--border-soft);
}

.sort-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  height: 31px;
  box-sizing: border-box;
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent);
}

.sort-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  height: 31px;
  box-sizing: border-box;
  font-weight: 800;
}

.sort-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--bg-card);
}

/* ===== REVAMPED LORE & CODEX ARCHIVE STYLES ===== */
.lore-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  padding: 12px 18px;
  border-radius: 14px;
}

.reading-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

.font-size-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.font-size-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-light);
}

.lore-timeline-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
  scrollbar-width: thin;
}

.lore-chapter-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  transition: all 0.25s ease;
  text-align: left;
}

.lore-chapter-tab:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.lore-chapter-tab.active {
  border-color: var(--accent);
  background: var(--bg-panel);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.lore-tab-num {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-2);
  letter-spacing: 0.08em;
}

.lore-tab-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.lore-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 920px;
}

/* ===== LORE CHAPTER GRID CARDS & BLOG ARTICLE SYSTEM ===== */
.lore-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 1200px) {
  .lore-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .lore-grid-container {
    grid-template-columns: 1fr;
  }
}

.lore-card {
  background: linear-gradient(145deg, rgba(24, 11, 13, 0.88) 0%, rgba(13, 5, 7, 0.94) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.lore-card:hover {
  transform: translateY(-6px);
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(145deg, rgba(35, 15, 18, 0.95) 0%, rgba(20, 8, 10, 0.98) 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 32px var(--accent-soft);
}

.lore-card-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #060203;
}

.lore-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.lore-card:hover .lore-card-banner img {
  transform: scale(1.07);
}

.lore-card-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(10, 4, 6, 0.75) 70%, var(--bg-card) 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lore-card-top-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 3;
}

.lore-chapter-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 14px var(--accent-soft);
  border: 1px solid var(--border-bright);
}

.lore-readtime-badge {
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(9, 4, 5, 0.75);
  backdrop-filter: blur(10px);
  color: var(--text-light);
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lore-card-body {
  padding: 20px 24px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.lore-card-header-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 2px;
}

.lore-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  transition: color 0.2s ease;
}

.lore-card:hover .lore-card-title {
  color: var(--accent-light);
}

.lore-card-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-hover);
}

.lore-card-excerpt {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

.lore-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.lore-card-read-btn {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.lore-card-read-btn .lore-arrow {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lore-card:hover .lore-card-read-btn {
  color: var(--accent-hover);
}

.lore-card:hover .lore-card-read-btn .lore-arrow {
  transform: translateX(5px);
}


/* BLOG ARTICLE MODAL VIEW */
.blog-article-modal {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.blog-hero-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  border-radius: 18px;
  overflow: hidden;
  background: #060203;
  border: 1px solid rgba(220, 38, 38, 0.35);
  position: relative;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(220, 38, 38, 0.25);
  transition: transform 0.25s ease;
}

.blog-hero-banner:hover {
  transform: scale(1.01);
  border-color: rgba(239, 68, 68, 0.6);
}

.blog-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(10, 4, 6, 0.85) 100%);
  pointer-events: none;
}

.blog-content-body {
  padding: 10px 4px;
}

.lore-codex-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 20px;
  padding: 34px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 30px var(--accent-soft);
  transition: all 0.3s ease;
}

.lore-codex-card:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85), 0 0 40px var(--accent-soft);
}

.lore-chapter-head {
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 16px;
}

.lore-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.lore-chapter-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent-2);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  letter-spacing: 0.08em;
}

.lore-read-time {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
}

.lore-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.01em;
}

.lore-subtitle {
  font-size: 14px;
  color: var(--accent-light);
  font-weight: 500;
}

.lore-epigraph {
  font-style: italic;
  font-size: 14.5px;
  color: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin-top: 10px;
  margin-bottom: 6px;
  line-height: 1.6;
  background: rgba(220, 38, 38, 0.05);
  padding-top: 8px;
  padding-bottom: 8px;
  border-radius: 0 8px 8px 0;
}

/* Illuminated Drop Cap */
.lore-drop-cap {
  float: left;
  font-size: 3.6rem;
  line-height: 0.8;
  font-weight: 900;
  padding-top: 4px;
  padding-right: 12px;
  padding-bottom: 2px;
  color: var(--accent-2);
  font-family: 'Space Grotesk', serif;
  text-shadow: 0 0 16px var(--accent-glow);
}

/* Markdown Content Typography */
.markdown-body {
  font-size: var(--font-reading-size);
  line-height: 1.8;
  color: var(--text-body);
}

.markdown-body p {
  margin-bottom: 16px;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: #fff;
  margin: 24px 0 12px 0;
  font-family: 'Space Grotesk', sans-serif;
}

.markdown-body strong {
  color: #fff;
  font-weight: 700;
}

.markdown-body img,
.blog-content-body img,
.lore-subsection-body img,
.section-image-container img {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  margin: 22px 0;
  border: 1px solid rgba(220, 38, 38, 0.35);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(220, 38, 38, 0.15);
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.markdown-body img:hover,
.blog-content-body img:hover,
.lore-subsection-body img:hover,
.section-image-container img:hover {
  transform: scale(1.015);
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(220, 38, 38, 0.3);
}

.markdown-body blockquote {
  border-left: 4px solid var(--accent);
  background: rgba(220, 38, 38, 0.08);
  padding: 16px 22px;
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
  font-style: italic;
  color: #fff;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--accent);
}

.markdown-body ul,
.markdown-body ol {
  margin-left: 22px;
  margin-bottom: 16px;
}

.markdown-body code {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  padding: 3px 7px;
  border-radius: 5px;
  font-family: monospace;
  font-size: 13px;
  color: var(--accent-light);
}

.lore-cinematic-frame {
  margin-top: 24px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-bright);
  background: #000;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8);
}

.lore-cinematic-frame video {
  width: 100%;
  display: block;
}

/* Subsections in Lore */
.lore-subsections {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 26px;
  border-top: 1px solid var(--border-soft);
  padding-top: 18px;
}

.lore-subsections-head {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.lore-subsection {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.lore-subsections .lore-subsection:last-child {
  margin-bottom: 0;
}

.lore-subsection:hover {
  border-color: var(--border-bright);
}

.lore-subsection.open {
  border-color: var(--accent);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 16px var(--accent-soft);
}

.lore-subsection-title {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.lore-subsection.open .lore-subsection-title {
  background: var(--accent-soft);
  color: var(--accent-light);
}

.lore-subsection-title:hover {
  background: var(--accent-soft);
  color: var(--accent-light);
}

.lore-sub-chevron {
  font-size: 11px;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.lore-subsection.open .lore-sub-chevron {
  transform: rotate(180deg);
  color: var(--accent-light);
}

.lore-subsection-body {
  padding: 14px 18px 10px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
  border-top: 1px solid var(--border-soft);
}

.lore-subsection-body>*:last-child,
.lore-subsection-body .markdown-body>*:last-child,
.lore-subsection-body p:last-child {
  margin-bottom: 0 !important;
}

/* ===== ITEMS & OBJECTS CARDS (HORIZONTAL WITH SQUARE SIDE THUMBNAIL) ===== */
.items-container.grid-mode {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.items-container.list-mode {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-card {
  background: linear-gradient(145deg, rgba(24, 11, 13, 0.88) 0%, rgba(13, 5, 7, 0.94) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.item-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75), 0 0 20px var(--accent-soft);
}

.item-card-media-square {
  width: 90px;
  height: 90px;
  min-width: 90px;
  min-height: 90px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.28) 0%, rgba(245, 158, 11, 0.05) 55%, #060203 90%);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.item-card-media-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.item-card:hover .item-card-media-square img {
  transform: scale(1.1);
}

.item-card-placeholder-icon {
  font-size: 32px;
  opacity: 0.25;
  color: var(--text-faint);
}

/* ===== ENEMY CARD MINI 3D PREVIEW CANVAS ===== */
.enemy-card-canvas-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.enemy-card-mini-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.92;
}

.item-card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 6px;
}

.item-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 2px;
}

.item-card-title {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rarity Badges */
.badge-rarity {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.rarity-common {
  background: rgba(255, 255, 255, 0.08);
  color: var(--common);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rarity-uncommon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--uncommon);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.rarity-rare {
  background: rgba(59, 130, 246, 0.15);
  color: var(--rare);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.rarity-epic {
  background: rgba(168, 85, 247, 0.15);
  color: var(--epic);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.rarity-legendary {
  background: rgba(245, 158, 11, 0.15);
  color: var(--legendary);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.rarity-mythic {
  background: rgba(239, 68, 68, 0.15);
  color: var(--mythic);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* CRIMSON RARITY - VISCERAL BLOOD FRAME STYLE (STEADY GLOW, NO FLASHING, NO PORTAL) */
.rarity-crimson {
  position: relative;
  background: linear-gradient(135deg, #1c0305 0%, #3f070b 50%, #200406 100%) !important;
  color: #fee2e2 !important;
  border: 1px solid #b91c1c !important;
  box-shadow: 0 0 10px rgba(185, 28, 28, 0.65), inset 0 0 8px rgba(127, 29, 29, 0.7);
  text-shadow: 0 1px 3px #000, 0 0 8px rgba(220, 38, 38, 0.9);
  font-weight: 800;
  overflow: visible;
  z-index: 1;
}

/* Outer Blood Red Frame Accent */
.rarity-crimson::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 7px;
  border: 1.5px solid #dc2626;
  background: radial-gradient(circle at 15% 15%, rgba(220, 38, 38, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(185, 28, 28, 0.4) 0%, transparent 45%);
  box-shadow: inset 0 0 5px rgba(255, 32, 78, 0.4);
  pointer-events: none;
  z-index: -1;
}

.item-desc-snippet {
  color: var(--text-body);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
}

.tag-chip {
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.18s ease;
}

/* Clickable / interactive badge & tag variants */
.badge-clickable,
.tag-chip.tag-clickable {
  cursor: pointer;
  position: relative;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.badge-clickable::after,
.tag-chip.tag-clickable::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0);
  transition: background 0.15s ease;
}

.badge-clickable:hover,
.tag-chip.tag-clickable:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  filter: brightness(1.2);
}

.badge-clickable:active,
.tag-chip.tag-clickable:active {
  transform: scale(0.97);
  filter: brightness(0.9);
}

/* Small filter icon appended to clickable badges */
.badge-clickable .badge-filter-icon {
  opacity: 0.65;
  font-size: 9px;
  transition: opacity 0.15s ease;
  line-height: 1;
}

.badge-clickable:hover .badge-filter-icon {
  opacity: 1;
}

/* ===== ENEMIES CARDS (GRID & HORIZONTAL LIST MODES) ===== */
.enemies-container.grid-mode {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.enemies-container.grid-mode.size-small {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.items-container.grid-mode.size-small {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.structures-container.grid-mode.size-small {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.enemies-container.grid-mode.size-medium {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.items-container.grid-mode.size-medium {
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 24px;
}

.structures-container.grid-mode.size-medium {
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 20px;
}

.enemies-container.grid-mode.size-large {
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 28px;
}

.items-container.grid-mode.size-large {
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 28px;
}

.items-container.grid-mode.size-large .item-card-media-square {
  width: 105px;
  height: 105px;
  min-width: 105px;
  min-height: 105px;
}

.items-container.grid-mode.size-large .item-card-title {
  font-size: 17px;
}

.structures-container.grid-mode.size-large {
  grid-template-columns: repeat(auto-fill, minmax(560px, 1fr));
  gap: 24px;
}

.enemies-container.grid-mode.size-large .enemy-card-media-top {
  height: 380px;
}

.enemies-container.grid-mode.size-large .enemy-card-title,
.structures-container.grid-mode.size-large .structure-card-title {
  font-size: 22px;
}

.enemies-container.list-mode {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.enemy-card {
  background: linear-gradient(145deg, rgba(24, 11, 13, 0.88) 0%, rgba(13, 5, 7, 0.94) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 490px;
}

.enemy-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 25px var(--accent-soft);
}

/* Horizontal List Mode for Enemy Cards (Image on Left with Red Radial & Horizontal Blend Gradient) */
.enemies-container.list-mode .enemy-card {
  flex-direction: row;
  min-height: 180px;
  max-height: 220px;
  align-items: stretch;
}

.enemies-container.list-mode .enemy-card:hover {
  transform: translateY(-3px) scale(1.008);
}

.enemies-container.list-mode .enemy-card-media-top {
  width: 240px;
  min-width: 240px;
  height: 100%;
}

.enemies-container.list-mode .enemy-card-media-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 40%, var(--bg-card) 100%);
}

.enemies-container.list-mode .enemy-card-body {
  flex: 1;
  padding: 18px 24px;
}

.enemy-card-media-top {
  width: 100%;
  height: 330px;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, var(--accent-soft) 40%, #060203 85%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes enemyIdleHover {
  0% {
    transform: scale(1.06) translateY(0px) rotate(0deg);
  }

  25% {
    transform: scale(1.08) translateY(-4px) rotate(0.5deg);
  }

  50% {
    transform: scale(1.07) translateY(-1px) rotate(-0.3deg);
  }

  75% {
    transform: scale(1.09) translateY(-5px) rotate(0.4deg);
  }

  100% {
    transform: scale(1.06) translateY(0px) rotate(0deg);
  }
}

.enemy-card-media-top img,
.enemy-card-media-top canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.enemy-card:hover .enemy-card-media-top img,
.enemy-card:hover .enemy-card-media-top canvas {
  animation: enemyIdleHover 3.2s ease-in-out infinite alternate;
}

.enemy-card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, var(--bg-card) 100%);
  pointer-events: none;
}

.enemies-container.grid-mode.size-small .threat-prefix {
  display: none;
}

.enemies-container.grid-mode.size-small .badge-threat {
  padding: 3px 6px;
  font-size: 10px;
}

.enemy-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  position: relative;
  justify-content: space-between;
}

.enemy-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 2px;
}

.enemy-card-title {
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  line-height: 1.2;
  word-break: break-word;
  min-width: 0;
  flex: 1;
}

.badge-threat {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: max-content;
  width: auto;
  height: fit-content;
  line-height: 1.3;
}

/* Distinct Threat Level Colors */
.threat-low {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.threat-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.threat-high {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.45);
}

.threat-extreme {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.threat-insane {
  background: rgba(217, 70, 239, 0.2);
  color: #d946ef;
  border: 1px solid rgba(217, 70, 239, 0.5);
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.35);
}

.enemy-stats-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--text-dim);
  width: 100%;
  box-sizing: border-box;
}

.item-stats-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--text-dim);
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
}

.enemy-desc-snippet {
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
  margin-bottom: 4px;
}

/* ===== STRUCTURES & POIs CONTAINER & CARDS ===== */
.structures-container {
  width: 100%;
  box-sizing: border-box;
}

.structures-container.grid-mode {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 24px;
}

.structures-container.grid-mode.size-small {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.structures-container.grid-mode.size-medium {
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 24px;
}

.structures-container.grid-mode.size-large {
  grid-template-columns: repeat(auto-fill, minmax(540px, 1fr));
  gap: 28px;
}

.structures-container.list-mode {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Base Structure Card */
.structure-card {
  background: linear-gradient(145deg, rgba(24, 11, 13, 0.88) 0%, rgba(13, 5, 7, 0.94) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.structure-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 25px var(--accent-soft);
}

/* STRUCTURES GRID MODE (ELEGANT ELONGATED VERTICAL CARDS - TALL MEDIA DISPLAY) */
.structures-container.grid-mode .structure-card {
  flex-direction: column;
  min-height: auto;
  max-height: none;
}

.structures-container.grid-mode .structure-card-media {
  width: 100%;
  height: 340px;
  min-width: 100%;
  max-width: 100%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.35) 0%, rgba(185, 28, 28, 0.08) 55%, #060203 85%);
}

.structures-container.grid-mode .structure-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.structures-container.grid-mode .structure-card:hover .structure-card-media img {
  transform: scale(1.06);
}

.structures-container.grid-mode .structure-card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 40%, var(--bg-card) 100%);
  pointer-events: none;
}

.structures-container.grid-mode .structure-card-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

/* COMPACT SIZE (size-small) IN GRID MODE */
.structures-container.grid-mode.size-small .structure-card-media {
  height: 260px;
}

.structures-container.grid-mode.size-small .structure-card-body {
  padding: 14px 16px;
  gap: 8px;
}

.structures-container.grid-mode.size-small .structure-card-title {
  font-size: 15px;
}

/* LARGE SIZE (size-large) IN GRID MODE */
.structures-container.grid-mode.size-large .structure-card-media {
  height: 440px;
}

.structures-container.grid-mode.size-large .structure-card-body {
  padding: 24px 28px;
  gap: 14px;
}

.structures-container.grid-mode.size-large .structure-card-title {
  font-size: 22px;
}

/* STRUCTURES LIST MODE (HORIZONTAL ROW CARDS) */
.structures-container.list-mode .structure-card {
  flex-direction: row;
  min-height: 170px;
  max-height: 220px;
}

.structures-container.list-mode .structure-card-media {
  width: 250px;
  min-width: 190px;
  height: 100%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.35) 0%, rgba(185, 28, 28, 0.08) 55%, #060203 85%);
}

.structures-container.list-mode .structure-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.structures-container.list-mode .structure-card:hover .structure-card-media img {
  transform: scale(1.06);
}

.structures-container.list-mode .structure-card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 65%, var(--bg-card) 100%);
  pointer-events: none;
}

.structures-container.list-mode .structure-card-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

/* Rectangular Media Panel with Crimson/Red Background Aura Glow */
.structure-card-media {
  width: 280px;
  min-width: 220px;
  flex-shrink: 0;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.35) 0%, rgba(185, 28, 28, 0.08) 55%, #060203 85%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.structure-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  pointer-events: none;
}

.structure-card:hover .structure-card-media img {
  transform: scale(1.07);
}

/* Subtle Gradient Overlay - Starts fading only at 75% to leave image clear */
.structure-card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 75%, var(--bg-card) 100%);
  pointer-events: none;
}

.structure-card-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  position: relative;
  justify-content: space-between;
  min-width: 0;
  pointer-events: none;
  overflow: hidden;
}

.structure-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 2px;
}

.structure-card-title {
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  line-height: 1.25;
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.structure-stats-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--text-dim);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.structure-desc-snippet {
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
  margin-bottom: 4px;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.2s ease, border-top-color 0.2s ease;
}

.structure-desc-snippet:hover {
  color: var(--text);
  border-top-color: rgba(239, 68, 68, 0.4);
}

.structure-desc-snippet.expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.structures-container.list-mode .structure-card:has(.structure-desc-snippet.expanded),
.structures-container.list-mode .structure-card.has-expanded-desc {
  max-height: none;
  height: auto;
}

.structures-container.list-mode .structure-card:has(.structure-desc-snippet.expanded) .structure-card-body,
.structures-container.list-mode .structure-card.has-expanded-desc .structure-card-body {
  overflow: visible;
}


/* === STRUCTURE TYPE BADGES === */
.badge-poi {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: max-content;
  width: auto;
  height: fit-content;
  line-height: 1.3;
  /* Default (generic POI — red) */
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

/* Dungeon — deep violet/purple */
.badge-poi.poi-dungeon {
  background: rgba(124, 58, 237, 0.18);
  color: #a78bfa;
  border-color: rgba(124, 58, 237, 0.45);
}

/* Boss Arena — fiery amber-red */
.badge-poi.poi-boss-arena {
  background: rgba(234, 88, 12, 0.18);
  color: #fb923c;
  border-color: rgba(234, 88, 12, 0.5);
}

/* Shrine — sacred cyan/teal */
.badge-poi.poi-shrine {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.4);
}

/* Camp — military olive-green */
.badge-poi.poi-camp {
  background: rgba(101, 163, 13, 0.15);
  color: #a3e635;
  border-color: rgba(101, 163, 13, 0.4);
}

/* Ruins — warm grey-brown */
.badge-poi.poi-ruins {
  background: rgba(120, 113, 108, 0.2);
  color: #d6d3d1;
  border-color: rgba(120, 113, 108, 0.45);
}

/* Settlement — golden amber */
.badge-poi.poi-settlement {
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
  border-color: rgba(217, 119, 6, 0.45);
}

/* Tower — steel blue */
.badge-poi.poi-tower {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}


@media (max-width: 680px) {
  .structures-container.grid-mode {
    grid-template-columns: 1fr;
  }

  .structure-card {
    flex-direction: column !important;
    max-height: none !important;
    min-height: 360px !important;
  }

  .structure-card-media {
    width: 100% !important;
    height: 220px !important;
  }

  .structure-card-media-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 75%, var(--bg-card) 100%) !important;
  }
}

/* ===== EXPANDED DETAIL MODAL & RICH POPUP INTERFACES ===== */
.modal-backdrop,
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 1, 2, 0.88);
  backdrop-filter: blur(16px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active,
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window,
.modal-sheet {
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  border-radius: 22px;
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.95), 0 0 60px var(--accent-soft);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
}

.modal-backdrop.active .modal-window,
.modal-overlay.active .modal-sheet {
  transform: scale(1);
}

.pref-modal-window {
  max-width: 520px !important;
}

.pref-reset-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  background: var(--accent-soft) !important;
  color: var(--accent-light) !important;
  border: 1px solid var(--border-bright) !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.pref-reset-btn:hover {
  background: var(--accent) !important;
  color: #ffffff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 18px var(--accent-soft) !important;
  transform: translateY(-2px);
}

/* ===== SEARCH MODAL POSITIONING & UI (TOP PINNED, EXPANDS DOWNWARDS) ===== */
#global-search-modal {
  align-items: flex-start !important;
  padding-top: 80px !important;
}

.search-modal-window {
  max-width: 680px !important;
  width: 100% !important;
  margin: 0 auto !important;
  align-self: flex-start !important;
  max-height: 80vh !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 45px var(--accent-soft) !important;
  overflow: hidden !important;
  background: var(--bg-panel) !important;
  border: 1px solid var(--border-bright) !important;
  transform-origin: top center !important;
}

.search-modal-head {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.search-modal-head svg {
  color: var(--accent-light);
  flex-shrink: 0;
}

.search-modal-head input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.search-modal-head input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.search-results-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  max-height: 65vh;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.search-result-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 16px var(--accent-soft);
}

.search-result-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.search-result-item:hover .search-result-thumb img {
  transform: scale(1.08);
}

.search-result-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.search-result-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-result-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Badge type colors */
.search-result-badge.badge-type-lore {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.search-result-badge.badge-type-item {
  background: var(--accent-soft);
  color: var(--accent-light);
  border: 1px solid var(--border-bright);
}

.search-result-badge.badge-type-enemy {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.search-result-badge.badge-type-structure {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.search-result-meta {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-action {
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-result-item:hover .search-result-action {
  opacity: 1;
  transform: translateX(0);
}

.search-action-hint {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-light);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
}



/* ===== BASE BUTTON SYSTEM ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 700;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.18s ease;
  outline: none;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  border: 1px solid var(--border-soft);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: var(--border);
}

.btn-ghost.active {
  background: var(--accent-soft);
  color: var(--accent-light);
  border-color: var(--accent-soft);
}

.btn-sm {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 7px;
}

/* ===== PREFERENCES MODAL INTERNALS ===== */
.pref-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.pref-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}

.pref-section:last-child {
  border-bottom: none;
}

.pref-section-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Font size control */
.pref-font-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pref-font-val {
  font-weight: 800;
  color: #fff;
  min-width: 46px;
  text-align: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 4px 8px;
  border: 1px solid var(--border-soft);
}



/* Toggle switch */
.pref-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pref-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  border: 1px solid var(--border-soft);
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.pref-toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.2s ease, background 0.2s ease;
}

.pref-toggle:checked {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.pref-toggle:checked::before {
  transform: translateX(18px);
  background: var(--accent-light);
}

.pref-toggle-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

/* Reset button */
.pref-reset-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-soft);
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  transition: all 0.18s ease;
  font-family: inherit;
  margin-top: 4px;
}

.pref-reset-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
}


/* === MODAL HEADER === */
.modal-header {
  padding: 20px 26px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  flex-shrink: 0;
  gap: 16px;
}

.modal-header-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

#modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-title-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-badge-tag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  /* Transparent wrapper — inner span carries the actual badge styling */
}

.modal-subtitle-text {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

/* === MODAL BODY & SCROLL === */
.modal-body-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.modal-body-content::-webkit-scrollbar {
  width: 6px;
}

.modal-body-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* === EXPANDABLE SECTIONS IN POPUP MODALS (ACCORDION) === */
.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item:hover {
  border-color: var(--border-bright);
}

/* Outer border contour & glow when expanded */
.accordion-item.open {
  border-color: var(--accent) !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-soft) !important;
}

.accordion-header {
  padding: 14px 18px;
  font-weight: 700;
  font-size: 14.5px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.accordion-header svg {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  transition: transform 0.25s ease, color 0.2s ease;
}

.accordion-item.open .accordion-header svg {
  transform: rotate(180deg);
  color: var(--accent-light);
}

.accordion-body {
  display: none;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border-soft);
}

.accordion-item.open .accordion-body {
  display: block;
}

/* === MODAL DUAL COLUMN GRID LAYOUT === */
.modal-grid-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 820px) {
  .modal-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* === MODAL LEFT: MEDIA COLUMN === */
.modal-media-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-media-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.25) 0%, rgba(220, 38, 38, 0.05) 55%, #060203 90%);
  border: 1px solid var(--border-bright);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--accent-soft);
}

.modal-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.modal-media-frame:hover img {
  transform: scale(1.04);
}

.modal-media-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(6, 2, 3, 0.5) 100%);
}

.modal-media-badges-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* === MODAL 3D VIEWPORT === */
.modal-3d-canvas-wrap {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  position: absolute;
  inset: 0;
}

.modal-3d-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewport-controls-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 4, 5, 0.75);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
  z-index: 5;
}

.btn-reset-3d-cam {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-dim);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-3d-cam:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* === MODAL RIGHT: DETAILS COLUMN === */
.modal-details-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.modal-stats-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
}

.stat-box-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 700;
}

.stat-box-value {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.modal-description-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.65;
}

.modal-description-box p {
  margin: 0 0 10px;
}

.modal-description-box p:last-child {
  margin-bottom: 0;
}

.modal-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-id-copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-soft);
  padding: 10px 14px;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}

.item-id-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.item-id-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.item-id-code {
  font-family: monospace;
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: var(--accent-light);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-copy-id:hover {
  background: rgba(220, 38, 38, 0.3);
  border-color: var(--accent);
  color: #fff;
}

.btn-copy-id.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #10b981;
}


.modal-sheet-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
}

.modal-sheet-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-sheet-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.modal-sheet-sub {
  font-size: 12.5px;
  color: var(--text-dim);
  font-weight: 500;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: rotate(90deg);
}

.modal-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Structured Dual Column Layout inside Popup Modal */
.detail-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}

.detail-grid.enemy-detail-grid {
  grid-template-columns: 360px 1fr;
}

@media (max-width: 860px) {

  .detail-grid,
  .detail-grid.enemy-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Media detail frame for icons, items & enemies */
.detail-square-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.28) 0%, rgba(245, 158, 11, 0.05) 55%, #060203 90%);
  border: 1px solid var(--border-bright);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--accent-soft);
  position: relative;
  align-self: start;
}

.enemy-detail-grid .detail-square-media {
  background: radial-gradient(circle at center, var(--accent-glow) 0%, var(--accent-soft) 45%, #060203 85%);
}

.detail-square-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.detail-square-media:hover img {
  transform: scale(1.04);
}

/* 3D Model Canvas Container */
.viewer-3d-wrapper {
  width: 100%;
  height: 360px;
  border-radius: 18px;
  background: radial-gradient(circle at center, #2a0f12 0%, #080304 100%);
  border: 1px solid var(--border-bright);
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
}

.viewer-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewer-3d-toolbar {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 4, 5, 0.8);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  z-index: 10;
}

.viewer-3d-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.viewer-3d-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* CARD SECTION DIVIDER UTILITY & RICH POPUP RIGHT SIDE SPECIFICATION PANEL */
.card-section-divider,
.card-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-soft) 20%, var(--border-bright) 50%, var(--border-soft) 80%, transparent 100%);
  margin: 12px 0;
  flex-shrink: 0;
}

.detail-info-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 20px;
  position: relative;
}

.detail-info-panel>div:not(:last-child) {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
}

.spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

.spec-val {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-summary-box {
  background: rgba(220, 38, 38, 0.08);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
}

.spec-summary-box.notice-box {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(185, 28, 28, 0.08) 100%);
  border-left: 3.5px solid #ef4444;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.12);
  margin-top: 12px;
}

/* Accordions / Collapsible info panels & sections inside card detail modals */
.accordion-group,
.modal-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 8px;
}

.accordion-group .accordion-item:last-child,
.modal-accordion-list .accordion-item:last-child {
  margin-bottom: 0;
}

.accordion-item:hover {
  border-color: var(--border-bright);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.accordion-item.open {
  border-color: rgba(220, 38, 38, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-soft);
}

.accordion-header {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
}

.accordion-header svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
  color: var(--accent-light);
}

.accordion-item.open .accordion-header svg {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 16px 20px 10px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
  border-top: 1px solid var(--border-soft);
  display: none;
  background: rgba(0, 0, 0, 0.2);
}

.accordion-body>*:last-child,
.accordion-body .markdown-body>*:last-child,
.accordion-body p:last-child,
.accordion-body ul:last-child,
.accordion-body ol:last-child,
.accordion-body table:last-child,
.accordion-body blockquote:last-child {
  margin-bottom: 0 !important;
}

.accordion-item.open .accordion-body {
  display: block;
  animation: fadeInUp 0.25s ease forwards;
}

/* Crafting grid display */
.crafting-container {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  margin-top: 10px;
}

.crafting-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.crafting-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.crafting-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #fff;
}

/* Video player wrapper */
.video-wrapper {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-bright);
  margin-top: 12px;
}

.video-wrapper video {
  width: 100%;
  max-height: 420px;
  display: block;
}

/* ===== GLOBAL SEARCH MODAL (CTRL+K) ===== */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 1, 2, 0.85);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.search-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-box,
.search-modal-window {
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  border-radius: 18px;
  width: 100%;
  max-width: 650px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px var(--accent-soft);
}

.search-modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
}

.search-modal-input,
#global-search-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 15px;
  color: #fff;
  font-family: inherit;
  outline: none;
  padding: 4px 0;
}

.search-results-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-result-item {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.search-result-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateX(3px);
}

.search-result-type {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-light);
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */
@media (max-width: 900px) {
  :root {
    --sidebar-width: 270px;
  }

  .main-scroll {
    padding: 20px;
  }

  .stats-strip {
    display: none;
  }

  .sidebar-toggle-btn {
    display: flex;
  }

  .sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
  }

  .sidebar.open {
    transform: translateX(0);
  }
}

/* ===== DEV TEAM & CREDITS ROSTER SECTION ===== */
.team-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  margin-bottom: 24px;
}

.team-container,
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {

  .team-container,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {

  .team-container,
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.team-member-card {
  background: linear-gradient(145deg, rgba(24, 11, 13, 0.88) 0%, rgba(13, 5, 7, 0.94) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.team-member-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 25px var(--accent-soft);
}

.team-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.team-avatar-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 2px solid var(--border-bright);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-user-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-user-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}

.team-user-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-2);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  align-self: start;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team-user-bio {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-body);
  line-height: 1.65;
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex: 1;
}

.team-contributions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.team-contrib-chip {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  padding: 3px 9px;
  border-radius: 6px;
}

.team-socials-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.team-social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
}

.team-social-icon-btn:hover {
  color: #fff;
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.team-social-icon-btn.discord:hover {
  color: #5865F2;
  border-color: #5865F2;
  background: rgba(88, 101, 242, 0.15);
}

.team-social-icon-btn.twitter:hover {
  color: #1DA1F2;
  border-color: #1DA1F2;
  background: rgba(29, 161, 242, 0.15);
}

.team-social-icon-btn.github:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.team-social-icon-btn.youtube:hover {
  color: #FF0000;
  border-color: #FF0000;
  background: rgba(255, 0, 0, 0.15);
}

.team-social-icon-btn.website:hover {
  color: var(--accent-light);
  border-color: var(--accent-light);
  background: var(--accent-soft);
}

/* ===== SPECIAL CREDITS MINIMAL SUBTLE SECTION ===== */
.special-credits-wrapper {
  grid-column: 1 / -1;
  margin-top: 24px;
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
}

.special-credits-accordion-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  transition: all 0.2s ease;
}

.special-credits-accordion-head:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border);
}

.special-credits-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.special-credits-arrow {
  display: flex;
  align-items: center;
  color: var(--text-dim);
  transition: transform 0.25s ease;
}

.special-credits-accordion-head.open .special-credits-arrow {
  transform: rotate(180deg);
  color: var(--accent-light);
}

.special-credits-accordion-body {
  padding-top: 14px;
  animation: fadeInUp 0.25s ease forwards;
}

.special-credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.special-credit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.special-credit-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-soft);
}

.special-credit-logo {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 14px;
  background: #060203;
  border: 1.5px solid var(--border-bright);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: all 0.25s ease;
}

.special-credit-card:hover .special-credit-logo {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-soft);
}

.special-credit-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.special-credit-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.special-credit-name {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  line-height: 1.2;
}

.special-credit-contrib {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ==========================================================================
   HOMEPAGE LANDING & MOD CAROUSEL STYLES
   ========================================================================== */
body.landing-body {
  height: auto !important;
  min-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.landing-body #app {
  height: auto !important;
  min-height: 100vh !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
  width: 100% !important;
}

/* ===== BRAND LANDING NAVBAR SYSTEM ===== */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 64px;
  background: rgba(9, 4, 5, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(220, 38, 38, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-sizing: border-box;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s ease;
}

.brand-logo-link:hover .brand-logo-img {
  transform: scale(1.08);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.brand-subtitle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #9ca3af;
  font-weight: 500;
  line-height: 1;
}

.brand-subtitle>* {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.brand-subtitle a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.brand-subtitle a:hover {
  color: #ffffff;
}

.brand-subtitle .sep {
  color: #52525b;
  font-size: 11px;
  font-weight: 400;
  margin: 0 1px;
  opacity: 0.75;
}

.brand-subtitle .crumb-active {
  color: var(--accent-light, #fca5a5);
  font-weight: 600;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-body, #d1d5db);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: #ffffff;
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.2);
}

.btn-wiki-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff !important;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 13px;
  padding: 7px 18px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid rgba(239, 68, 68, 0.6);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
  letter-spacing: 0.05em;
  transition: all 0.25s ease;
  margin-left: 4px;
}

.btn-wiki-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: #ffffff;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .brand-right {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(9, 4, 5, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-soft);
    padding: 20px;
    display: none;
    flex-direction: column;
    z-index: 999;
  }

  .brand-right.nav-open {
    display: flex;
  }

  .landing-nav {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .nav-link,
  .btn-wiki-nav {
    width: 100%;
    justify-content: center;
  }
}

/* ===== HERO LANDING SECTION ===== */
.hero-landing {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 64px);
  min-height: calc(100dvh - 64px);
  background: linear-gradient(180deg, rgba(9, 4, 5, 0.35) 0%, rgba(9, 4, 5, 0.2) 40%, rgba(9, 4, 5, 0.85) 100%),
    url('../media/images/hero_background.webp') center/cover no-repeat,
    url('../media/images/hero_background.gif') center/cover no-repeat;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 80px 24px;
  box-sizing: border-box;
  overflow: hidden;
}

.hero-landing-content {
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  position: relative;
  z-index: 2;
}

.hero-brand-graphic {
  max-width: 440px;
  width: 72%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 15px rgba(220, 38, 38, 0.3));
  transition: transform 0.4s ease;
  user-select: none;
  pointer-events: auto;
}

.hero-brand-graphic:hover {
  transform: scale(1.025);
}

.hero-scroll-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(9, 4, 5, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

.hero-scroll-btn:hover {
  background: rgba(220, 38, 38, 0.25);
  border-color: rgba(220, 38, 38, 0.7);
  color: #ffffff;
  transform: translateX(-50%) translateY(4px);
  box-shadow: 0 0 22px rgba(220, 38, 38, 0.6);
}

/* Hero Landing Responsive Adjustments */
@media (max-width: 900px) {
  .hero-landing {
    min-height: calc(100vh - 64px);
    min-height: calc(100dvh - 64px);
    padding: 30px 20px 70px 20px;
  }
}

@media (max-width: 600px) {
  .hero-landing {
    min-height: calc(100vh - 64px);
    min-height: calc(100dvh - 64px);
    padding: 20px 16px 60px 16px;
  }

  .hero-brand-graphic {
    max-width: 320px;
    width: 82%;
    max-height: 45vh;
  }

  .hero-scroll-btn {
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 400px) {
  .hero-landing {
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
    padding: 16px 12px 50px 12px;
  }

  .hero-brand-graphic {
    max-width: 260px;
    width: 85%;
    max-height: 40vh;
  }
}

@media (max-height: 650px) {
  .hero-landing {
    padding: 16px 16px 50px 16px;
  }

  .hero-brand-graphic {
    max-width: 250px;
    max-height: 35vh;
  }

  .hero-scroll-btn {
    bottom: 12px;
  }
}

/* ===== UNDER DEVELOPMENT CARD CONTAINER STYLES ===== */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 12px #ef4444;
  }

  50% {
    opacity: 0.45;
    transform: scale(0.92);
    box-shadow: 0 0 4px #ef4444;
  }
}

.under-dev-card {
  position: relative;
  z-index: 2;
  max-width: 620px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 36px;
  background: linear-gradient(145deg, rgba(24, 11, 13, 0.88) 0%, rgba(13, 5, 7, 0.94) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.under-dev-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.9);
}

/* ===== PROJECTS SHOWCASE (SIMPLE 16:9 IMAGE LINKS) ===== */
.projects-showcase-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
  box-sizing: border-box;
}

.projects-hero-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  width: 100%;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-img-link {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(220, 38, 38, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
  background: #0d0507;
  cursor: pointer;
}

.project-img-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.project-img-link:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 24px 60px rgba(220, 38, 38, 0.25), 0 20px 50px rgba(0, 0, 0, 0.95);
}

.project-img-link:hover img {
  filter: brightness(1.08);
}

.project-img-link.coming-soon {
  cursor: not-allowed;
  border: 1px dashed rgba(220, 38, 38, 0.4);
  background: linear-gradient(135deg, rgba(28, 11, 14, 0.95) 0%, rgba(10, 4, 6, 0.98) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  user-select: none;
  box-sizing: border-box;
}

.project-img-link.coming-soon:hover {
  transform: none;
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 24px 60px rgba(220, 38, 38, 0.25), 0 20px 50px rgba(0, 0, 0, 0.95);
}

.coming-soon-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--accent-light, #fca5a5);
}

.coming-soon-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 6px 0;
}

.coming-soon-subtitle {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-light, #fca5a5);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.project-img-link.discover-more {
  cursor: pointer;
  border: 1px dashed rgba(220, 38, 38, 0.45);
  background: linear-gradient(135deg, rgba(32, 12, 16, 0.95) 0%, rgba(13, 5, 7, 0.98) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  user-select: none;
  box-sizing: border-box;
}

.project-img-link.discover-more:hover {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 24px 60px rgba(220, 38, 38, 0.25), 0 20px 50px rgba(0, 0, 0, 0.95);
}

/* ===== CUSTOM DROPDOWN COMPONENT ===== */
.custom-dropdown {
  position: relative;
  display: inline-block;
  user-select: none;
}

.custom-dropdown-btn {
  background: linear-gradient(135deg, rgba(28, 11, 14, 0.95) 0%, rgba(14, 5, 7, 0.98) 100%);
  color: #ffffff;
  border: 1px solid rgba(220, 38, 38, 0.35);
  padding: 10px 18px;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  transition: all 0.25s ease;
}

.custom-dropdown-btn:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.2);
}

.custom-dropdown-btn .dropdown-arrow {
  color: var(--accent-light, #fca5a5);
  transition: transform 0.25s ease;
}

.custom-dropdown.open .custom-dropdown-btn .dropdown-arrow {
  transform: rotate(180deg);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  background: linear-gradient(145deg, rgba(22, 8, 10, 0.98) 0%, rgba(10, 3, 5, 0.99) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 10px;
  padding: 6px 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
  z-index: 100;
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.custom-dropdown.open .custom-dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  padding: 10px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-body, #d1d5db);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item.active {
  background: rgba(220, 38, 38, 0.18);
  color: var(--accent-light, #fca5a5);
  padding-left: 22px;
}

/* ===== BLOG ARTICLE READING MODAL ===== */
.blog-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 2, 4, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.blog-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.blog-modal-box {
  background: linear-gradient(145deg, rgba(24, 9, 12, 0.96) 0%, rgba(12, 4, 6, 0.98) 100%);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 20px;
  max-width: 860px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95);
  position: relative;
  box-sizing: border-box;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.blog-modal-backdrop.active .blog-modal-box {
  transform: scale(1);
}

.blog-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-modal-close:hover {
  background: rgba(220, 38, 38, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

/* ===== BLOGS PAGE STYLES (HORIZONTAL LIST LAYOUT) ===== */
.blog-row-item {
  display: flex;
  gap: 28px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(24, 10, 12, 0.85) 0%, rgba(12, 4, 6, 0.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
}

.blog-row-item:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.18), 0 12px 35px rgba(0, 0, 0, 0.85);
}

.blog-row-thumb {
  flex-shrink: 0;
  width: 280px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #0d0507;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.blog-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-row-item:hover .blog-row-thumb img {
  transform: scale(1.04);
}

.blog-row-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  justify-content: space-between;
}

.blog-row-title,
.blog-article-title,
h1.blog-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  line-height: 1.35;
  transition: color 0.3s ease;
}

.blog-row-item:hover .blog-row-title {
  color: var(--accent-light, #fca5a5) !important;
}

/* Embedded Media in Blog Articles (Images & Videos) */
.article-text-body img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  margin: 28px 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  display: block;
}

.article-text-body iframe,
.article-text-body video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  margin: 28px 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  display: block;
  background: #000000;
}

.article-media-caption {
  font-size: 13px;
  color: var(--text-dim, #9ca3af);
  text-align: center;
  margin-top: -16px;
  margin-bottom: 28px;
  font-style: italic;
}

.blog-row-excerpt {
  font-size: 14px;
  color: var(--text-body, #d1d5db);
  line-height: 1.6;
  margin: 0 0 18px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: var(--text-dim, #9ca3af);
}

.blog-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-row-meta .category {
  color: var(--accent-light, #fca5a5);
  font-weight: 600;
}

.blog-row-meta .dot {
  opacity: 0.5;
}

.blog-row-author {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim, #9ca3af);
}

@media (max-width: 768px) {
  .blog-row-item {
    flex-direction: column;
    gap: 16px;
  }

  .blog-row-thumb {
    width: 100%;
  }
}

.blogs-container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
  box-sizing: border-box;
}

.blogs-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.blogs-filter-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-tag-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-body, #d1d5db);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-tag-btn:hover,
.blog-tag-btn.active {
  background: rgba(220, 38, 38, 0.16);
  color: #ffffff;
  border-color: rgba(220, 38, 38, 0.4);
}

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  width: 100%;
}

.blog-card {
  background: linear-gradient(145deg, rgba(26, 11, 13, 0.9) 0%, rgba(13, 5, 7, 0.95) 100%);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
}

.blog-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0507;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-thumb img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-dim, #9ca3af);
  margin-bottom: 10px;
}

.blog-card-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-light, #fca5a5);
  background: var(--accent-soft, rgba(220, 38, 38, 0.15));
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.blog-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.blog-card-excerpt {
  font-size: 13.5px;
  color: var(--text-body, #d1d5db);
  line-height: 1.55;
  margin: 0 0 16px 0;
  flex: 1;
}

.blog-card-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-light, #fca5a5);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== LANDING SECTIONS & CARDS STYLES ===== */
.studio-simple-about {
  padding: 40px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.studio-simple-card {
  position: relative;
  max-width: 860px;
  width: 100%;
  padding: 36px 40px;
  background: linear-gradient(145deg, rgba(24, 11, 13, 0.85) 0%, rgba(13, 5, 7, 0.95) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  text-align: left;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.studio-simple-card:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}

.wiki-portal-banner {
  padding: 16px 24px 44px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.wiki-portal-card {
  position: relative;
  max-width: 860px;
  width: 100%;
  padding: 24px 36px;
  background: linear-gradient(135deg, rgba(35, 12, 16, 0.9) 0%, rgba(13, 5, 7, 0.95) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.wiki-portal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.9);
}

.landing-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-light, #fca5a5);
  background: rgba(220, 38, 38, 0.15);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-logo-box {
  width: 110px;
  height: 110px;
  border-radius: 22px;
  background: var(--bg-panel);
  border: 2px solid var(--border-bright);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 30px rgba(220, 38, 38, 0.4);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition: transform 0.3s ease;
}

.hero-logo-box:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

.hero-logo-box img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero-title span {
  color: var(--accent-light);
  background: linear-gradient(135deg, #ffffff 0%, #fca5a5 60%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 15.5px;
  color: var(--text-body);
  max-width: 740px;
  line-height: 1.6;
}

.hero-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.hero-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(220, 38, 38, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid #ef4444;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
  transition: all 0.25s ease;
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(220, 38, 38, 0.6);
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--border-bright);
  transition: all 0.25s ease;
}

.btn-hero-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* 100VW FULL-WIDTH COVERFLOW CAROUSEL (Center Large Active, Side Prev/Next Scaled & Darkened) */
.carousel-fullwidth-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 28px 0 20px 0;
  box-sizing: border-box;
  scroll-margin-top: 64px;
}

.coverflow-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 530px;
  width: 100%;
  perspective: 1200px;
}

.coverflow-slide {
  position: absolute;
  width: 68vw;
  max-width: 880px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 20px;
  overflow: hidden;
  background: #090405;
  border: 1px solid var(--border-soft);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, filter 0.6s ease, box-shadow 0.6s ease;
  will-change: transform, opacity, filter;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  user-select: none;
}

@media (max-width: 900px) {
  .coverflow-slide {
    width: 88vw;
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .coverflow-stage {
    height: 460px;
  }
}

.coverflow-slide.active {
  transform: translateX(0%) scale(1);
  opacity: 1;
  filter: brightness(1.08);
  z-index: 20;
  border-color: #dc2626;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.95), 0 0 45px rgba(220, 38, 38, 0.45);
}

.coverflow-slide.prev {
  transform: translateX(-56%) scale(0.82);
  opacity: 0.42;
  filter: brightness(0.35);
  z-index: 10;
  cursor: pointer;
}

.coverflow-slide.next {
  transform: translateX(56%) scale(0.82);
  opacity: 0.42;
  filter: brightness(0.35);
  z-index: 10;
  cursor: pointer;
}

.coverflow-slide.hidden-left {
  transform: translateX(-110%) scale(0.65);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.coverflow-slide.hidden-right {
  transform: translateX(110%) scale(0.65);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.coverflow-slide-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  position: absolute;
  inset: 0;
}

.coverflow-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 4, 5, 0) 0%, rgba(9, 4, 5, 0.15) 40%, rgba(9, 4, 5, 0.85) 75%, rgba(9, 4, 5, 0.96) 100%);
  pointer-events: none;
}

.coverflow-slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 32px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}

@media (max-width: 600px) {
  .coverflow-slide-content {
    padding: 20px;
  }
}

.carousel-slide-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.carousel-slide-desc {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
}

/* CAROUSEL CONTROLS */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(17, 7, 8, 0.85);
  border: 1px solid var(--border-bright);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.carousel-nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent-hover);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn.prev {
  left: 16px;
}

.carousel-nav-btn.next {
  right: 16px;
}

.carousel-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator-dot.active {
  width: 28px;
  border-radius: 6px;
  background: var(--accent);
}

/* QUICK WIKI ACCESS GRID */
.wiki-access-section {
  max-width: 1200px;
  margin: 50px auto 60px auto;
  padding: 0 24px;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.access-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.access-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 25px var(--accent-soft);
}

.access-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  transition: all 0.25s ease;
}

.access-card:hover .access-card-icon {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px var(--accent);
}

.access-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.access-card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  padding: 4px 0;
}

.access-card-arrow {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.access-card:hover .access-card-arrow {
  gap: 10px;
  color: var(--accent-hover);
  border-top-color: rgba(220, 38, 38, 0.4);
}

/* ===== EXTRAS TAB STYLES ===== */
.extras-section {
  margin-bottom: 44px;
}

.extras-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.extras-section-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* Awards Grid */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.award-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  height: auto;
}

.award-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--accent-soft);
  background: var(--bg-card-hover);
}

.award-img-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
}

.award-img-wrap img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.award-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.award-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-light);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.award-badge {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.award-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}

.award-event {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-light);
}

.award-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

/* Videos Grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 24px var(--accent-soft);
}

.video-media-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
}

.video-media-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 2px;
}

.video-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-light);
  border: 1px solid var(--border-soft);
}

.video-duration {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
}

.video-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.video-subtitle {
  font-size: 12.5px;
  color: var(--text-dim);
}

/* Media Assets & Wallpapers */
.media-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.media-asset-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.media-asset-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.media-asset-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.media-asset-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.media-asset-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-asset-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.media-asset-download-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.media-asset-card:hover .media-asset-download-icon {
  background: var(--accent);
  color: #ffffff;
}

/* ===== ITEM ID COPY BOX SYSTEM ===== */
.item-id-copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 14px;
  margin-bottom: 6px;
}

.item-id-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.item-id-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.item-id-code {
  font-family: 'Space Grotesk', monospace, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent-light);
  border: 1px solid var(--border-bright);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  user-select: none;
}

.btn-copy-id:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px var(--accent-soft);
}

.btn-copy-id.copied {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
}

/* ===== MOD HERO ACTION BUTTONS ===== */
.btn-download-mod {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 14px var(--accent-soft);
  transition: all 0.22s ease;
}

.btn-download-mod:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-extras-mod {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-light);
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  border: 1px solid var(--border-bright);
  transition: all 0.22s ease;
}

.btn-extras-mod:hover {
  background: var(--accent-soft);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 16px var(--accent-soft);
}

.btn-icon-square {
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  flex-shrink: 0 !important;
}

.btn-hero-award-icon {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

/* =========================================================
   100% RESPONSIVE ADAPTIVE LAYOUT MODULE
   ========================================================= */

/* Body & App Container Responsiveness */
body.landing-body {
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100vh;
}

body.landing-body #app {
  height: auto !important;
  min-height: 100vh;
  overflow: visible !important;
}

/* Tablet & Mobile Screens (max-width: 1024px) */
@media (max-width: 1024px) {
  .sidebar-toggle-btn {
    display: inline-flex !important;
  }

  .sidebar {
    position: fixed !important;
    top: var(--header-height) !important;
    left: 0 !important;
    bottom: 0 !important;
    height: calc(100vh - var(--header-height)) !important;
    width: 290px !important;
    min-width: 290px !important;
    z-index: 999 !important;
    transform: translateX(-100%) !important;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.85) !important;
    background: var(--bg-panel) !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .main-scroll {
    padding: 16px 18px 50px 18px !important;
  }

  .brand-header {
    padding: 0 16px;
  }
}

/* Mobile & Tablet (max-width: 768px) */
@media (max-width: 768px) {
  .stats-strip {
    display: none !important;
  }

  .btn-global-search span:not(:first-child) {
    display: none !important;
  }

  .btn-global-search {
    padding: 7px 10px !important;
  }

  .breadcrumbs {
    font-size: 11px;
  }

  .breadcrumbs .crumb-active {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
  }

  /* Mod Header Stack */
  .mod-header,
  .mod-hero-banner {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 16px !important;
    text-align: left !important;
  }

  .mod-header-right,
  #mod-banner-wrap {
    max-width: 100% !important;
    justify-content: center !important;
    max-height: 120px !important;
  }

  #mod-banner-img {
    max-height: 100px !important;
    width: auto !important;
    max-width: 100% !important;
  }

  /* Toolbar Responsiveness */
  .toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .toolbar-left {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 10px !important;
  }

  .search-input-wrap {
    max-width: 100% !important;
    width: 100% !important;
  }

  .tag-filter-dropdown-wrap {
    width: 100% !important;
  }

  .tag-filter-btn {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .tag-filter-dropdown {
    width: 100% !important;
    min-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
  }

  .toolbar-right {
    width: 100% !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .sort-select {
    flex: 1 !important;
    min-width: 110px !important;
  }

  /* Hero Section */
  .hero-landing {
    min-height: calc(100vh - 64px) !important;
    min-height: calc(100dvh - 64px) !important;
    padding: 24px 16px 60px 16px !important;
  }

  .hero-title {
    font-size: 32px !important;
  }

  .hero-subtitle {
    font-size: 14px !important;
  }

  .hero-actions {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 16px auto 0 auto !important;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100% !important;
    justify-content: center !important;
  }

  .project-hero-actions-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .btn-hero-primary.project-hero-download-btn {
    flex: 1 !important;
    width: auto !important;
    min-width: 0 !important;
  }

  /* Coverflow Stage */
  .coverflow-stage {
    height: 360px !important;
  }

  .coverflow-slide-content {
    padding: 16px 20px !important;
  }

  .coverflow-slide-content h3 {
    font-size: 20px !important;
  }

  .coverflow-slide-content p {
    font-size: 12.5px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Modals Responsiveness */
  .modal-window {
    width: 94vw !important;
    max-height: 90vh !important;
    padding: 16px !important;
    margin: 10px auto !important;
  }

  .modal-grid-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .modal-media-frame {
    max-height: 260px !important;
  }

  #modal-media-img,
  .modal-media-img {
    max-height: 320px !important;
    object-fit: cover !important;
  }

  /* Content Grids */
  .lore-grid-container {
    grid-template-columns: 1fr !important;
  }

  .enemies-container.grid-mode.size-medium,
  .structures-container.grid-mode.size-medium,
  .access-grid,
  .team-grid,
  .awards-grid,
  .videos-grid {
    grid-template-columns: 1fr !important;
  }

  /* Landing Brand Header Nav */
  .brand-header nav {
    gap: 10px !important;
  }

  .brand-header nav a:not(.btn-hero-primary) {
    font-size: 12px !important;
  }
}

/* Small Smartphone Screens (max-width: 480px) */
@media (max-width: 480px) {
  .brand-header {
    padding: 0 10px !important;
  }

  .brand-title {
    font-size: 13px !important;
  }

  .breadcrumbs {
    display: none !important;
  }

  .hero-title {
    font-size: 25px !important;
  }

  .hero-badges-row {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .hero-badge {
    font-size: 9.5px !important;
    padding: 3px 8px !important;
  }

  /* Item Cards Grid 2 per row on small phones */
  .items-container.grid-mode {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .item-card {
    padding: 10px !important;
  }

  .item-card-title {
    font-size: 12px !important;
  }

  .item-desc-snippet {
    display: none !important;
  }

  .nav-tabs {
    padding-bottom: 4px !important;
    margin-bottom: 16px !important;
  }

  .nav-tabs .tab-btn {
    padding: 8px 10px !important;
    font-size: 11.5px !important;
  }

  .modal-window {
    padding: 12px !important;
    border-radius: 12px !important;
  }

  .modal-title-text {
    font-size: 18px !important;
  }

  .item-id-copy-box {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .btn-copy-id {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ===== TOAST NOTIFICATION POPUP SYSTEM ===== */
.toast-notification {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px) scale(0.95);
  z-index: 9999;
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 24px var(--accent-glow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  max-width: 90vw;
  width: 400px;
  backdrop-filter: blur(12px);
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.toast-content {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
}

.toast-content svg {
  color: var(--accent-light);
  flex-shrink: 0;
}

.toast-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  width: 100%;
}

.toast-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 100%;
  box-shadow: 0 0 8px var(--accent);
}

/* Tab Panes Flex Expansion & Stacking Context (Higher than Footer) */
#tab-panes-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 16px;
  position: relative;
  z-index: 20;
}

.tab-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  z-index: 20;
}

.items-container,
.enemies-container,
.structures-container,
.lore-grid,
.team-grid {
  margin-bottom: 32px;
}

/* ===== MINIMALIST GRADIENT FOOTER (STRICTLY ANCHORED AT BOTTOM WITH SEPARATOR) ===== */
.site-footer-minimal {
  margin-top: auto;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(9, 4, 5, 0.7) 0%, rgba(18, 6, 8, 0.95) 40%, rgba(9, 4, 5, 0.99) 100%);
  border-top: 1px solid var(--border-soft);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.7);
  padding: 24px 28px;
  position: relative;
  z-index: 1;
  width: 100%;
  box-sizing: border-box;
}

.site-footer-minimal::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #dc2626 25%, #ef4444 75%, transparent);
  box-shadow: 0 -2px 10px rgba(220, 38, 38, 0.5);
  pointer-events: none;
}

.footer-minimal-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-minimal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-minimal-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.4));
}

.footer-minimal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.footer-minimal-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-icon-btn:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.25);
}

.footer-icon-btn.discord:hover {
  background: rgba(88, 101, 242, 0.18);
  border-color: rgba(88, 101, 242, 0.5);
  color: #5865F2;
  box-shadow: 0 6px 18px rgba(88, 101, 242, 0.35);
}

.footer-icon-btn.twitter:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
}

.footer-icon-btn.instagram:hover {
  background: rgba(228, 64, 95, 0.18);
  border-color: rgba(228, 64, 95, 0.5);
  color: #E4405F;
  box-shadow: 0 6px 18px rgba(228, 64, 95, 0.35);
}

.footer-icon-btn.youtube:hover {
  background: rgba(255, 0, 0, 0.18);
  border-color: rgba(255, 0, 0, 0.5);
  color: #FF0000;
  box-shadow: 0 6px 18px rgba(255, 0, 0, 0.35);
}

.footer-icon-btn.curseforge:hover {
  background: rgba(241, 100, 54, 0.18);
  border-color: rgba(241, 100, 54, 0.5);
  color: #F16436;
  box-shadow: 0 6px 18px rgba(241, 100, 54, 0.35);
}

.footer-minimal-copyright {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

@media (max-width: 768px) {
  .footer-minimal-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .wiki-portal-card {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
    padding: 22px 20px !important;
    gap: 16px !important;
  }

  .wiki-portal-card .btn-wiki-nav {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ===== GLOBAL MOBILE RESPONSIVENESS REFINEMENTS ===== */
@media (max-width: 600px) {
  .brand-subtitle {
    display: none !important;
  }

  .hero-brand-graphic {
    max-width: 84% !important;
    height: auto !important;
  }

  .coverflow-stage {
    height: 340px !important;
  }

  .coverflow-slide {
    width: 92vw !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    border-radius: 14px !important;
  }

  .coverflow-slide-content {
    padding: 16px !important;
    gap: 6px !important;
  }

  .coverflow-slide-content h3 {
    font-size: 19px !important;
  }

  .coverflow-slide-content p {
    font-size: 12px !important;
    line-height: 1.4 !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .projects-hero-header h1,
  .work-hero-title {
    font-size: 26px !important;
  }

  .projects-hero-header p,
  .work-hero-desc {
    font-size: 14px !important;
  }
}

/* ===== PROJECT DETAIL PAGES MOBILE STYLING ===== */
.project-detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 340px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  margin-bottom: 36px;
}

.project-hero-content {
  position: absolute;
  bottom: 32px;
  left: 32px;
  right: 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  z-index: 2;
}

.project-details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 860px) {
  .project-detail-hero {
    min-height: 240px;
    aspect-ratio: auto;
    border-radius: 16px;
    margin-bottom: 24px;
  }

  .project-hero-content {
    bottom: 20px;
    left: 20px;
    right: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .project-hero-content h1 {
    font-size: 28px !important;
  }

  .project-hero-content .btn-wiki-nav {
    width: 100%;
    justify-content: center;
  }

  .project-details-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .studio-simple-card {
    padding: 22px 20px !important;
  }
}

@media (max-width: 480px) {
  .project-detail-main {
    padding: 20px 16px 50px 16px !important;
  }

  .project-detail-hero {
    min-height: 210px;
  }

  .project-hero-content h1 {
    font-size: 24px !important;
  }
}

/* ===== PERFORMANCE & LOW-SPEC DEVICE OPTIMIZATIONS ===== */
.blog-row-item,
.project-img-link,
.position-item,
.coverflow-slide,
.lore-card,
.item-card,
.enemy-card,
.structure-card,
.team-card {
  content-visibility: auto;
  contain-intrinsic-size: 1px 220px;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ===== PROJECT SCREENSHOTS & MEDIA GALLERY ===== */
.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .project-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .project-gallery-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(220, 38, 38, 0.2);
  background: var(--bg-surface-elevated, #170d10);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 38, 38, 0.7);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 4, 5, 0) 0%, rgba(9, 4, 5, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.gallery-action {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-light, #fca5a5);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 6th Card: View All Media */
.gallery-view-all-card {
  background: var(--bg-surface-elevated, #170d10);
  position: relative;
}

.gallery-view-all-card img {
  filter: blur(5px) brightness(0.35);
  transform: scale(1.05);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.gallery-view-all-card:hover img {
  filter: blur(3px) brightness(0.45);
  transform: scale(1.1);
}

.gallery-view-all-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  background: rgba(9, 4, 5, 0.45);
  transition: background 0.3s ease;
}

.gallery-view-all-card:hover .gallery-view-all-content {
  background: rgba(220, 38, 38, 0.25);
}

.view-all-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
}

.gallery-view-all-card:hover .view-all-icon-wrap {
  transform: scale(1.12);
  background: var(--accent-color, #dc2626);
}

.view-all-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.view-all-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-light, #fca5a5);
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Fullscreen Lightbox Viewer */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(9, 4, 5, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(9, 4, 5, 0.85) 0%, rgba(9, 4, 5, 0) 100%);
  z-index: 10;
}

.lightbox-dots-container {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.lightbox-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.lightbox-dot:hover {
  border-color: #ffffff;
  transform: scale(1.2);
}

.lightbox-dot.active {
  background: var(--accent-color, #dc2626);
  border-color: #dc2626;
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.7);
}

.lightbox-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.lightbox-close-btn:hover {
  background: rgba(220, 38, 38, 0.85);
  border-color: #dc2626;
  transform: scale(1.1);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.lightbox-nav-btn.prev-btn {
  left: 28px;
}

.lightbox-nav-btn.next-btn {
  right: 28px;
}

.lightbox-nav-btn:hover {
  background: rgba(220, 38, 38, 0.85);
  border-color: #dc2626;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 24px rgba(220, 38, 38, 0.5);
}

.lightbox-image-wrap {
  max-width: 86vw;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrap img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.lightbox-image-wrap img.changing {
  opacity: 0.2;
  transform: scale(0.96);
}

@keyframes popupZoomIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==========================================================================
   BLOG POST PREVIOUS / NEXT NAVIGATION STYLES
   ========================================================================== */
.blog-nav-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.blog-nav-card:hover {
  background: rgba(26, 31, 39, 0.9) !important;
  border-color: rgba(220, 38, 38, 0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(220, 38, 38, 0.18) !important;
}

.blog-nav-card:hover .blog-nav-title {
  color: var(--accent-light, #fca5a5) !important;
}

.blog-nav-card.prev:hover .blog-nav-arrow-left {
  transform: translateX(-5px);
}

.blog-nav-card.next:hover .blog-nav-arrow-right {
  transform: translateX(5px);
}

/* ==========================================================================
   BLOG HIGHLIGHTED WORDS & HIGHLIGHTED LINKS STYLES
   ========================================================================== */

/* Static Highlighted Word */
mark.blog-highlight,
.blog-highlight {
  background: transparent;
  color: #fca5a5;
  border: none;
  padding: 0;
  font-weight: 700;
}

/* Interactive Clickable Highlighted Link */
a.blog-highlight-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  color: #ef4444;
  border: none;
  padding: 0;
  margin: 0 1px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  vertical-align: baseline;
}

a.blog-highlight-link:hover {
  background: transparent;
  color: #fca5a5;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
  box-shadow: none;
  transform: none;
}

a.blog-highlight-link .blog-highlight-icon {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.85;
}

a.blog-highlight-link:hover .blog-highlight-icon {
  opacity: 1;
  transform: translate(1px, -1px);
}

a.blog-highlight-link:active {
  color: #dc2626;
}

/* Blog Article Subheadings / Section Titles */
.article-text-body h1,
.article-text-body h2,
.article-text-body h3,
.article-section-title {
  font-family: 'Space Grotesk', sans-serif !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border-left: 4px solid var(--accent, #dc2626) !important;
  padding-left: 14px !important;
  margin: 38px 0 18px 0 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
}

.article-text-body h1 { font-size: 32px !important; }
.article-text-body h2, .article-section-title { font-size: 26px !important; }
.article-text-body h3 { font-size: 21px !important; }

/* ===== PERFORMANCE & CONTENT VISIBILITY OPTIMIZATIONS ===== */
.project-card,
.mod-card,
.blog-card,
.entity-card,
.award-badge-card {
  content-visibility: auto;
  contain-intrinsic-size: 1px 320px;
  will-change: transform;
}

img {
  content-visibility: auto;
}

/* ===== COMPACT PROJECT HERO DOWNLOAD BUTTON ===== */
.project-hero-actions-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  width: fit-content !important;
  max-width: 100% !important;
}

.btn-hero-primary.project-hero-download-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: fit-content !important;
  height: 44px !important;
  padding: 0 22px !important;
  font-size: 13.5px !important;
}
