@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");

@font-face {
  font-family: "TrajanPro";
  src: url("../fonts/TrajanPro-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "TrajanPro";
  src: url("../fonts/TrajanPro-Bold.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
}

/* ------------------
   THEME TOKENS
-------------------*/
:root {
  --bg-1: #0f0f10;
  --bg-2: #171819;
  --bg-3: #1f2022;

  --ink-1: #f2f2f3;
  --ink-2: #cfcfd3;
  --ink-3: #9aa0a6;

  --stroke: #2a2b2e;
  --stroke-soft: #242527;
  --accent: #c56a2d;

  --radius-lg: 12px;
  --radius-sm: 10px;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
}

/* ------------------
   BASE
-------------------*/
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "TrajanPro", serif;
  background: var(--bg-1);
  color: var(--ink-2);
  overflow: hidden;
  /*display: flex;           ✅ allows two-column layout */
}

body.home-active main {
  overflow: hidden; /* block scroll only in home */
}

/* ------------------
   LAYOUT
-------------------*/
.sidebar {
  width: 220px;
  background: var(--bg-2);
  border-right: 1px solid var(--stroke);
  padding: 16px 14px;
  box-sizing: border-box;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  z-index: 20;
}

.main-wrapper {
  margin-left: 220px;
  /* width calc removed to prevent layout breakages with fixed sidebar */
}

.topbar {
  height: 48px;
  background: #202122;
  border-bottom: 1px solid var(--stroke);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

main {
  padding: 24px;
  background: #181818;
  height: calc(100vh - 44px);
  overflow-y: auto;
  box-sizing: border-box;
}

.section {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 20px;
}

/* ------------------
   SIDEBAR: HEADER
-------------------*/
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--stroke-soft);
  margin-bottom: 18px;
  gap: 8px;
}
.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.app-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-transform: lowercase;
}

/* ------------------
   SIDEBAR: QUICK ACTIONS (horizontal icons)
-------------------*/

.icon-btn {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
}
.icon-btn i {
  font-size: 18px;
  line-height: 1;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.icon-btn:active {
  transform: translateY(1px);
}

/* Support legacy classes used in your markup */
.sidebar-links,
.sidebar-links.compact-icons {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

/* Divider + section title */
.sidebar-divider {
  height: 1px;
  background: var(--stroke-soft);
  margin: 14px 0 10px;
}
.sidebar-title {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin: 6px 0 10px;
  text-transform: uppercase;
  margin-top: 6px;
  margin-bottom: 8px;
  padding-bottom: 2px;
}

/* ------------------
   SIDEBAR: MENU ITEMS
-------------------*/
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.87rem;
  padding: 8px 10px;
  border-radius: 8px;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.08s;
}
.sidebar-item:hover {
  background: var(--bg-3);
  color: var(--ink-1);
  transform: translateX(2px);
}
.sidebar-item.is-active {
  background: #3a3b3a;
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}
a:hover {
  color: #e69b50; /* brighter for hover */
  text-shadow: 0 0 8px rgba(197, 106, 45, 0.4);
}

/* ------------------
   TOPBAR: INPUT AND BUTTONS
-------------------*/

.topbar {
  height: 44px;
  padding: 0 14px;
  background: #18191b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar .btn-primary {
  font-size: 0.85rem;
  padding: 6px 12px;
  height: 32px;
  border-radius: 8px;
}

.topbar label {
  margin: 0;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topbar input[type="file"] {
  background: #2a2a2a;
  color: white;
  border: 1px solid #444;
  padding: 6px 10px;
  border-radius: 6px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease;
}
.btn-primary:hover {
  background: #a95b22; /* deeper version */
  box-shadow: 0 0 12px rgba(197, 106, 45, 0.4);
}

/* ------------------
   GRID & CARDS
-------------------*/
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.boss {
  background: var(--bg-3);
  border: 1px solid var(--stroke-soft);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  position: relative; /* REQUIRED for spoiler overlay */
  transition:
    transform 0.08s,
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  overflow: visible; /* ✅ prevents text clipping */
}

.boss .title,
.boss div {
  text-align: center;
  white-space: normal; /* ✅ allows long names to wrap */
  word-break: break-word; /* ✅ forces word break if too long */
  line-height: 1.2em;
  max-width: 90%; /* ✅ prevents touching edges */
}

.boss:hover {
  border-color: #3b3d40;
  transform: translateY(-1px);
}
.boss img {
  width: 64px;
  height: 64px;
  margin: 8px auto 10px;
  object-fit: contain;
  filter: none;
  z-index: 1; /* image above label */
}

/* SPOILER / LOCKED STATE */
.boss.locked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  pointer-events: none; /* don't block clicks on reveal buttons */
}

.boss .title {
  color: var(--ink-1);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  white-space: normal; /* ✅ Allows line wrapping */
  overflow: visible; /* ✅ Shows everything */
  text-overflow: unset; /* ✅ No "..." */
  text-align: center;
}

.boss .subtitle {
  display: none;
}

/* ------------------
   MODAL & OVERLAY
-------------------*/
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.overlay.hidden {
  display: none;
}

.modal {
  width: min(640px, 92vw);
  background: #1a1a1a;
  border: 1px solid #2c2c2c;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  padding: 16px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px 14px;
}
.modal-header h3 {
  margin: 0;
  color: #fff;
}
.modal-close {
  background: transparent;
  color: #bbb;
  border: 0;
  font-size: 18px;
  cursor: pointer;
}
.modal-close:hover {
  color: #fff;
}

/* ------------------
   DROPZONE
-------------------*/
.dropzone {
  border: 2px dashed #444;
  border-radius: 12px;
  height: 220px;
  display: grid;
  place-items: center;
  color: #bbb;
  background: #161616;
  outline: none;
}
.dropzone:hover {
  border-color: #595959;
}
.dropzone.dragover {
  border-color: var(--accent);
  background: #151a24;
  color: #dbe5ff;
}

/* ------------------
   HELP / PILLS
-------------------*/
.help {
  margin-top: 18px;
}
.help h4 {
  margin: 0 0 4px 0;
  color: #fff;
}
.help .muted {
  color: #a3a3a3;
  margin: 0 0 10px 0;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: #242424;
  border: 1px solid #333;
  border-radius: 10px;
  color: #ddd;
  text-decoration: none;
  cursor: default;
}
.pill:hover {
  background: #2a2a2a;
  cursor: pointer;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #333;
  margin-bottom: 1.5rem;
}
.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.app-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-transform: lowercase;
}

