/* ============================================================
   Time of The Pact — Main Stylesheet
   Alliance & Horde, bound as one. Vanilla 1.18.1 realm.
   ============================================================ */

:root {
  --bg:        #0a0c12;
  --bg-2:      #11141d;
  --panel:     #161a25;
  --panel-2:   #1c2030;
  --line:      #2a2f42;
  --line-2:    #383f5c;
  --gold:      #c9a84c;
  --gold-2:    #f0c850;
  --gold-soft: #9c8640;
  --text:      #e6e2d6;
  --muted:     #8d92a6;
  --muted-2:   #6b7186;
  --horde:     #c8102e;
  --horde-2:   #ff3b3b;
  --alliance:  #2b6cff;
  --alliance-2:#4f8bff;
  --success:   #46c23c;
  --danger:    #e0473b;
  --warn:      #f0a830;

  /* WoW quality colours */
  --q-poor:      #9d9d9d;
  --q-common:    #ffffff;
  --q-uncommon:  #1eff00;
  --q-rare:      #0070ff;
  --q-epic:      #a335ee;
  --q-legendary: #ff8000;
  --q-artifact:  #e5cc80;

  --maxw: 1180px;
  --shadow: 0 10px 40px rgba(0,0,0,.55);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1a2030 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,h2,h3,h4,h5 {
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(28px, 4vw, 46px); letter-spacing: 1px; }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 20px; }
h4 { font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-2); }

p { margin: 0 0 1em; }

a { color: var(--gold-2); text-decoration: none; transition: color .15s; }
a:hover { color: #fff; text-decoration: underline; }

img { max-width: 100%; display: block; }

code { font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted  { color: var(--muted); }
.mt8  { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mt40 { margin-top: 40px; }

/* ==================== TOPBAR / NAV ==================== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, rgba(10,12,18,.96), rgba(10,12,18,.88));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 18px rgba(0,0,0,.4);
}
.topbar .row {
  display: flex; align-items: center; gap: 18px;
  height: 72px;
}

/* Brand: keep crest + "TIME OF THE PACT" on ONE line */
.brand {
  display: flex; align-items: center; gap: 12px;
  flex: 0 0 auto;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1.5px;
  color: var(--gold-2);
  white-space: nowrap;            /* <-- keeps text on one line */
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.brand .crest {
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  box-shadow: 0 0 10px rgba(201,168,76,.25);
  object-fit: cover;
}
.brand span {
  white-space: nowrap;
  overflow: visible;
}

.main { display: flex; gap: 6px; flex: 1 1 auto; justify-content: center; }
.main a {
  position: relative;
  padding: 9px 14px 8px;           /* top 9px (moved up 1px from 10px) — nav text only */
  white-space: nowrap;              /* keeps "The Pact" and all labels on one line */
  color: var(--muted);
  font-size: 14px; font-weight: 500;
  letter-spacing: .5px;
  border-radius: 6px;
  text-decoration: none;
  transition: color .15s, background .15s;
}
.main a:hover { color: var(--text); background: rgba(255,255,255,.04); text-decoration: none; }
.main a.active { color: var(--gold-2); }
.main a.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: linear-gradient(90deg, var(--horde-2), var(--alliance-2));
  border-radius: 2px;
}

.userbox { display: flex; gap: 8px; flex: 0 0 auto; }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform .08s, box-shadow .15s, background .15s, border-color .15s;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1408;
  box-shadow: 0 4px 14px rgba(201,168,76,.25);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(240,200,80,.4); text-decoration: none; color:#1a1408; }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--gold-soft); color: var(--gold-2); background: rgba(201,168,76,.06); }
.btn.lg { padding: 14px 28px; font-size: 16px; }
.btn.block { display: flex; width: 100%; }

/* ==================== HERO ==================== */
.hero { position: relative; min-height: 560px; display: flex; align-items: center; overflow: hidden; }
.hero-bg, .ph-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.55) saturate(1.05);
  z-index: 0;
}
.hero-bg::after, .ph-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,18,.4) 0%, rgba(10,12,18,.85) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 70px 24px; width: 100%; }
.hero-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 40px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold-2); font-weight: 600;
  padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px;
  background: rgba(0,0,0,.3); margin-bottom: 18px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }

