/*
 * nav.css — AL Builder
 * Top navigation bar and home page styles.
 * Sections: site nav, page containers, home hero/CTA, leaderboard CTA
 */

/* ============================================================
   SITE NAVIGATION & HOME PAGE
   ============================================================ */

html, body {
  height: 100%;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
}
.site-nav { flex-shrink: 0; }

/* Active pages fill whatever space remains after the nav bar */
.site-page.active {
  flex: 1;
  min-height: 0;
}

#page-home.active,
#page-builds.active {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* safe-area padding for iPhone home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- Top nav bar --- */
.site-nav {
  display: flex;
  align-items: center;
  height: 46px;
  background: #0a0a0a;
  border-bottom: 1px solid #222;
  padding: 0 20px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-nav-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  margin-right: 8px;
  display: block;
}
.site-nav-tabs { display: flex; gap: 4px; }
.site-nav-btn {
  background: none;
  border: none;
  color: #888;
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.15s, color 0.15s;
}
.site-nav-btn:hover { background: #1a1a1a; color: #fff; }
.site-nav-btn.active { background: #242424; color: #fff; border-bottom: 2px solid #fff; }

/* --- Top-level page containers --- */
.site-page { display: none; }
.site-page.active { display: block; }

/* Builder page */
#page-builder.active {
  display: flex;
  flex-direction: column;
}
#page-builder .app {
  flex: 1;
  min-height: 0;
}