.boss.done {
  border: 2px solid #2ecc71; /* bright green */
  box-shadow: 0 0 6px rgba(46, 204, 113, 0.4);
}

.boss.unlocked {
  filter: grayscale(1) contrast(0.85);
  opacity: 0.7;
}

.boss.unlocked:hover {
  filter: grayscale(0.6) contrast(1);
  opacity: 0.9;
}

.boss.locked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
}

.boss.locked:hover::after {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(0px);
}

.tab.hidden {
  display: none;
}

.main-section-block {
  margin-bottom: 2rem;
}

.desc {
  color: var(--ink-2);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.item-list {
  list-style: none;
  padding-left: 0;
}
.item-list li {
  margin: 4px 0;
  font-size: 0.95rem;
}
.status {
  display: inline-block;
  width: 24px;
  text-align: center;
}

.boss.hovering::after {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(0px);
}

#home-section {
  position: fixed; /* stays fixed on screen */
  inset: 0; /* covers entire screen */
  background-image: url("../icons/sfondo1.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  text-align: center;
  cursor: default;
  z-index: 1;
}

#home-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

#home-section .home-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10vh 2rem 14vh;
  text-align: center;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.overlay.hidden {
  display: none;
}

#info-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#info-overlay.hidden {
  display: none;
}

#info-content.modal {
  background: #1a1a1a;
  padding: 30px;
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  color: #fff;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  position: relative;
  font-family: "TrajanPro-Regular", serif;
}

#info-content .info-image {
  max-width: 72px;
  margin: 0 auto 18px;
  display: block;
}

#info-content .info-title {
  font-family: "TrajanPro-Bold", serif;
  font-size: 1.4rem;
  margin: 0 0 12px;
  text-transform: uppercase;
}

#info-content .info-description {
  font-size: 1rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.info-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: #aaa;
  cursor: pointer;
}

.modal-close:hover {
  color: white;
}

.info-extra {
  color: var(--ink-2);
  font-size: 0.95rem;
  margin: 6px 0;
}

/* Makes category blocks side by side horizontally */
#main-grid {
  display: block;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

/* Each category block has fixed width */
.main-section-block {
  flex: 1 1 300px;
  min-width: 280px;
  margin-bottom: 2rem;
  padding-top: 0; /* ✅ remove space above title */
}

/* The subcategory title */
.main-section-block h3 {
  font-size: 1.2rem;
  color: var(--ink-1);
  margin-top: 0; /* ✅ remove space above */
  margin-bottom: 2rem; /* small space below */
  line-height: 1.2;
}

/* Grid of objects inside each block */
.main-section-block .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.info-map {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 16px;
}

.info-link-wrapper {
  margin: 10px 0;
}

.tab > h2 {
  margin-top: 0; /* remove space above */
  padding-top: 0; /* avoid extra offset */
  margin-bottom: 1.2rem; /* clean space below */
  font-size: 1.5rem; /* slightly larger */
  color: var(--ink-1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-section-block h3 {
  font-size: 1.1rem;
  color: var(--ink-1);
  margin: 0 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--stroke-soft); /* elegant underline */
}

.main-stats {
  display: flex;
  gap: 2rem;
  margin: 0 0 1.5rem;
  padding: 0.8rem 1.2rem;
  background: var(--bg-2);
  border: 1px solid var(--stroke-soft);
  border-radius: 10px;
  color: var(--ink-1);
  font-size: 1rem;
  font-weight: 600;
}

.main-stats .label {
  color: var(--ink-3);
  margin-right: 0.3rem;
  font-weight: 400;
}

.completion-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.5rem 0;
  gap: 1rem;
}

.circular-progress {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg, #333 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.circular-progress span {
  position: absolute;
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--ink-1);
}

.playtime-text {
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 500;
}

