/* ═══════════════════════════════════════
   RUNES.CSS
═══════════════════════════════════════ */

body { overflow-y: auto; height: auto; min-height: 100vh; }

/* ── PAGE ── */
#page-runes { padding-top: 52px; }

/* ── PATH SELECTOR ── */
#rune-paths {
  position: sticky; top: 52px; z-index: 99;
  display: flex; gap: 0; background: var(--bg-dark);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto; padding: 0 24px;
}
#rune-paths::-webkit-scrollbar { height: 2px; }

.path-tab {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px; height: 52px; cursor: pointer;
  border: none; border-bottom: 2px solid transparent;
  background: none; color: var(--text-muted);
  font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  transition: all var(--t-base); white-space: nowrap; flex-shrink: 0;
}
.path-tab img { width: 22px; height: 22px; object-fit: contain; filter: grayscale(1) brightness(.7); transition: filter var(--t-base); }
.path-tab:hover { color: var(--text-secondary); }
.path-tab:hover img { filter: grayscale(0) brightness(.9); }
.path-tab.active { border-bottom-color: var(--gold-1); color: var(--gold-1); }
.path-tab.active img { filter: grayscale(0) brightness(1); }

/* ── MAIN LAYOUT ── */
#rune-main {
  display: flex; gap: 0;
  max-width: 1100px; margin: 0 auto;
  padding: 32px 24px 60px;
  align-items: flex-start;
}

/* ── TREE ── */
#rune-tree-wrap {
  flex: 1; min-width: 0;
}
#rune-tree-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}
#rune-path-icon { width: 52px; height: 52px; object-fit: contain; }
#rune-path-name {
  font-family: var(--font-title); font-size: 36px; letter-spacing: 4px; color: var(--gold-1);
}

/* Keystone row */
.rune-slot { margin-bottom: 10px; }
.rune-slot-label {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.rune-slot-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

/* Rune button */
.rune-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; background: none; border: none; padding: 10px;
  border-radius: var(--r-lg); transition: all var(--t-base);
  border: 2px solid transparent; position: relative;
}
.rune-btn:hover { background: var(--bg-elevated); border-color: var(--border-gold); }
.rune-btn.selected { background: var(--bg-card); border-color: var(--gold-1); box-shadow: var(--gold-glow); }

.rune-img-wrap {
  position: relative; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.rune-img-wrap img { object-fit: contain; display: block; }

/* Keystone (slot 0): big */
.rune-slot.keystone .rune-img-wrap { width: 72px; height: 72px; background: var(--bg-elevated); border: 2px solid var(--border-dark); }
.rune-slot.keystone .rune-img-wrap img { width: 64px; height: 64px; }
.rune-slot.keystone .rune-btn-name { font-size: 13px; font-weight: 700; color: var(--text-secondary); max-width: 90px; text-align: center; line-height: 1.3; }

/* Minor rune rows */
.rune-slot.minor .rune-img-wrap { width: 52px; height: 52px; background: var(--bg-card); border: 2px solid var(--border-dark); }
.rune-slot.minor .rune-img-wrap img { width: 44px; height: 44px; }
.rune-slot.minor .rune-btn-name { font-size: 12px; font-weight: 600; color: var(--text-muted); max-width: 72px; text-align: center; line-height: 1.3; }

.rune-btn:hover .rune-btn-name,
.rune-btn.selected .rune-btn-name { color: var(--gold-1); }
.rune-btn:hover .rune-img-wrap,
.rune-btn.selected .rune-img-wrap { border-color: var(--gold-1); }

/* Divider between slots */
.rune-slot-divider { height: 1px; background: var(--border-subtle); margin: 8px 0 16px; }

/* ── INFO PANEL ── */
#rune-info-panel {
  width: 320px; flex-shrink: 0;
  position: sticky; top: 116px; align-self: flex-start;
  margin-left: 32px;
}
#rune-info-empty {
  background: var(--bg-card); border: 1px solid var(--border-dark);
  border-radius: var(--r-xl); padding: 40px 24px; text-align: center;
}
#rune-info-hint { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
#rune-info-content {
  background: var(--bg-card); border: 1px solid var(--border-gold);
  border-radius: var(--r-xl); overflow: hidden;
  box-shadow: 0 0 24px rgba(200,155,60,.1);
}
#rune-info-content.hidden { display: none; }

#rune-info-head {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, rgba(200,155,60,.08), transparent);
  border-bottom: 1px solid var(--border-subtle);
}
#ri-icon { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
#ri-name { font-family: var(--font-title); font-size: 22px; letter-spacing: 2px; color: var(--gold-1); line-height: 1.1; }
#ri-path { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }

#ri-short {
  padding: 16px 20px;
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  line-height: 1.7; border-bottom: 1px solid var(--border-subtle);
}
#ri-long {
  padding: 16px 20px 20px;
  font-size: 13px; color: var(--text-muted); line-height: 1.8;
  max-height: 280px; overflow-y: auto;
}
#ri-long::-webkit-scrollbar { width: 2px; }
#ri-long br { display: block; margin: 3px 0; }
/* Stat highlights inline */
#ri-short strong, #ri-long strong { color: var(--gold-2); font-weight: 700; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  #rune-main { flex-direction: column; padding: 20px 16px 48px; gap: 24px; }
  #rune-info-panel { width: 100%; position: static; margin-left: 0; }
  #rune-info-content { max-height: 400px; }
  #ri-long { max-height: 180px; }
}

@media (max-width: 600px) {
  #rune-paths { padding: 0 10px; }
  .path-tab { padding: 0 12px; font-size: 12px; gap: 6px; }
  .path-tab img { width: 18px; height: 18px; }
  .rune-slot.keystone .rune-img-wrap { width: 60px; height: 60px; }
  .rune-slot.keystone .rune-img-wrap img { width: 52px; height: 52px; }
  .rune-slot.minor .rune-img-wrap { width: 44px; height: 44px; }
  .rune-slot.minor .rune-img-wrap img { width: 36px; height: 36px; }
  .rune-btn { padding: 6px; }
  .rune-slot.keystone .rune-btn-name { font-size: 12px; max-width: 72px; }
  .rune-slot.minor .rune-btn-name { font-size: 11px; max-width: 56px; }
}