.hero h1 { font-size: clamp(32px, 5vw, 54px); margin-bottom: 18px; }
.hero h1 .horde { color: var(--horde-2); text-shadow: 0 0 24px rgba(255,59,59,.4); }
.hero h1 .alliance { color: var(--alliance-2); text-shadow: 0 0 24px rgba(79,139,255,.4); }
.hero .lead { font-size: 17px; color: #cdcde0; max-width: 560px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ==================== PAGE HERO (sub pages) ==================== */
.page-hero { position: relative; min-height: 240px; display: flex; align-items: center; overflow: hidden; }
.ph-inner { position: relative; z-index: 2; padding: 50px 24px; width: 100%; }
.ph-inner h1 { margin-bottom: 10px; }
.ph-inner p { color: #cdcde0; max-width: 640px; margin: 0; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; letter-spacing: .5px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--gold-2); }

/* ==================== PANELS ==================== */
.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
/* ornamental corners */
.panel > .ctr, .panel > .cbl {
  position: absolute; width: 16px; height: 16px; pointer-events: none;
  border-color: var(--gold-soft);
}
.panel > .ctr { top: -1px; right: -1px; border-top: 2px solid; border-right: 2px solid; border-radius: 0 8px 0 0; }
.panel > .cbl { bottom: -1px; left: -1px; border-bottom: 2px solid; border-left: 2px solid; border-radius: 0 0 0 8px; }

.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.panel-title { margin: 0; font-size: 18px; color: var(--gold-2); }
.panel-body { padding-top: 4px; }

/* ==================== STATUS CARD ==================== */
.status-card { padding: 20px; }
.status-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--success); box-shadow: 0 0 12px var(--success); animation: pulse 1.8s infinite; flex: 0 0 auto; }
.pulse.off { background: var(--danger); box-shadow: 0 0 12px var(--danger); }
@keyframes pulse { 0%,100%{ opacity:1; transform:scale(1);} 50%{ opacity:.5; transform:scale(.85);} }
.status-hero .info { flex: 1; }
.status-hero .name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 17px; color: var(--gold-2); }
.status-hero .sub { font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.status-hero .count { font-size: 30px; font-weight: 800; font-family: 'Cinzel', serif; color: #fff; line-height: 1; }
.status-hero .count-label { font-size: 10px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; }

.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 6px; text-align: center; }
.stat .v { font-size: 20px; font-weight: 700; color: #fff; font-family: 'Cinzel', serif; }
.stat .l { font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

.realm-line { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; flex-wrap: wrap; }
.realm-line code { flex: 1; color: var(--gold-2); font-size: 13px; }
.copy-btn { background: transparent; border: 1px solid var(--line-2); color: var(--muted); border-radius: 5px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.copy-btn:hover { border-color: var(--gold-soft); color: var(--gold-2); }

/* ==================== SECTIONS ==================== */
section { padding: 60px 0; }
.section-title { text-align: center; font-size: clamp(24px, 3.5vw, 34px); margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 36px; font-size: 15px; }

/* Faction split */
.faction-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.half { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); position: relative; overflow: hidden; }
.half::before { content:''; position:absolute; inset:0; opacity:.12; background-size:cover; background-position:center; }
.horde-half { background: linear-gradient(160deg, rgba(200,16,46,.18), transparent 70%); border-color: rgba(200,16,46,.4); }
.alliance-half { background: linear-gradient(160deg, rgba(43,108,255,.18), transparent 70%); border-color: rgba(43,108,255,.4); }
.horde-half h3 { color: var(--horde-2); }
.alliance-half h3 { color: var(--alliance-2); }
.half p { color: #c7c9d6; margin: 0; position: relative; }

.divider-emblem { text-align: center; margin: 40px 0 0; }
.divider-emblem img { width: 120px; margin: 0 auto; filter: drop-shadow(0 0 20px rgba(201,168,76,.3)); }

/* Features grid */
.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.feature { text-align: center; }
.feature .ico { font-size: 34px; margin-bottom: 12px; color: var(--gold-2); }
.feature h3 { color: var(--gold-2); margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

/* Blessing of the Pact (2x rates) */
.blessing-panel { padding: 28px 32px; }
.blessing-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; }
.blessing-lore p { color: var(--muted); font-size: 14.5px; line-height: 1.75; margin: 0 0 16px; }
.blessing-lore p:last-child { margin-bottom: 0; }
.rates-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rate-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 16px;
  text-align: center;
  transition: border-color .15s, transform .1s;
}
.rate-card:hover { border-color: var(--gold-soft); transform: translateY(-2px); }
.rate-value {
  font-family: 'Cinzel', serif;
  font-size: 30px; font-weight: 900;
  color: var(--gold-2);
  text-shadow: 0 0 18px rgba(240,200,80,.25);
  line-height: 1; margin-bottom: 6px;
}
.rate-label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.rate-desc { font-size: 12.5px; color: var(--muted-2); line-height: 1.5; }

/* generic grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }

/* News */
.news-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item .meta { font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.news-item h3 { font-size: 17px; margin-bottom: 6px; }
.news-item h3 a { color: var(--text); }
.news-item h3 a:hover { color: var(--gold-2); }
.news-item p { color: var(--muted); font-size: 14px; margin: 0; }

/* ==================== FORMS ==================== */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; letter-spacing: .5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px;
  color: var(--text); font-size: 15px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold-soft); box-shadow: 0 0 0 3px rgba(201,168,76,.12);
}
.field .hint { font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.std { max-width: 420px; margin: 0 auto; }
.notice { padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; font-size: 14px; }
.notice.ok  { background: rgba(70,194,60,.12); border: 1px solid rgba(70,194,60,.4); color: #8df086; }
.notice.err { background: rgba(224,71,59,.12); border: 1px solid rgba(224,71,59,.4); color: #f5a39c; }
.msg { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; background: var(--bg); border: 1px solid var(--line); }
.msg.ok { border-color: rgba(70,194,60,.4); color: #8df086; }

/* ==================== ROADMAP ==================== */
.rm-legend { display: flex; gap: 24px; justify-content: center; margin-bottom: 30px; font-size: 13px; color: var(--muted); }
.rm-legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.rm-legend .dot.done { background: var(--success); }
.rm-legend .dot.upcoming { background: transparent; border: 2px dashed var(--gold-soft); }
.rm-legend .dot.inprogress { background: var(--warn); box-shadow: 0 0 10px var(--warn); animation: pulse 1.8s infinite; }

.roadmap { position: relative; max-width: 900px; margin: 0 auto; padding: 10px 0; }
.roadmap::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--warn), var(--gold-soft) 15%, var(--line) 50%, var(--line));
  transform: translateX(-50%);
}
.rm-item { position: relative; display: flex; margin-bottom: 40px; }
.rm-item.left  { justify-content: flex-end; padding-right: calc(50% + 30px); }
.rm-item.right { justify-content: flex-start; padding-left: calc(50% + 30px); }
.rm-card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; width: 100%; max-width: 420px; overflow: hidden;
  box-shadow: var(--shadow); position: relative;
}
.rm-item.done .rm-card { border-color: rgba(70,194,60,.35); }
.rm-item.upcoming .rm-card { border-color: var(--line); opacity: .92; }
.rm-item.inprogress .rm-card { border-color: rgba(240,168,48,.5); box-shadow: 0 0 24px rgba(240,168,48,.18), var(--shadow); }
.rm-img { height: 130px; background-size: cover; background-position: center; filter: brightness(.7); }
.rm-phase-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px; z-index: 2;
}
.rm-phase-badge.done { background: rgba(70,194,60,.18); color: #8df086; border: 1px solid rgba(70,194,60,.4); }
.rm-phase-badge.upcoming { background: rgba(201,168,76,.15); color: var(--gold-2); border: 1px solid var(--gold-soft); }
.rm-phase-badge.inprogress { background: rgba(240,168,48,.2); color: #ffd27a; border: 1px solid rgba(240,168,48,.5); }
.rm-card .rm-date { padding: 14px 18px 0; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-2); }
.rm-card h3 { padding: 4px 18px 0; margin: 0; font-size: 19px; }
.rm-card p { padding: 8px 18px 18px; margin: 0; color: var(--muted); font-size: 14px; }
.rm-dot {
  position: absolute; left: 50%; top: 24px; transform: translateX(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; z-index: 3;
  background: var(--bg); border: 3px solid var(--gold-soft);
}
.rm-item.done .rm-dot { background: var(--success); border-color: var(--success); color: #062; }
.rm-item.upcoming .rm-dot { color: var(--gold-2); background: var(--bg); border-style: dashed; }
.rm-item.inprogress .rm-dot { background: var(--warn); border-color: var(--warn); color: #3a2400; box-shadow: 0 0 14px var(--warn); animation: pulse 1.8s infinite; }

/* ==================== DATABASE ==================== */
.db-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 28px; }
.db-stat { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.db-stat .num { font-size: 30px; font-weight: 800; font-family: 'Cinzel', serif; color: var(--gold-2); line-height: 1; }
.db-stat .label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

.db-search-wrap { display: flex; justify-content: center; margin-bottom: 24px; }
.db-search-bar { display: flex; gap: 0; max-width: 640px; width: 100%; }
.db-search-bar input {
  flex: 1; padding: 14px 18px; background: var(--bg); border: 1px solid var(--line-2);
  border-radius: 6px 0 0 6px; color: var(--text); font-size: 15px; font-family: inherit;
}
.db-search-bar input:focus { outline: none; border-color: var(--gold-soft); }
.db-search-bar button {
  padding: 0 26px; border: 0; border-radius: 0 6px 6px 0; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1408;
  font-weight: 700; font-size: 14px; letter-spacing: .5px;
}
.db-search-bar button:hover { filter: brightness(1.08); }

.db-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 22px; }
.db-tab { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 13px; color: var(--muted); background: var(--bg); transition: all .15s; }
.db-tab:hover { color: var(--text); border-color: var(--gold-soft); text-decoration: none; }
.db-tab.active { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1408; border-color: transparent; font-weight: 600; }
.db-tab .count { opacity: .7; font-size: 11px; }

.db-results { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.db-result-table { width: 100%; border-collapse: collapse; }
.db-result-table th { background: var(--bg-2); color: var(--muted); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.db-result-table td { padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.db-result-table tr:last-child td { border-bottom: 0; }
.db-result-table tbody tr { transition: background .12s; cursor: pointer; }
.db-result-table tbody tr:hover { background: rgba(201,168,76,.07); }
.db-result-table tbody tr.clickable a { color: inherit; text-decoration: none; }

.db-result-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line-2); background: #05060a; vertical-align: middle; margin-right: 10px; overflow: hidden; flex: 0 0 auto; }
.db-result-icon img { width: 30px; height: 30px; }
.db-result-icon.emoji { font-size: 18px; }

.db-item-quality { font-weight: 600; }
.q-poor      { color: var(--q-poor); }
.q-common    { color: var(--q-common); }
.q-uncommon  { color: var(--q-uncommon); }
.q-rare      { color: var(--q-rare); }
.q-epic      { color: var(--q-epic); }
.q-legendary { color: var(--q-legendary); }
.q-artifact  { color: var(--q-artifact); }

.db-no-results { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ==================== ITEM TOOLTIP (hover) ==================== */
.totp-tooltip {
  position: fixed; z-index: 9999; pointer-events: none;
  min-width: 260px; max-width: 340px;
  background: #04060a; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 12px 14px; box-shadow: 0 12px 40px rgba(0,0,0,.8);
  font-size: 13px; line-height: 1.5; color: #e6e2d6;
  display: none;
}
.totp-tooltip .tt-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.totp-tooltip .tt-line { color: #b9bccc; }
.totp-tooltip .tt-stat { color: #fff; }
.totp-tooltip .tt-flavor { color: var(--q-epic); font-style: italic; margin-top: 6px; font-size: 12px; }
.totp-tooltip .tt-meta { color: var(--muted); font-size: 11px; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.totp-tooltip .tt-dur { color: #b9bccc; }
.totp-tooltip .tt-body { margin-top: 6px; }
.totp-tooltip .tt-body table { border-collapse: collapse; }
.totp-tooltip .tt-body td { color: #e6e2d6; padding: 1px 0; }
.totp-tooltip .tt-body b { font-weight: 700; }
.totp-tooltip .tt-body br + br { display: none; }

/* ==================== ITEM DETAIL PAGE ==================== */
.item-detail { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; }

.item-detail .id-sidebar { display: flex; flex-direction: column; gap: 0; }
.item-detail .id-icon {
  width: 220px; height: 220px; border: 2px solid var(--line-2); border-radius: 12px;
  background: radial-gradient(ellipse at center, #0a0d16 0%, #04060a 100%);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: 80px; box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
.item-detail .id-icon.q-legendary { border-color: var(--q-legendary); box-shadow: 0 0 20px rgba(ff8000,.25); }
.item-detail .id-icon.q-epic { border-color: var(--q-epic); }
.item-detail .id-icon.q-rare { border-color: var(--q-rare); }
.item-detail .id-icon.q-uncommon { border-color: var(--q-uncommon); }
.item-detail .id-icon img { width: 100%; height: 100%; object-fit: contain; }

.id-kv { display: flex; flex-direction: column; gap: 0; margin-top: 18px; }
.id-kv-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.id-kv-row:first-child { border-top: 1px solid var(--line); }
.id-kv-row .k { color: var(--muted); font-size: 12px; letter-spacing: .5px; text-transform: uppercase; }
.id-kv-row .v { color: #e6e2d6; font-weight: 600; font-family: 'Cinzel', serif; }

.item-detail .id-main { min-width: 0; }
.id-title { font-family: 'Cinzel', serif; font-weight: 900; font-size: 28px; margin: 0 0 4px; }

.id-stats {
  background: #04060a; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 18px 20px; margin-top: 20px;
}
.id-stats h3 { margin: 0 0 12px; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-2); }
.id-stats ul { list-style: none; padding: 0; margin: 0; }
.id-stats li { padding: 5px 0; color: #fff; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.05); }
.id-stats li:last-child { border-bottom: 0; }
.id-stats .tt-line { color: #b9bccc; padding: 2px 0; }
.id-stats .tt-stat { color: #fff; }
.id-stats .tt-flavor { color: var(--q-epic); font-style: italic; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

.id-tooltip-box {
  background: #04060a; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 18px 20px; margin-top: 20px;
}
.id-tooltip-box h3 { margin: 0 0 12px; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-2); }
.id-tooltip-inner {
  background: #070912; border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px;
  font-size: 14px; line-height: 1.6; color: #e6e2d6;
}
.id-tooltip-inner table { border-collapse: collapse; }
.id-tooltip-inner td { padding: 1px 0; }
.id-tooltip-inner b { font-weight: 700; }

.id-flavor { margin-top: 20px; }
.id-flavor h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-2); }
.id-flavor .flavor-text { color: var(--q-epic); font-style: italic; font-size: 15px; line-height: 1.6; }

/* ==================== FORUMS ==================== */
.forum-cat-header { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 8px 8px 0 0; padding: 12px 18px; font-family: 'Cinzel', serif; color: var(--gold-2); font-size: 17px; margin-top: 24px; }
.forum-table, .forum-tbl, .thread-row { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; overflow: hidden; }
.forum-table th, .forum-tbl th { background: var(--bg-2); color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 10px 16px; text-align: left; }
.forum-table td, .forum-tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.forum-table tr:last-child td, .forum-tbl tr:last-child td { border-bottom: 0; }
.forum-table tr:hover, .forum-tbl tr:hover { background: rgba(201,168,76,.05); }
.cat-name { color: var(--gold-2); font-weight: 600; }

.post { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; margin-bottom: 18px; display: grid; grid-template-columns: 160px 1fr; gap: 20px; }
.post .avatar { width: 90px; height: 90px; border-radius: 50%; border: 2px solid var(--gold-soft); background: var(--bg); margin-bottom: 10px; }
.post .author { color: var(--gold-2); font-weight: 600; }
.post .date { font-size: 12px; color: var(--muted); }
.post .urole { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--alliance-2); }
.post .body { color: #cdcde0; }
.post .body img { max-width: 100%; border-radius: 6px; }

.reply-bar { margin: 20px 0; }
.smilies { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.smilies img { width: 22px; height: 22px; cursor: pointer; border-radius: 4px; }
.smilies img:hover { background: rgba(255,255,255,.08); }

.req-tbl { width: 100%; }
.thread-row td { padding: 12px 16px; }

/* ==================== MISC ==================== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content:''; position:absolute; left: 6px; top:0; bottom:0; width:2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 24px 18px; }
.tl-item::before { content:''; position:absolute; left:-22px; top:4px; width:12px; height:12px; border-radius:50%; background: var(--gold-soft); border: 2px solid var(--bg); }
.tl-date { font-size: 12px; color: var(--gold-2); letter-spacing: 1px; text-transform: uppercase; }
.kv { display: inline-grid; grid-template-columns: auto auto; gap: 4px 14px; }

.codeblock { background: #05060a; border: 1px solid var(--line-2); border-radius: 6px; padding: 12px 16px; font-family: 'JetBrains Mono', monospace; font-size: 13px; overflow-x: auto; color: #c9cdd6; }
.copy { cursor: pointer; color: var(--gold-2); font-size: 12px; }

.steps { display: grid; gap: 14px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .num { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(180deg,var(--gold-2),var(--gold)); color:#1a1408; font-weight:800; display:flex; align-items:center; justify-content:center; }

.lore-figure { margin: 24px 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.uname { color: var(--gold-2); font-weight: 600; }

/* ==================== FOOTER ==================== */
footer { background: linear-gradient(180deg, transparent, #06080e); border-top: 1px solid var(--line); padding: 50px 0 24px; margin-top: 40px; }
footer .cols { margin-bottom: 30px; }
footer h4 { margin-bottom: 14px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { margin-bottom: 8px; }
footer ul li a { color: var(--muted); font-size: 14px; }
footer ul li a:hover { color: var(--gold-2); }
footer .brand { font-size: 18px; margin-bottom: 12px; }
footer .brand .crest { width: 32px; height: 32px; }
footer .legal { text-align: center; color: var(--muted-2); font-size: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
footer .disclaimer { margin-top: 8px; color: var(--muted-2); font-size: 11px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2,1fr); }
  .faction-split, .grid-2 { grid-template-columns: 1fr; }
  .blessing-body { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr 1fr; }
  .item-detail { grid-template-columns: 1fr; }
  .item-detail .id-sidebar { align-items: center; }
  .item-detail .id-icon { width: 180px; height: 180px; margin: 0 auto; }
  .id-kv { width: 100%; max-width: 400px; margin-left: auto; margin-right: auto; }
  .roadmap::before { left: 20px; }
  .rm-item.left, .rm-item.right { justify-content: flex-start; padding: 0 0 0 50px; }
  .rm-dot { left: 20px; }
}
@media (max-width: 720px) {
  .topbar .row { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .main { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .main a { white-space: nowrap; }
  .features { grid-template-columns: 1fr; }
  .rates-grid { grid-template-columns: 1fr; }
  .db-stats { grid-template-columns: repeat(2,1fr); }
  .db-result-table th:nth-child(4), .db-result-table td:nth-child(4) { display: none; }
  .post { grid-template-columns: 1fr; }
  .post .avatar { width: 60px; height: 60px; }
  .id-kv { grid-template-columns: 1fr; }
}