.variant-hidden {
  filter: grayscale(1);
  opacity: 0.3;
  pointer-events: none; /* optional, if you want to disable click */
}

.main-section-block h3 {
  text-align: center; /* center the title */
  font-size: 1.6rem; /* slightly larger */
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px; /* space between title and percentage */
}

.category-desc {
  text-align: center; /* center the description */
  font-size: 1rem;
  color: #bbb;
  margin-bottom: 1.5rem;
  max-width: 600px; /* limits width for readability */
  margin-left: auto;
  margin-right: auto;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 1rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.toggle input {
  accent-color: #888; /* check color */
  transform: scale(1.2); /* larger */
}

.main-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #ddd;
}

.main-stats .label {
  font-variant: small-caps;
  margin-right: 0.3rem;
  color: #aaa;
}

.main-stats div {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.app-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

#essentials-grid {
  display: block;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

#essentials-grid .main-section-block {
  flex: 1 1 300px;
  min-width: 280px;
  margin-bottom: 2rem;
  padding-top: 0;
}

.sidebar-wiki-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px; /* tighter spacing */
  width: 100%;
  padding: 8px 12px; /* similar proportions to others */
  font-size: 0.9rem; /* slightly smaller */
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke-soft);
  border-radius: 8px; /* same as other buttons */
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.1s;
}

.sidebar-wiki-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #666;
  transform: translateY(-1px);
}

.sidebar-wiki-btn i {
  font-size: 1rem;
  opacity: 0.9;
}

.home-content {
  max-width: 1100px;
  margin: 6vh auto;
  padding: 40px;
  color: #ddd;
  text-align: center;
}

.home-content h1 {
  font-size: 2.4em;
  color: #fff;
  margin-bottom: 20px;
}

.intro {
  max-width: 800px;
  margin: 0 auto 40px auto;
  font-size: 1.05em;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 40px;
  align-items: start;
  justify-content: center;
}

.home-section-block {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  padding: 25px 35px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  line-height: 1.7;
}

.home-section-block h2,
.home-section-block h3 {
  color: #fff;
  margin-bottom: 15px;
}

.home-section-block ol {
  margin-left: 25px;
}

.home-section-block li {
  margin-bottom: 10px;
}

.home-credits {
  margin-top: 20px;
  font-size: 0.95em;
  opacity: 0.9;
}

.home-credits a {
  color: #8ab4f8;
  text-decoration: none;
}

.home-credits a:hover {
  text-decoration: underline;
}

.home-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 60px;
  margin-top: 60px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.home-section-block {
  flex: 1 1 420px;
  max-width: 480px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  padding: 25px 35px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  line-height: 1.7;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Alternating offset */
.home-section-block:nth-child(odd) {
  transform: translateY(-25px);
}
.home-section-block:nth-child(even) {
  transform: translateY(25px);
}

.home-section-block:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.08);
}

.home-content {
  padding-bottom: 12vh;
}

/* ------------------
   HOME SECTION
-------------------*/

#home-section .home-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10vh 2rem 14vh;
  text-align: center;
}

.home-content h1 {
  font-size: 2.4em;
  color: #fff;
  margin-bottom: 20px;
}

.intro {
  max-width: 800px;
  margin: 0 auto 40px auto;
  font-size: 1.05em;
}

/* ✅ New staggered responsive layout */
.home-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 50px;
  margin-top: 60px;
}

.home-section-block {
  flex: 1 1 45%; /* due colonne fino a ~1000px */
  max-width: 520px;
  min-width: 360px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  padding: 25px 35px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  line-height: 1.7;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Staggered effect */
.home-section-block:nth-child(odd) {
  transform: translateY(-20px);
}
.home-section-block:nth-child(even) {
  transform: translateY(20px);
}

/* Light hover */
.home-section-block:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.08);
}

/* Responsive mobile - everything in column */
@media (max-width: 900px) {
  .home-grid {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .home-section-block {
    flex: 1 1 100%;
    max-width: 600px;
    transform: none !important;
  }
}

/* ------------------
   TAB LAYER FIX
-------------------*/
.tab {
  position: relative;
  z-index: 2; /* above home background */
  display: block;
}

.tab.hidden {
  display: none !important;
}

#home-section.tab {
  position: fixed;
  inset: 0;
  z-index: 1; /* home stays below other sections */
}

/* Background for other tabs */
main {
  background: var(--bg-1);
  min-height: calc(100vh - 44px);
  color: var(--ink-2);
  z-index: 3;
}

/* ------------------
   HOME REWORKED
-------------------*/
.home-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10vh 2rem 14vh;
  text-align: center;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 50px;
  margin-top: 60px;
  justify-content: center;
  align-items: start;
}

.home-section-block {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  padding: 30px 40px;
  border-radius: 14px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  text-align: left;
  line-height: 1.7;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.home-section-block:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.08);
}

.home-section-block h2 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-section-block h3 {
  color: #e6e6e6;
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.status-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin: 8px 0 12px;
}

.home-section-block a {
  color: #8ab4f8;
  text-decoration: none;
}
.home-section-block a:hover {
  text-decoration: underline;
}

