:root {
    --bg: #0a0a1a;
    --card-bg: #1a1a2e;
    --card-border: #2a2a4a;
    --gold: #c9aa71;
    --gold-dim: #8a7545;
    --text: #e0e0e0;
    --text-dim: #888;
    --green: #4caf50;
    --red: #e74c3c;
    --orange: #f39c12;
    --blue: #3498db;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header + Logo */
header {
    text-align: center;
    padding: 2rem 1rem 1rem;
    border-bottom: 1px solid var(--card-border);
}

.header-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

header h1 {
    color: var(--gold);
    font-size: 1.8rem;
    font-weight: 600;
}

.game-version {
    color: var(--gold-dim);
    font-size: 0.95rem;
    margin-top: 0.3rem;
    letter-spacing: 0.5px;
}

header p {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Durum Kartlari */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1.2rem;
}

.card h2 {
    color: var(--gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

#card-server .card-body {
    align-items: stretch;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
}

.status-row span:nth-child(2) {
    flex: 1;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.status-dot.offline {
    background: var(--red);
    box-shadow: 0 0 6px var(--red);
}

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

.uptime {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
    text-align: center;
}

.uptime.building {
    color: var(--orange);
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.big-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.delta {
    font-size: 0.9rem;
    font-weight: 500;
}

.delta.positive {
    color: var(--green);
}

.delta.negative {
    color: var(--red);
}

.delta.neutral {
    color: var(--text-dim);
}

.sub-info {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
}

/* Bekleyen Guncelleme */
.pending-section {
    background: var(--card-bg);
    border: 1px solid var(--gold-dim);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.pending-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.pending-header h2 {
    color: var(--gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    margin: 0;
}

.pending-badge {
    background: var(--gold);
    color: var(--bg);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    min-width: 1.4rem;
    text-align: center;
}

.pending-commits {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.pending-commit {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
}

.pending-commit:hover {
    background: rgba(201, 170, 113, 0.08);
}

.commit-hash {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.78rem;
    color: var(--gold);
    flex-shrink: 0;
}

.commit-msg {
    font-size: 0.83rem;
    color: var(--text);
}

.pending-empty {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-style: italic;
}

/* Grafikler */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1.2rem;
}

.chart-container h2 {
    color: var(--gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.chart-small {
    display: flex;
    flex-direction: column;
}

.chart-small canvas {
    max-height: 280px;
}

.commit-log {
    font-size: 0.8rem;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 280px;
    overflow-y: auto;
    line-height: 1.5;
}

.commit-log::-webkit-scrollbar {
    width: 6px;
}

.commit-log::-webkit-scrollbar-track {
    background: var(--bg);
}

.commit-log::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 3px;
}

/* Bolge Tablosu */
.zone-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.zone-section > h2 {
    color: var(--gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.continent-group {
    margin-bottom: 1rem;
}

.continent-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: rgba(201, 170, 113, 0.1);
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

.continent-header:hover {
    background: rgba(201, 170, 113, 0.15);
}

.continent-header .arrow {
    color: var(--gold);
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.continent-header.collapsed .arrow {
    transform: rotate(-90deg);
}

.continent-header .continent-name {
    color: var(--gold);
    font-weight: 600;
    flex: 1;
}

.continent-header .continent-stats {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.zone-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.3rem;
}

.zone-table.hidden {
    display: none;
}

.zone-table td {
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(42, 42, 74, 0.5);
}

.zone-table td:first-child {
    width: 40%;
}

.zone-table td:nth-child(2) {
    width: 20%;
    text-align: right;
    color: var(--text-dim);
}

.zone-table td:nth-child(3) {
    width: 40%;
}

.pct-bar-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    height: 20px;
    position: relative;
    overflow: hidden;
}

.pct-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.pct-bar-label {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.pct-high { background: var(--green); }
.pct-mid { background: var(--orange); }
.pct-low { background: var(--red); }

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    border-top: 1px solid var(--card-border);
}

/* Responsive */
@media (max-width: 900px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 500px) {
    .cards {
        grid-template-columns: 1fr;
    }
    header h1 {
        font-size: 1.3rem;
    }
    .header-logo {
        width: 48px;
        height: 48px;
    }
    .big-value {
        font-size: 1.8rem;
    }
}

/* Sunucu Sagligi - Health Metric Bars */
#card-health .card-body {
    align-items: stretch;
}

.health-bars {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.health-metric-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.health-metric-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    width: 52px;
    flex-shrink: 0;
    text-align: right;
}

.health-metric-bar-wrap {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    height: 14px;
    overflow: hidden;
}

.health-metric-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.health-metric-pct {
    font-size: 0.7rem;
    color: var(--text);
    width: 40px;
    flex-shrink: 0;
    text-align: right;
    font-weight: 500;
}

/* ========================================
   NAVIGATION BAR
   ======================================== */
#main-nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    overflow: visible;
    position: relative;
    z-index: 100;
}

#main-nav .nav-links {
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    min-width: max-content;
}

#main-nav .nav-links > a,
#main-nav .nav-dropdown-trigger {
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    cursor: pointer;
    display: block;
}

#main-nav .nav-links > a:hover,
#main-nav .nav-dropdown-trigger:hover {
    color: var(--gold);
    background: rgba(201, 170, 113, 0.05);
}

#main-nav .nav-links > a.active,
#main-nav .nav-dropdown-trigger.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.nav-dropdown { position: relative; }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0 0 8px 8px;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
    display: block;
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.55rem 1.2rem;
    font-size: 0.83rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
    border-bottom: 1px solid rgba(42, 42, 74, 0.3);
}

.nav-dropdown-menu a:last-child { border-bottom: none; border-radius: 0 0 8px 8px; }
.nav-dropdown-menu a:hover { color: var(--gold); background: rgba(201, 170, 113, 0.1); }
.nav-dropdown-menu a.active { color: var(--gold); background: rgba(201, 170, 113, 0.08); }

/* ========================================
   QUALITY COLORS (Wowhead-style)
   ======================================== */
.q-POOR { color: #9d9d9d; }
.q-COMMON { color: #ffffff; }
.q-UNCOMMON { color: #1eff00; }
.q-RARE { color: #0070dd; }
.q-EPIC { color: #a335ee; }
.q-LEGENDARY { color: #ff8000; }
.q-ARTIFACT { color: #e6cc80; }
.q-HEIRLOOM { color: #00ccff; }

.item-icon, .spell-icon {
    width: 20px; height: 20px; border-radius: 3px;
    vertical-align: middle; margin-right: 4px;
    border: 1px solid var(--card-border);
}

.item-icon-lg, .spell-icon-lg {
    width: 36px; height: 36px; border-radius: 4px;
    border: 1px solid var(--card-border);
}

/* ========================================
   DATABASE LANDING PAGE
   ======================================== */
.db-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.db-cat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1.8rem 1.5rem;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.db-cat-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(201, 170, 113, 0.1);
}

.db-cat-icon { font-size: 2.5rem; line-height: 1; }
.db-cat-name { color: var(--gold); font-size: 1.1rem; font-weight: 600; }
.db-cat-count { color: var(--text-dim); font-size: 0.85rem; }

.db-cat-desc {
    color: var(--text-dim); font-size: 0.78rem;
    text-align: center; line-height: 1.4;
}

@media (max-width: 900px) { .db-categories { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) {
    .db-categories { grid-template-columns: 1fr; }
    .nav-dropdown-menu { position: fixed; left: 0; right: 0; border-radius: 0; }
}

/* ========================================
   PAGE TITLES
   ======================================== */
.page-title {
    color: var(--gold);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.page-subtitle {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.error-msg {
    color: var(--red);
    text-align: center;
    padding: 2rem;
}

/* ========================================
   STATUS PAGE
   ======================================== */
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.status-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.status-card h3 {
    color: var(--gold);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.status-health-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.8rem;
}

.status-big-pct {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.status-big-pct.pct-high { color: var(--green); }
.status-big-pct.pct-mid { color: var(--orange); }
.status-big-pct.pct-low { color: var(--red); }

.status-counts {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.85rem;
}

.count-ok { color: var(--green); }
.count-err { color: var(--red); }
.count-total { color: var(--text-dim); }

.status-bar-wrap {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.status-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s;
}

.stat-detail {
    font-size: 0.8rem;
    color: var(--text-dim);
    padding: 0.2rem 0;
}

/* Type distribution */
.type-dist {
    margin-top: 1rem;
}

.dist-title {
    color: var(--gold-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.dist-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.dist-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    width: 100px;
    flex-shrink: 0;
    text-align: right;
}

.dist-bar-wrap {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    height: 10px;
    overflow: hidden;
}

.dist-bar {
    height: 100%;
    background: var(--gold-dim);
    border-radius: 3px;
}

.dist-value {
    font-size: 0.72rem;
    color: var(--text-dim);
    width: 90px;
    flex-shrink: 0;
    text-align: right;
}

/* ========================================
   CHANGELOG PAGE
   ======================================== */
.changelog-day {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.changelog-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    user-select: none;
}

.changelog-day-header:hover {
    background: rgba(201, 170, 113, 0.05);
}

.changelog-date {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.95rem;
}

.changelog-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.badge-commit {
    background: rgba(201, 170, 113, 0.2);
    color: var(--gold);
}

.badge-good {
    background: rgba(76, 175, 80, 0.2);
    color: var(--green);
}

.badge-bad {
    background: rgba(231, 76, 60, 0.2);
    color: var(--red);
}

.changelog-day-body {
    padding: 0 1.2rem 1.2rem;
}

.changelog-day-body.hidden {
    display: none;
}

.changelog-day-header.collapsed + .changelog-day-body {
    display: none;
}

.changelog-section {
    margin-bottom: 1rem;
}

.changelog-section h4 {
    color: var(--gold-dim);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.build-status {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.build-ok { color: var(--green); }
.build-fail { color: var(--red); }

.health-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.health-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.health-mini-label {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.health-mini-val {
    font-size: 1.1rem;
    font-weight: 700;
}

.health-mini-val.pct-high { color: var(--green); }
.health-mini-val.pct-mid { color: var(--orange); }
.health-mini-val.pct-low { color: var(--red); }

.zone-change-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.zone-change-table th {
    color: var(--gold-dim);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid var(--card-border);
}

.zone-change-table td {
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid rgba(42, 42, 74, 0.3);
}

.changelog-no-change {
    color: var(--text-dim);
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    font-style: italic;
    text-align: center;
}

/* ========================================
   SEARCH PAGES (NPC + QUEST)
   ======================================== */
.search-bar {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.search-bar input[type="text"] {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    margin-bottom: 0.6rem;
}

.search-bar input[type="text"]:focus {
    border-color: var(--gold-dim);
}

.search-bar input[type="text"]::placeholder {
    color: var(--text-dim);
}

.search-filters {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-filters select {
    background: var(--bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
    color: var(--text);
    font-size: 0.8rem;
}

.filter-check {
    font-size: 0.8rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.filter-check input[type="checkbox"] {
    accent-color: var(--gold);
}

.faction-filter {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.faction-btn {
    background: var(--bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    color: var(--text-dim);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
}

.faction-btn.active {
    background: var(--card-border);
    color: var(--text);
}

.faction-alliance-btn { border-color: #3e7fc1; }
.faction-alliance-btn.active { background: #1a3a5c; color: #7ab3e8; border-color: #7ab3e8; }
.faction-horde-btn { border-color: #9e2a2a; }
.faction-horde-btn.active { background: #4a1010; color: #e07070; border-color: #e07070; }

.faction-alliance { color: #7ab3e8; font-size: 0.7rem; }
.faction-horde { color: #e07070; font-size: 0.7rem; }

.loading-msg {
    text-align: center;
    color: var(--text-dim);
    padding: 3rem;
    font-size: 1rem;
}

.result-stats {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.no-results {
    text-align: center;
    color: var(--text-dim);
    padding: 2rem;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
}

.data-table thead th {
    background: rgba(201, 170, 113, 0.1);
    color: var(--gold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-weight: 600;
}

.data-table tbody tr.npc-row,
.data-table tbody tr.quest-row {
    cursor: pointer;
    transition: background 0.15s;
}

.data-table tbody tr.npc-row:hover,
.data-table tbody tr.quest-row:hover {
    background: rgba(201, 170, 113, 0.05);
}

.data-table td {
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(42, 42, 74, 0.3);
}

.id-col {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.8rem;
    color: var(--gold-dim);
}

.sub-name {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.row-error {
    background: rgba(231, 76, 60, 0.05);
}

.tag-error {
    color: var(--red);
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-ok {
    color: var(--green);
    font-size: 0.75rem;
}

/* Detail rows */
.npc-detail,
.quest-detail {
    background: rgba(0, 0, 0, 0.2);
}

.npc-detail.hidden,
.quest-detail.hidden {
    display: none;
}

.detail-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.8rem;
}

.detail-section {
    min-width: 200px;
}

.detail-section h5 {
    color: var(--gold-dim);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.detail-table {
    border-collapse: collapse;
    font-size: 0.8rem;
}

.detail-table th {
    color: var(--text-dim);
    font-weight: 500;
    text-align: left;
    padding: 0.2rem 0.6rem;
    border-bottom: 1px solid var(--card-border);
}

.detail-table td {
    padding: 0.2rem 0.6rem;
    border-bottom: 1px solid rgba(42, 42, 74, 0.3);
}

.detail-list {
    list-style: none;
    font-size: 0.8rem;
}

.detail-list li {
    padding: 0.15rem 0;
}

.dim {
    color: var(--text-dim);
    font-size: 0.75rem;
}

.quest-link, .npc-link, .chain-link {
    color: var(--gold);
    text-decoration: none;
}

.quest-link:hover, .npc-link:hover, .chain-link:hover {
    text-decoration: underline;
}

.chain-view {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.chain-current {
    color: var(--gold);
    font-weight: 600;
}

.chain-arrow {
    color: var(--text-dim);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem;
}

.page-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--gold);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.page-btn:hover {
    background: rgba(201, 170, 113, 0.1);
}

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

/* ========================================
   WOWHEAD-STYLE ITEM DETAIL
   ======================================== */

/* Full-width detail panel */
.item-detail-panel {
    padding: 1rem 1.2rem;
}

/* Top section: tooltip + infobox side by side */
.item-detail-top {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

/* Wowhead-style tooltip card */
.wh-tooltip {
    background: linear-gradient(135deg, #1a1a2e 0%, #12122a 100%);
    border-radius: 6px;
    padding: 1rem 1.2rem;
    min-width: 280px;
    max-width: 340px;
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.wh-tooltip.q-border-POOR { border: 2px solid #9d9d9d; }
.wh-tooltip.q-border-COMMON { border: 2px solid #555; }
.wh-tooltip.q-border-UNCOMMON { border: 2px solid #1eff00; }
.wh-tooltip.q-border-RARE { border: 2px solid #0070dd; }
.wh-tooltip.q-border-EPIC { border: 2px solid #a335ee; }
.wh-tooltip.q-border-LEGENDARY { border: 2px solid #ff8000; }
.wh-tooltip.q-border-ARTIFACT { border: 2px solid #e6cc80; }
.wh-tooltip.q-border-HEIRLOOM { border: 2px solid #00ccff; }

.wh-tooltip-icon {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    flex-shrink: 0;
    image-rendering: auto;
}

.wh-tooltip-icon.q-frame-POOR { border: 2px solid #9d9d9d; }
.wh-tooltip-icon.q-frame-COMMON { border: 2px solid #555; }
.wh-tooltip-icon.q-frame-UNCOMMON { border: 2px solid #1eff00; }
.wh-tooltip-icon.q-frame-RARE { border: 2px solid #0070dd; }
.wh-tooltip-icon.q-frame-EPIC { border: 2px solid #a335ee; }
.wh-tooltip-icon.q-frame-LEGENDARY { border: 2px solid #ff8000; }
.wh-tooltip-icon.q-frame-ARTIFACT { border: 2px solid #e6cc80; }
.wh-tooltip-icon.q-frame-HEIRLOOM { border: 2px solid #00ccff; }

.wh-tooltip-icon-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    border: 2px solid var(--card-border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.wh-tooltip-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.wh-tooltip-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.wh-tooltip-meta {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.wh-tooltip-ilvl {
    font-size: 0.8rem;
    color: #ffd100;
}

.wh-tooltip-bind {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.wh-tooltip-slot {
    font-size: 0.82rem;
    color: var(--text);
}

.wh-tooltip-req {
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* Infobox (right side) */
.wh-infobox {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    font-size: 0.8rem;
    min-width: 200px;
    flex-shrink: 0;
}

.wh-infobox-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(42, 42, 74, 0.3);
}

.wh-infobox-row:last-child {
    border-bottom: none;
}

.wh-infobox-label {
    color: var(--text-dim);
    white-space: nowrap;
}

.wh-infobox-value {
    color: var(--text);
    text-align: right;
    font-weight: 500;
}

/* Tab system */
.wh-tabs {
    display: flex;
    border-bottom: 2px solid var(--card-border);
    margin-bottom: 0;
    gap: 0;
    overflow-x: auto;
}

.wh-tab {
    padding: 0.55rem 1.2rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    user-select: none;
}

.wh-tab:hover {
    color: var(--gold);
}

.wh-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.wh-tab .tab-count {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-left: 0.3rem;
}

.wh-tab.active .tab-count {
    color: var(--gold-dim);
}

.wh-tab-body {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

.wh-tab-content {
    display: none;
    padding: 0;
}

.wh-tab-content.active {
    display: block;
}

/* Tab tables */
.wh-list-table {
    width: 100%;
    border-collapse: collapse;
}

.wh-list-table thead th {
    background: rgba(201, 170, 113, 0.08);
    color: var(--gold-dim);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0.8rem;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.wh-list-table tbody tr {
    transition: background 0.1s;
}

.wh-list-table tbody tr:hover {
    background: rgba(201, 170, 113, 0.04);
}

.wh-list-table td {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(42, 42, 74, 0.25);
    vertical-align: middle;
}

.wh-list-table .col-name {
    min-width: 180px;
}

.wh-list-table .col-chance {
    width: 80px;
    text-align: right;
}

.wh-list-table .col-qty {
    width: 70px;
    text-align: center;
}

.wh-list-table .col-type {
    width: 90px;
}

.wh-list-table .col-id {
    width: 70px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Drop chance bar */
.chance-bar-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

.chance-bar {
    height: 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.chance-bar.chance-high { background: var(--green); width: 50px; }
.chance-bar.chance-mid { background: var(--orange); }
.chance-bar.chance-low { background: var(--red); }

.chance-text {
    font-size: 0.78rem;
    white-space: nowrap;
}

/* More rows indicator */
.wh-more-row td {
    text-align: center;
    color: var(--gold-dim);
    font-size: 0.8rem;
    font-style: italic;
    padding: 0.6rem;
}

/* Empty tab */
.wh-tab-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 2rem 1rem;
    font-size: 0.85rem;
}

/* Source summary badges */
.wh-source-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.wh-source-badge {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-weight: 600;
}

.wh-source-badge.drops { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.wh-source-badge.quests { background: rgba(243, 156, 18, 0.15); color: #f39c12; }
.wh-source-badge.vendors { background: rgba(52, 152, 219, 0.15); color: #3498db; }
.wh-source-badge.gos { background: rgba(76, 175, 80, 0.15); color: #4caf50; }

/* ========================================
   RESPONSIVE - SUBPAGES
   ======================================== */
@media (max-width: 900px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
    .detail-grid {
        flex-direction: column;
    }
    .item-detail-top {
        flex-direction: column;
    }
    .wh-tooltip {
        max-width: 100%;
        min-width: 0;
    }
    .wh-infobox {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 500px) {
    .search-filters {
        flex-direction: column;
        align-items: flex-start;
    }
    .data-table {
        font-size: 0.75rem;
    }
    .data-table td, .data-table th {
        padding: 0.3rem 0.4rem;
    }
}
