:root {
  --bg: #14100c;
  --bg-alt: #1c1712;
  --card: #241d16;
  --border: #3a2e20;
  --gold: #d8b463;
  --gold-bright: #f0cd7d;
  --text: #ece4d6;
  --text-dim: #a99d8a;
  --danger: #8a2f2f;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem 2rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}
.brand span { color: var(--gold-bright); }

.server-status { font-size: 0.85rem; color: var(--text-dim); }

.topbar nav { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.topbar nav a { color: var(--text-dim); font-weight: 600; }
.topbar nav a:hover { color: var(--gold-bright); }
.nav-discord {
  background: #5865F2;
  color: #fff !important;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}
.nav-discord:hover { background: #4752c4; color: #fff !important; }
.nav-hopzone {
  background: var(--gold);
  color: #14100c !important;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}
.nav-hopzone:hover { background: var(--gold-bright); color: #14100c !important; }
.nav-facebook {
  background: #1877F2;
  color: #fff !important;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}
.nav-facebook:hover { background: #145dc0; color: #fff !important; }

.nav-highlight {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, rgba(216, 180, 99, 0.18), rgba(240, 205, 125, 0.05));
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright) !important;
  text-decoration: none !important;
  overflow: hidden;
  white-space: nowrap;
  animation: nav-highlight-glow 2.6s ease-in-out infinite;
}
.nav-highlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: nav-highlight-shine 3.4s ease-in-out infinite;
}
.nav-highlight:hover {
  border-color: var(--gold-bright);
  color: var(--text) !important;
}
@keyframes nav-highlight-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(216, 180, 99, 0.25); }
  50% { box-shadow: 0 0 18px rgba(240, 205, 125, 0.6); }
}
@keyframes nav-highlight-shine {
  0% { left: -60%; }
  55% { left: 130%; }
  100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-highlight, .nav-highlight::before { animation: none; }
}

main { max-width: 980px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.hero { text-align: center; padding: 3rem 1rem 2rem; }
.hero h1 { font-size: 2.4rem; margin: 0 0 0.5rem; }
.hero h1 small { color: var(--text-dim); font-size: 1.2rem; font-weight: 400; }
.hero .tagline { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 1.5rem; }

.hero-bg {
  background-image: linear-gradient(180deg, rgba(20,16,12,0.55), rgba(20,16,12,0.92)), url("/assets/images/hero-battle-1.jpg");
  background-size: cover;
  background-position: center 30%;
  border-radius: var(--radius);
  padding: 4rem 1.5rem;
  margin-top: 1rem;
}
.hero-content { max-width: 700px; margin: 0 auto; }
.hero-bg h1, .hero-bg .tagline { text-shadow: 0 2px 8px rgba(0,0,0,0.6); }

.community-art { margin-top: 3rem; border-radius: var(--radius); overflow: hidden; }
.community-art img { display: block; width: 100%; height: auto; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.hero-banner { margin-top: 1rem; }
.hero-banner-inner { position: relative; line-height: 0; border-radius: var(--radius); overflow: hidden; }
.hero-banner-img { display: block; width: 100%; height: auto; transition: opacity 0.3s ease; }
.hero-hotspot {
  position: absolute;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.hero-hotspot:hover, .hero-hotspot:focus-visible {
  background: rgba(240,205,125,0.14);
  outline: 1px solid rgba(240,205,125,0.4);
}

.feature-card-link { display: block; color: inherit; }
.feature-card-link:hover { text-decoration: none; }
.feature-card-link:hover .feature-card { border-color: var(--gold); }

.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}
.btn:hover { text-decoration: none; border-color: var(--gold); }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #201808;
  border: none;
}
.btn-primary:hover { filter: brightness(1.08); }

h2 { border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; margin-top: 3rem; }

.rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.rate-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}
.rate-value { display: block; font-size: 1.6rem; font-weight: 700; color: var(--gold-bright); }
.rate-label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-top: 0.3rem; }

.rates-plaques {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-top: 1.2rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.feature-card h3 { margin-top: 0; }
.feature-card p { color: var(--text-dim); font-size: 0.95rem; }

.himno-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}
.himno-track {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
}
.himno-track h3 { margin: 0 0 0.7rem; color: var(--gold-bright); font-size: 1rem; }
.himno-track audio { width: 100%; }

.feature-card-wide { grid-column: 1 / -1; }
.feature-card-banner {
  display: block;
  width: calc(100% + 2.8rem);
  margin: -1.4rem -1.4rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
}
.feature-card-imgs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin: 0 -1.4rem 1rem;
}
.feature-card-imgs img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center 20%;
}
.feature-card-imgs img:first-child { border-top-left-radius: var(--radius); }
.feature-card-imgs img:last-child { border-top-right-radius: var(--radius); }

.howto ol { color: var(--text-dim); }
.howto li { margin-bottom: 0.4rem; }

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.hit-counter {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  opacity: 0.35;
}