.tribute {
  grid-column: 1 / -1; /* spans horizontally for emphasis */
  text-align: center;
}

.tribute h2 {
  color: #ffdddd;
  letter-spacing: 0.04em;
}
.tribute p {
  max-width: 700px;
  margin: 0.5rem auto;
}

.muted {
  font-size: 0.9em;
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .tribute {
    grid-column: auto;
  }
}

/* ------------------
   HOME CINEMATIC
-------------------*/

.home-content.cinematic {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10vh 2rem 14vh;
  text-align: center;
  animation: fadeInScene 1s ease forwards;
}

.intro-block {
  margin-bottom: 60px;
  animation: fadeUp 1s ease forwards;
}

.intro-block h1 {
  font-size: 2.4em;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.intro-block p {
  max-width: 700px;
  margin: 0 auto;
  color: #ccc;
  line-height: 1.6;
}

.cinematic-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.home-section-block {
  flex: 1 1 45%;
  min-width: 350px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(5px);
  padding: 30px 40px;
  border-radius: 14px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  text-align: left;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1s ease forwards;
}

.home-section-block:nth-of-type(2) {
  animation-delay: 0.3s;
}
.tribute {
  margin-top: 60px;
  text-align: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 40px 50px;
  animation-delay: 0.6s;
}

.home-section-block h2 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-section-block h2 i {
  opacity: 0.8;
}

.status-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin: 10px 0 14px;
}

.tribute h2 {
  color: #ffdddd;
  letter-spacing: 0.04em;
}
.tribute p {
  max-width: 700px;
  margin: 0.5rem auto;
}
.muted {
  font-size: 0.9em;
  opacity: 0.6;
}

.home-section-block a {
  color: #8ab4f8;
  text-decoration: none;
}
.home-section-block a:hover {
  text-decoration: underline;
}

/* ✨ Animations */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInScene {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .cinematic-grid {
    flex-direction: column;
    align-items: center;
  }
  .home-section-block {
    flex: 1 1 100%;
    max-width: 600px;
    text-align: center;
  }
  .home-section-block h2 {
    justify-content: center;
  }
}

/* ------------------
   HOME TRIANGULAR LAYOUT
-------------------*/
.home-content.cinematic {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10vh 2rem 14vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro-block {
  margin-bottom: 80px;
}

.cinematic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
  justify-content: center;
  margin-bottom: 80px;
}

/* main blocks side by side */
.home-section-block {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  border-radius: 14px;
  padding: 30px 40px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  text-align: left;
  line-height: 1.7;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.home-section-block:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.08);
}

/* dynamic positioning */
.cinematic-left {
  transform: translateY(-30px);
}
.cinematic-right {
  transform: translateY(30px);
}

/* in memory central and wide */
.tribute {
  grid-column: 1 / -1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.45);
  color: #f5dddd;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px 50px;
}

.status-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin: 10px 0 14px;
}

/* Responsive fix */
@media (max-width: 900px) {
  .cinematic-grid {
    grid-template-columns: 1fr;
  }

  .cinematic-left,
  .cinematic-right {
    transform: none;
  }

  .tribute {
    max-width: 90%;
  }
}

.home-section-block h2 i {
  color: var(--accent);
}

main a,
.home-section-block a,
.home-credits a,
.info-link {
  color: var(--accent) !important;
  text-decoration: none;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

main a:hover,
.home-section-block a:hover,
.home-credits a:hover,
.info-link:hover {
  color: #e69b50 !important;
  text-shadow: 0 0 8px rgba(197, 106, 45, 0.4);
}

.category-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.category-count {
  font-size: 0.9em;
  color: var(--ink-3);
}

/* MAIN% - centered and compact title */
#main-section .category-title {
  display: block; /* cancel flex if present */
  text-align: center;
  width: 100%;
  margin-bottom: 0.3rem;
}

#main-section .category-title .category-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* reset margin auto used elsewhere */
#main-section .category-title .category-count,
#main-section .category-title {
  margin: 0 0 0 0.25rem; /* small space between parts */
  position: static;
  display: inline; /* ensures inline centering */
  vertical-align: baseline;
}

/* percentage pill */
#main-section .category-title {
  background: var(--bg-3);
  color: var(--ink-2);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.8em;
}

/* --- Custom checkboxes --- */
input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}

/* ✅ Optional: borders consistent with theme */
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid var(--stroke);
  background-color: var(--bg-2);
  transition: all 0.2s ease;
}

/* ✅ When active (orange checkmark) */
input[type="checkbox"]:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

/* ✅ Hover */
input[type="checkbox"]:hover {
  border-color: var(--accent);
  box-shadow: 0 0 4px var(--accent);
}

/* --- Custom cursor --- */
html,
body {
  cursor:
    url("../misc/Cursor_32px.png") 8 8,
    auto;
}

/* When hovering over links or buttons */
a,
button,
.btn-primary,
.sidebar-item,
.icon-btn {
  cursor:
    url("../misc/Cursor_32px.png") 8 8,
    pointer;
}