/* --- Home page --- */
.home-hero {
  text-align: center;
  padding: 64px 24px 40px;
  border-bottom: 1px solid #111;
}
.home-hero-eyebrow {
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 12px;
}
.home-title {
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 60px;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: 3px;
  color: #e8e8e8;
  line-height: 1;
}
.home-subtitle {
  font-size: 15px;
  color: #555;
  max-width: 480px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.home-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.home-cta {
  background: #fff;
  color: #0d0d0d;
  border: none;
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 32px;
  border-radius: 5px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.15s, transform 0.1s;
}
.home-cta:hover { background: #e0e0e0; transform: translateY(-1px); }
.home-cta-secondary {
  background: transparent;
  color: #bbb;
  border: 1.5px solid #333;
}
.home-cta-secondary:hover { background: #111; color: #fff; border-color: #555; }
.home-cta-trades {
  background: transparent;
  color: #9999dd;
  border: 1.5px solid #3a3a88;
}
.home-cta-trades:hover { background: #13132a; color: #bbbbff; border-color: #5555aa; }
.home-discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Live stats bar */
.home-stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px 24px;
  border-bottom: 1px solid #111;
  background: #050505;
}
.home-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 36px;
}
.home-stat-num {
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #ccc;
  line-height: 1;
}
.home-stat-label {
  font-size: 11px;
  color: #444;
  margin-top: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}
.home-stat-divider {
  width: 1px;
  height: 32px;
  background: #1a1a1a;
}
.home-stat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #4caf7d;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  position: relative;
  top: -2px;
  box-shadow: 0 0 6px #4caf7d88;
}

/* Content wrapper */
.home-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.home-section-label {
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 14px;
}

/* Nav grid (6 section cards) */
.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  margin-bottom: 40px;
}
.home-nav-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #080808;
  border: 1px solid #181818;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.home-nav-card:hover {
  background: #0e0e0e;
  border-color: #2a2a2a;
  transform: translateY(-1px);
}
.home-nav-icon {
  font-size: 20px;
  color: #444;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.home-nav-info { flex: 1; min-width: 0; }
.home-nav-title {
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #bbb;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.home-nav-desc {
  font-size: 12px;
  color: #484848;
  line-height: 1.5;
}
.home-nav-arrow {
  font-size: 20px;
  color: #2a2a2a;
  flex-shrink: 0;
  transition: color 0.15s;
}
.home-nav-card:hover .home-nav-arrow { color: #555; }

/* Two-column lower section */
.home-lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
/* Credits */
.home-credits-section {
  margin-top: 20px;
}
.home-credits-panel {
  width: 100%;
}
.home-credits-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.home-credits-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-credits-role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 4px;
}
.home-credits-name {
  font-size: 14px;
  color: #ccc;
}

.home-panel {
  background: #080808;
  border: 1px solid #181818;
  border-radius: 8px;
  padding: 24px;
}
.home-panel-title {
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 18px;
}

/* Changelog */
.home-changelog {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-changelog li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.home-cl-tag {
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 1px;
}
.home-cl-tag-new { background: #0d2a1a; color: #4caf7a; border: 1px solid #1a4a2a; }
.home-cl-tag-fix { background: #2a1a0d; color: #cc8844; border: 1px solid #4a2a1a; }
.home-cl-tag-upd { background: #0d1a2a; color: #4488cc; border: 1px solid #1a2a4a; }
.home-cl-text {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

/* Getting started steps */
.home-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.home-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.home-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #111;
  border: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #555;
  flex-shrink: 0;
}
.home-step-title {
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #888;
  margin-bottom: 3px;
  letter-spacing: 0.3px;
}
.home-step-body {
  font-size: 12px;
  color: #444;
  line-height: 1.5;
}

/* Donation section */
.home-donate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.home-donate-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.home-donate-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin: 0;
}
.home-donate-btn {
  align-self: flex-start;
  background: #7a60dd;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 10px 28px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.home-donate-btn:hover { opacity: 0.85; }
.home-donate-stripe-note {
  font-size: 11px;
  color: #333;
  margin: 0;
}
.home-donors-panel {
  display: flex;
  flex-direction: column;
}
.home-donors-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.don-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #111;
}
.don-lb-row:last-child { border-bottom: none; }
.don-lb-rank {
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #444;
  width: 24px;
  flex-shrink: 0;
  text-align: center;
}
.don-lb-name {
  font-size: 13px;
  color: #aaa;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.don-lb-amt {
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #7a60dd;
  flex-shrink: 0;
}
.don-lb-empty,
.don-lb-loading {
  font-size: 12px;
  color: #333;
  padding: 8px 0;
}

/* Responsive */
@media (max-width: 700px) {
  .home-title { font-size: 42px; }
  .home-stats-bar { gap: 0; }
  .home-stat { padding: 0 20px; }
  .home-stat-num { font-size: 20px; }
  .home-nav-grid { grid-template-columns: 1fr; }
  .home-donate-row { grid-template-columns: 1fr; }
  .home-lower { grid-template-columns: 1fr; }
}

/* Unofficial disclaimer */
.home-unofficial-note {
  text-align: center;
  font-size: 11px;
  color: #555;
  padding: 12px 24px 24px;
  letter-spacing: 0.3px;
}

/* Old card classes kept for any lingering references */
.home-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto 60px; padding: 0 24px; }
.home-card { background: #000; border: 1px solid #1a1a1a; border-radius: 8px; padding: 24px; }
.home-card-title { font-family: 'Rajdhani', Arial, sans-serif; font-size: 17px; font-weight: 700; color: #999; margin-bottom: 8px; }
.home-card-body { font-size: 13px; color: #555; line-height: 1.6; }

/* --- Soul Tree action buttons --- */
.soul-tree-actions {
  display: flex;
  gap: 8px;
  padding: 12px 20px 0;
}
.soul-tree-btn {
  padding: 6px 18px;
  border: none;
  border-radius: 4px;
  font-family: 'Rajdhani', Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.15s;
}
.soul-tree-btn-max {
  background: #3a3060;
  color: #c4b5fd;
}
.soul-tree-btn-max:hover {
  background: #4c3d80;
}
.soul-tree-btn-reset {
  background: #1f1f1f;
  color: #888;
  border: 1px solid #2a2a2a;
}
.soul-tree-btn-reset:hover {
  background: #2a2a2a;
  color: #aaa;
}

/* --- Mastery node instant tooltip (JS-driven, see scripts.js) --- */
#mastery-tip {
  position: fixed;
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
  color: #ddd;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  width: 220px;
  padding: 8px 10px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  display: none;
}

/* --- Gear section two-column layout --- */
.gear-section {
  flex-direction: row;
  gap: 0;
  align-items: flex-start;
}

.gear-section-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 180px;
  flex-shrink: 0;
}

.gear-section-col + .gear-section-col {
  border-left: 1px solid #2a2a2a;
  padding-left: 16px;
  margin-left: 12px;
}

.gear-section-col h2:first-child {
  margin-top: 0;
}

/* Ensure wpick dropdowns fill their column */
.gear-section-col .wpick-wrap {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.gear-section-col .wpick-display {
  width: 100%;
  box-sizing: border-box;
}

/* --- Shard DR indicator --- */
.shard-slot.shard-dr .shard-label {
  color: #ff8c00;
}
.shard-slot.shard-dr::after {
  content: "25%";
  display: block;
  font-size: 10px;
  color: #ff8c00;
  text-align: center;
  line-height: 1;
}