/* drop calculator */
.calc-box { margin-top: 2rem; }
.search-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.search-row input, .search-row select {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.search-row input { flex: 1; min-width: 200px; }

.result-meta { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 0.6rem; }

table.drop-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.9rem;
}
table.drop-table th, table.drop-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
table.drop-table th {
  background: var(--bg-alt);
  color: var(--gold-bright);
  font-weight: 600;
  position: sticky;
  top: 0;
}
table.drop-table tr:hover td { background: rgba(216,180,99,0.06); }
.tag-drop { color: #7fb87f; }
.tag-spoil { color: #8fb0d8; }

.table-wrap { overflow-x: auto; max-height: 65vh; overflow-y: auto; border-radius: var(--radius); }

.placeholder-box {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  margin-top: 1.5rem;
}
.placeholder-box-alt { border-style: solid; text-align: left; }

/* utility classes (CSP forbids inline style="", so anything one-off lives here) */
.intro-text { color: var(--text-dim); }
.mt-lg { margin: 1.5rem 0; }
.text-dim-center { text-align: center; color: var(--text-dim); }
.row-highlight { background: rgba(216,180,99,0.06); }
.status-alive { color: #7fb87f; }
.status-warn { color: var(--gold-bright); }
.status-dead { color: #c98a8a; }
.ally-tag { color: var(--text-dim); font-size: 0.85em; }

/* hero banner hotspots (positions match the link-bar text baked into hero-jorel.jpg) */
.hero-hotspot-1 { left: 16%; top: 72%; width: 17%; height: 7%; }
.hero-hotspot-2 { left: 32%; top: 72%; width: 13%; height: 7%; }
.hero-hotspot-3 { left: 56%; top: 72%; width: 11%; height: 7%; }
.hero-hotspot-4 { left: 67%; top: 72%; width: 14%; height: 7%; }

/* raid boss map (self-generated from real server coordinates, no game assets involved) */
.view-tabs { display: flex; gap: 0.6rem; margin-bottom: 1.2rem; }
.view-tab {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
}
.view-tab:hover { border-color: var(--gold); color: var(--text); }
.view-tab.active { background: var(--gold-bright); color: #201808; border-color: var(--gold-bright); }

.map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.map-toolbar .view-tab { padding: 0.35rem 0.8rem; font-size: 0.85rem; }

.world-map {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 0.8rem;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.world-map.map-dragging { cursor: grabbing; }
.map-zoom-wrap { transform-origin: 0 0; }
.world-map-svg { display: block; width: 100%; height: auto; }
.map-town rect { fill: var(--text-dim); stroke: var(--bg); stroke-width: 1; }
.map-town text { fill: var(--text); font-size: 15px; font-weight: 700; font-family: inherit; }
.map-boss { cursor: pointer; stroke: var(--bg); stroke-width: 1; transition: opacity 0.15s ease; }
.map-boss-alive { fill: #7fb87f; }
.map-boss-dead { fill: #e04b3f; }
.map-boss-epic { fill: var(--gold-bright); }
.map-boss:hover { stroke: var(--text); stroke-width: 2; }
.map-boss-dim { opacity: 0.12; }
.map-boss-match { stroke: var(--text); stroke-width: 2.5; }

/* drop calculator: side panel with buffer / class-change locations */
.main-wide { max-width: 1200px; }

.calc-layout { display: flex; gap: 1.5rem; align-items: flex-start; margin-top: 1.2rem; }
.calc-layout .calc-box { flex: 1; min-width: 0; margin-top: 0; }

.locations-panel {
  flex: 0 0 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
}
.locations-title { margin: 0 0 0.8rem; font-size: 1.1rem; }
.locations-panel h3 { font-size: 0.95rem; color: var(--gold-bright); margin: 1rem 0 0.5rem; }
.locations-panel h3:first-of-type { margin-top: 0; }
.locations-list { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; color: var(--text-dim); }
.locations-list li { padding: 0.25rem 0; border-bottom: 1px dashed var(--border); }
.locations-list li:last-child { border-bottom: none; }
.locations-list strong { color: var(--text); }
.locations-note { font-size: 0.8rem; color: var(--text-dim); margin: 1rem 0 0; }

@media (max-width: 900px) {
  .calc-layout { flex-direction: column; }
  .locations-panel { flex-basis: auto; width: 100%; }
}

/* drop calculator: parchment background, everything else glassy/translucent on top */
body.dropcalc-page {
  background-image: linear-gradient(rgba(20,16,12,0.35), rgba(20,16,12,0.62)), url("/assets/images/dropcalc-bg.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
body.dropcalc-page .calc-box,
body.dropcalc-page .locations-panel {
  background: rgba(36,29,22,0.68);
  backdrop-filter: blur(3px);
}
body.dropcalc-page table.drop-table { background: rgba(28,23,18,0.6); }
body.dropcalc-page table.drop-table th { background: rgba(20,16,12,0.65); }
body.dropcalc-page table.drop-table tr:hover td { background: rgba(216,180,99,0.12); }
body.dropcalc-page .search-row input,
body.dropcalc-page .search-row select {
  background: rgba(36,29,22,0.75);
}
body.dropcalc-page .topbar { background: rgba(28,23,18,0.85); }
body.dropcalc-page footer { background: rgba(20,16,12,0.5); }

.changelog { margin-top: 2rem; }
.changelog-entry {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.2rem;
}
.changelog-entry h2 { margin: 0 0 1rem; border: none; padding: 0; font-size: 1.1rem; }
.changelog-date { color: var(--gold-bright); }
.changelog-entry ul { margin: 0; padding-left: 1.2rem; }
.changelog-entry li { margin-bottom: 0.6rem; line-height: 1.5; }
.changelog-entry li:last-child { margin-bottom: 0; }
.changelog-entry code {
  background: rgba(216,180,99,0.14);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: var(--gold-bright);
}