/* --- FIX HOME LAYOUT ON SMALL SCREENS --- */
@media (max-width: 1400px) {
  .main-wrapper {
    margin-left: 240px; /* prevents text from going under sidebar */
  }

  .home-content {
    padding: 0 2rem;
  }

  .home-content h1 {
    font-size: 2.3rem;
    line-height: 1.3;
    text-align: center;
    word-break: break-word;
  }

  .home-section-block {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 1000px) {
  .sidebar {
    width: 220px;
    background: var(--bg-2);
    border-right: 1px solid var(--stroke);
    padding: 16px 14px;
    box-sizing: border-box;
    height: 100vh;
    position: fixed; /* 🔒 must stay fixed even on mobile */
    left: 0;
    top: 0;
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 20;
  }

  .main-wrapper {
    flex: 1;
    overflow-y: auto;
    height: 100vh;
    margin-left: 220px; /* ✅ maintain right alignment */
  }

  .home-content h1 {
    font-size: 1.8rem;
  }
}

html {
  font-display: swap;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.25s ease;
}

.overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.overlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

#boss-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#boss-grid .main-section-block {
  width: 100%;
}


.quest {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding: 10px;
  text-align: center;
}

.quest img {
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
}

/* ------------------
   WISHES - clean and consistent layout
-------------------*/
#wishes-grid {
  display: flex;
  flex-direction: column; /* stack categories vertically */
  gap: 60px; /* space between Main / Wayfarer / Gather */
  align-items: stretch;
  width: 100%;
}

/* Ogni gruppo principale */
#wishes-grid .main-section-block {
  flex: 1 1 auto;
  background: none;
  border: none;
  padding-top: 0;
  text-align: center;
}

/* Titolo e conteggio */
#wishes-grid .main-section-block h3 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink-1);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

/* Description below title */
#wishes-grid .category-desc {
  text-align: center;
  color: #bbb;
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Griglia interna delle card */
#wishes-grid .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  justify-content: center;
}

/* Le card usano lo stile .boss globale - niente override */

/* Dark scrollbar per main */
main::-webkit-scrollbar {
  width: 10px;
}
main::-webkit-scrollbar-track {
  background: #111;
}
main::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 6px;
}
main::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* Firefox */
main {
  scrollbar-width: thin;
  scrollbar-color: #555 #111;
}

.boss.accepted {
  border: 2px solid #f1c40f; /* golden yellow */
  box-shadow: 0 0 6px rgba(241, 196, 15, 0.5);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

#act-filter {
  display: flex;
  align-items: center;
  gap: 6px;
}

#act-filter label {
  font-weight: 600;
  color: var(--ink-2);
}

#act-filter select {
  background: var(--bg-3);
  border: 1px solid var(--stroke);
  color: var(--ink-1);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-family: inherit;
}

.grid i {
  margin-right: 6px;
  font-size: 0.9em;
  opacity: 0.9;
}

/* --- Act visual indicator --- */
.boss {
  position: relative;
  margin-top: 26px; /* space for badge above */
}

.act-label {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "TrajanPro", serif;
  font-size: 0.7rem; /* same size as before */
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: bold;
  padding: 2px 7px; /* more compact */
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  opacity: 1;
  text-shadow:
    0 0 6px rgba(0, 0, 0, 0.9),
    0 0 10px currentColor;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  z-index: 5;
}

/* Light hover */
.act-label:hover {
  transform: translate(-50%, 0) scale(1.05);
  transform-origin: center;
}

/* 🌈 Active label colors */
.act-1.act-label {
  color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}
.act-2.act-label {
  color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}
.act-3.act-label {
  color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* ⚙️ When spoiler is active → labels dimmed */
body.spoiler-on .act-label {
  color: #bdbdbd !important;
  box-shadow: none !important;
  opacity: 0.6;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

/* ✨ Soft realistic glow Hollow Knight style */
body.spoiler-on .boss:hover .act-label.act-1 {
  color: #ffffff;
  opacity: 1;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.8),
    0 0 12px rgba(255, 255, 255, 0.4);
}
body.spoiler-on .boss:hover .act-label.act-2 {
  color: #ffffff;
  opacity: 1;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.8),
    0 0 12px rgba(255, 255, 255, 0.5);
}
body.spoiler-on .boss:hover .act-label.act-3 {
  color: #ffffff;
  opacity: 1;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.8),
    0 0 12px rgba(255, 255, 255, 0.4);
}

/* ------------------
   COMPLETION - consistent layout
-------------------*/
#completion-grid {
  display: flex;
  flex-direction: column;
  gap: 60px;
  align-items: stretch;
  width: 100%;
}

/* Each main block */
#completion-grid .main-section-block {
  flex: 1 1 auto;
  background: none;
  border: none;
  padding-top: 0;
  text-align: center;
}

/* Titolo e conteggio */
#completion-grid .main-section-block h3 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink-1);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

/* Description below title */
#completion-grid .category-desc {
  text-align: center;
  color: #bbb;
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Griglia interna delle card */
#completion-grid .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  justify-content: center;
}

/* --- Dynamic coloring for boss state --- */
.boss.done .act-label {
  color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
  opacity: 1;
}

.boss.unlocked .act-label {
  color: #ccc;
  opacity: 0.85;
}

.boss.locked .act-label {
  color: #666;
  opacity: 0.6;
}

.boss.done .act-label.act-1 {
  color: #fff;
  box-shadow: 0 0 6px #fff;
}
.boss.done .act-label.act-2 {
  color: #b2f0ff;
  box-shadow: 0 0 8px rgba(178, 240, 255, 0.6);
}
.boss.done .act-label.act-3 {
  color: #baffb5;
  box-shadow: 0 0 8px rgba(186, 255, 181, 0.6);
}

/* 🔧 FIX: Visible colors for completed bosses */
.boss.done .act-label {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

.boss.done .act-label.act-1 {
  color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.boss.done .act-label.act-2 {
  color: #a4e3ff;
  box-shadow: 0 0 8px rgba(164, 227, 255, 0.6);
}

.boss.done .act-label.act-3 {
  color: #9fff9f;
  box-shadow: 0 0 8px rgba(159, 255, 159, 0.6);
}

/*  locked remain dark */
.boss.locked .act-label {
  color: #666 !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
  opacity: 0.6;
}

/*  unlocked but not done: neutral */
.boss.unlocked .act-label {
  color: #ccc;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  opacity: 0.9;
}

/*  Disable any hover or glow effects on ACT labels */
.act-label,
.act-label:hover,
.boss.done .act-label:hover,
.boss.unlocked .act-label:hover,
.boss.locked .act-label:hover {
  transform: translate(-50%, 0) !important;
  filter: none !important;
  opacity: 1 !important;
  color: #ffffff !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: none !important;
}

#home-section .home-content {
  overflow-y: auto;
  max-height: 100vh;
  padding-bottom: 14vh; /* ✅ more dynamic space */
  margin-bottom: 4vh; /* ✅ small extra buffer */
  scroll-padding-bottom: 100px; /* for scroll safety */
}

#boss-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tribute {
  margin-bottom: 10vh;
}

/* ------------------
   GENERIC HIDDEN UTILITY
-------------------*/
.hidden {
  display: none !important;
}

#modeBanner.hidden {
  opacity: 0;
  pointer-events: none;
}

#modeBanner.steel {
  color: #9aa7b1;
  text-shadow:
    0 0 6px #ccd5db,
    0 0 12px #596066;
}

#modeBanner .mode-icon {
  height: 20px;
  width: 20px;
  vertical-align: middle;
  margin-right: 8px;
  transform: translateY(-1px);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
}

.sidebar-title {
  font-family: "TrajanPro", serif;
  font-size: 0.9rem;
  color: var(--accent);
  background: rgba(197, 106, 45, 0.15); /* leggero fondo ambrato */
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  margin: 20px 0 10px 0;
  font-weight: 600;
}

.rawsave-container {
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 20px 25px;
  color: var(--ink-2);
  font-family: "Inter", monospace;
  overflow-x: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.rawsave-container h2 {
  font-family: "TrajanPro", serif;
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 15px;
}

#rawsave-output {
  background: var(--bg-3);
  color: var(--ink-1);
  border-radius: var(--radius-sm);
  padding: 15px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.4;
}

.rawsave-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.rawsave-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rawsave-btn {
  background: var(--accent);
  color: var(--bg-1);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rawsave-btn:hover {
  background: #e38b48;
}

.rawsave-search {
  background: var(--bg-3);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  color: var(--ink-1);
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  width: 130px;
}

.rawsave-search:focus {
  outline: none;
  border-color: var(--accent);
}
.search-counter {
  color: var(--ink-3);
  font-size: 0.8rem;
  min-width: 45px;
  text-align: center;
}

.rawsave-container {
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  color: var(--ink-2);
  font-family: "Inter", monospace;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
}

/* Fixed command bar */
.rawsave-header {
  position: sticky;
  top: 0;
  background: var(--bg-3);
  padding: 10px 15px;
  border-bottom: 1px solid var(--stroke);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Scrollable content section */
.rawsave-output {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-1);
  color: var(--ink-1);
  font-family: monospace;
  padding: 60px 25px 25px; /* ⬅️ added padding-top to avoid overlap */
  line-height: 1.4;
  font-size: 0.9rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  position: relative;
}

.rawsave-container {
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Fixed bar at top */
.rawsave-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(31, 32, 34, 0.85); /* same theme color, but translucent */
  backdrop-filter: blur(6px); /* ✨ glass effect */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--stroke);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Consistent title */
.rawsave-header h2 {
  font-family: "TrajanPro", serif;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  font-size: 1rem;
}

/* Actions on the right */
.rawsave-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Search input */
.rawsave-search {
  background: var(--bg-3);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  color: var(--ink-1);
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  width: 130px;
}

.rawsave-search:focus {
  outline: none;
  border-color: var(--accent);
}

/* Buttons */
.rawsave-btn {
  background: var(--accent);
  color: var(--bg-1);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rawsave-btn:hover {
  background: #e38b48;
}

/* Results counter */
.search-counter {
  color: var(--ink-3);
  font-size: 0.8rem;
  min-width: 45px;
  text-align: center;
}

/* Scrollable content */
#rawsave-output {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-1);
  color: var(--ink-1);
  font-family: monospace;
  padding: 30px 25px; /* 🔥 sufficient space below header */
  line-height: 1.4;
  font-size: 0.9rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  position: relative;
}

/* Search highlighting */
mark.search-match {
  background: #ffcb6b4d;
  color: var(--ink-1);
  border-radius: 3px;
  padding: 0 2px;
}

mark.active-match {
  background: #ffd966;
  color: #000;
}

.boss {
  position: relative;
}

.missable-icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "TrajanPro", serif;
  font-weight: bold;
  font-size: 1.4em;
  color: var(--accent);
  opacity: 0.95;
  cursor: help;
  line-height: 1;
  z-index: 3;
  text-shadow:
    0 0 6px rgba(0, 0, 0, 0.7),
    0 0 8px rgba(224, 123, 49, 0.4),
    0 0 4px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.18s cubic-bezier(0.4, 1.6, 0.6, 1),
    filter 0.18s cubic-bezier(0.4, 1.6, 0.6, 1),
    box-shadow 0.18s cubic-bezier(0.4, 1.6, 0.6, 1);
}

.missable-icon:hover {
  transform: scale(1.18);
  filter: brightness(1.25) drop-shadow(0 0 2px #e07b31cc);
  box-shadow: 0 0 2px 1px #e07b3155;
  text-shadow:
    0 0 1px #e07b31cc,
    0 0 2px #fff2,
    0 0 1px #000a;
  background: rgba(197, 106, 45, 0.08);
  border-radius: 30%;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 285px;
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 1000;
}

.back-to-top:hover {
  transform: scale(1.1);
}

.back-to-top.show {
  display: block;
}

.info-map-wrapper {
  margin-top: 1.5rem;
  text-align: center;
}

.info-map-embed {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

.info-map-link {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.info-map-link a {
  color: var(--accent);
  text-decoration: none;
}

.info-map-link a:hover {
  text-decoration: underline;
}

.info-map-wrapper {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 1.5rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.info-map-embed {
  width: 100%;
  height: 400px;
  border: none;
  display: block;
  border-radius: 12px;
}

/* 🪶 Overlay above the map */
.map-loading-overlay {
  position: absolute;
  inset: 0; /* covers entire iframe */
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(10, 10, 10, 0.65); /* light transparent dark */
  backdrop-filter: blur(3px);
  z-index: 2;
}

.map-loading-text {
  color: var(--accent);
  font-family: "TrajanPro", serif;
  font-weight: bold;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(197, 106, 45, 0.6);
  animation: fadeBlink 1.6s ease-in-out infinite;
}

@keyframes fadeBlink {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}
/* === TABLE OF CONTENTS (TOC) === */
.toc-container {
  position: fixed;
  top: 44px;
  right: 0;
  bottom: 0;
  width: 260px;
  background: rgba(17, 17, 18, 0.95);
  border-left: 2px solid rgba(197, 100, 50, 0.4);
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 1.2rem 1.4rem;
  z-index: 100;
}

/* Reserve horizontal space for the TOC */
main {
  margin-right: 310px;
}

#allprogress-grid {
  padding-right: 1.5rem;
}

/* --- MAIN CATEGORY TITLES --- */
.toc-category {
  margin-bottom: 1.25rem;
}

/* --- CATEGORY HEADER LINK --- */
.toc-category > a {
  display: block;
  cursor: pointer;
  color: var(--ink-2); /* neutral gray by default */
  font-family: "TrajanPro", serif;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.5rem;
  transition:
    color 0.25s ease,
    text-shadow 0.25s ease;
}

.toc-category > a:hover {
  color: var(--ink-1); /* bright white on hover */
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

.toc-category.open > a,
.toc-category > a.active {
  color: #e3b47b; /* soft amber highlight */
  text-shadow: 0 0 6px rgba(227, 180, 123, 0.3);
}

/* --- SUBLISTS (secondary sections) --- */
.toc-sublist {
  margin-left: 0.9rem;
  border-left: 1px solid rgba(255, 153, 51, 0.15);
  padding-left: 0.75rem;
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: all 0.25s ease;
}

/* Hide sublist when closed */
.toc-sublist.hidden {
  display: none;
}

/* --- SUBITEM LINKS --- */
.toc-item a {
  display: block;
  padding: 0.25rem 0.6rem;
  color: var(--ink-3); /* lighter gray for inactive state */
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 6px;
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

.toc-item a:hover {
  color: var(--ink-1); /* bright white on hover */
  background: rgba(255, 153, 51, 0.05);
}

.toc-item a.active {
  color: var(--accent);
  background: rgba(197, 100, 50, 0.1);
}

/* --- EXPAND ANIMATION --- */
.toc-category.open > .toc-sublist {
  display: flex;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- CUSTOM SCROLLBAR --- */
.toc-container::-webkit-scrollbar {
  width: 6px;
}
.toc-container::-webkit-scrollbar-thumb {
  background-color: rgba(255, 153, 51, 0.25);
  border-radius: 10px;
}
.toc-container::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 153, 51, 0.5);
}

/* --- LINK COLOR OVERRIDES --- */
/* Override global link styles so TOC colors stay consistent */
.toc-category > a,
.toc-item a {
  color: var(--ink-2) !important;
  text-shadow: none !important;
}

.toc-category > a:hover,
.toc-item a:hover {
  color: var(--ink-1) !important;
}

.toc-category.open > a,
.toc-category > a.active,
.toc-item a.active {
  color: #e3b47b !important;
  text-shadow: 0 0 6px rgba(227, 180, 123, 0.3) !important;
}

/* === FIX: Banner + Topbar alignment === */
:root {
  --topbar-height: 44px;
  --banner-height: 36px; /* actual height of the golden mode banner */
}

/* Ensure the main content starts below both elements */
main {
  padding-top: var(--topbar-height);
}

/* === MODE BANNER  === */

/* Optional: Steel mode variant (grayish tone) */
#modeBanner.steel {
  background: #202124;
  color: #ccd5db;
  text-shadow:
    0 0 6px #ccd5db,
    0 0 12px #596066;
}

/* === DROPDOWN MULTISELECT === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background: var(--bg-3);
  color: var(--ink-1);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: "TrajanPro", serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

.dropdown-menu {
  position: absolute;
  top: 110%;
  left: 0;
  min-width: 160px;
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 8px 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.dropdown-menu.hidden {
  display: none;
}

.dropdown-menu label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-menu label:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-1);
}

.dropdown-menu input[type="checkbox"] {
  accent-color: var(--accent);
  transform: scale(1.1);
}

.dropdown-divider {
  height: 1px;
  background: var(--stroke-soft);
  margin: 6px 0;
}

.dropdown-clear {
  background: transparent;
  border: none;
  color: var(--accent);
  font-family: "TrajanPro", serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  padding: 6px 12px;
  cursor: pointer;
  text-align: left;
}

.dropdown-clear:hover {
  color: #e69b50;
  text-shadow: 0 0 6px rgba(197, 106, 45, 0.4);
}

/* === Dropdown always above everything === */
#act-dropdown-button,
#act-dropdown-menu {
  position: relative;
  z-index: 9999; /* Ensure dropdown is always visible */
}

/* --- Ensure dropdown always visible above the banner --- */
.dropdown {
  position: relative;
  z-index: 3000; /* create local stacking context */
}

#act-dropdown-menu {
  position: absolute;
  z-index: 4000; /* above banner */
}

/* --- Keep dropdown always above banner --- */
.dropdown {
  position: relative;
  z-index: 3000;
}

#act-dropdown-menu {
  position: absolute;
  z-index: 4000; /* visible above everything */
}

.upgrade-icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "TrajanPro", serif;
  font-weight: bold;
  font-size: 1.2em;
  color: var(--accent);
  opacity: 0.95;
  cursor: help;
  line-height: 1;
  z-index: 3;
  text-shadow:
    0 0 6px rgba(0, 0, 0, 0.7),
    0 0 8px rgba(224, 123, 49, 0.4),
    0 0 4px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.18s cubic-bezier(0.4, 1.6, 0.6, 1),
    filter 0.18s cubic-bezier(0.4, 1.6, 0.6, 1),
    box-shadow 0.18s cubic-bezier(0.4, 1.6, 0.6, 1);
}

.upgrade-icon:hover {
  transform: scale(1.18);
  filter: brightness(1.25) drop-shadow(0 0 2px #e07b31cc);
  box-shadow: 0 0 2px 1px #e07b3155;
  text-shadow:
    0 0 1px #e07b31cc,
    0 0 2px #fff2,
    0 0 1px #000a;
  background: rgba(197, 106, 45, 0.08);
  border-radius: 30%;
}

.boss {
  position: relative;
}
.topbar {
  position: relative;
}

#modeBanner {
  position: absolute;
  top: 9px;
  left: 14px;
  background: #181715;
  border: 2px solid #8a6a3a;
  color: #d7b98a;
  font-family: "TrajanPro", serif;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 6px;
  z-index: 10;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  display: inline-block;
  width: auto;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  animation: modeBannerBlink 1.2s infinite alternate;
}

#modeBanner.steel {
  background: #1a1b1c;
  border: 1px solid #6e7680;
  color: #ccd5db;
  text-shadow:
    0 0 6px #ccd5db,
    0 0 12px #596066;
  animation: modeBannerBlinkSteel 1.2s infinite alternate;
}

@keyframes modeBannerBlink {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

@keyframes modeBannerBlinkSteel {
  0% {
    opacity: 1;
    text-shadow:
      0 0 6px #ccd5db,
      0 0 12px #596066;
  }
  100% {
    opacity: 0.6;
    text-shadow:
      0 0 12px #ccd5db,
      0 0 24px #596066;
  }
}

#modeBanner:empty {
  display: none;
}

.category-header {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 0.5rem;
  background: #181715;
  border: 2px solid #8a6a3a;
  border-radius: 12px;
  padding: 12px;
  color: #d7b98a;
  font-family: "TrajanPro", serif;
}

.map-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: calc(100vh - 180px);
  cursor: grab;
  background-color: #000;
}

.map-wrapper img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.05s linear;
  user-select: none;
  pointer-events: none;
}
