.dh-world { box-sizing:border-box; position:fixed; inset:0; margin:auto; width:min(540px,calc(100% - 28px)); max-height:85dvh; overflow:auto; padding:clamp(20px,5vw,38px); color:#e1eaf6; background:linear-gradient(145deg,rgba(15,24,40,.98),rgba(5,9,16,.98)); border:1px solid rgba(173,210,255,.35); border-radius:12px; box-shadow:0 0 50px rgba(0,0,0,.7); text-align:center; font:inherit; }
.dh-world::backdrop { background:rgba(2,5,10,.75); backdrop-filter:blur(5px); }
.dh-world [hidden] { display:none!important; }
.dh-world h2 { color:var(--gold-bright,#e5b95e); margin:0 24px 24px; font-size:1.5rem; }
.dh-world button,.dh-world select { font:inherit; color:#e5c47e; background:#121d2d; border:1px solid #76613e; border-radius:5px; padding:10px 14px; cursor:pointer; max-width:100%; }
.dh-world button:hover { border-color:#e5c47e; }
.dh-world .dh-world-close { position:absolute; top:10px; right:10px; padding:3px 10px; font-size:1.4rem; }
#dh-world-state { font-weight:bold; margin:12px 0; }
#dh-world-state[data-state="online"] { color:#65dc94; }
#dh-world-state[data-state="pause"] { color:#ff7777; }
.dh-world-total { margin:24px 0 12px; font-size:1.25rem; }
.dh-world-total strong { font-size:2rem; }
.dh-world-factions { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:24px; }
.dh-world-factions span { padding:12px 4px; border:1px solid currentColor; border-radius:6px; color:#79baff; }
.dh-world-factions span+span { color:#ff8585; }
.dh-world table { width:100%; border-collapse:collapse; margin-top:16px; font-size:.9rem; }
.dh-world th,.dh-world td { padding:9px 4px; border-bottom:1px solid #334154; overflow-wrap:anywhere; }
.dh-world label { display:block; margin:18px 0 8px; }
.dh-world p { margin:12px 0; }

.dh-world { width:min(760px,calc(100% - 28px)); }
#dh-world-open-ranks { width:100%; margin-bottom:4px; }
#dh-world-state,.dh-world-total { border:1px solid currentColor; border-radius:6px; padding:12px 8px; margin:12px 0; }
.dh-world-total { color:#e1eaf6; }
.dh-world-total strong { font-size:1.5rem; }
.dh-world-players { table-layout:fixed; }
.dh-world-players th:first-child { width:40%; }
.dh-world-players th { color:#e5c47e; }
.dh-world-players tbody tr:nth-child(odd) { background:rgba(255,255,255,.035); }
.dh-world-players img { width:24px; height:24px; object-fit:contain; vertical-align:middle; }
.dh-world-players .dh-alliance { color:#79baff; }
.dh-world-players .dh-horde { color:#ff8585; }
.dh-world h3 { margin:16px 0 0; color:#e5c47e; font-size:1.1rem; }

.dh-world { scrollbar-width:thin; scrollbar-color:#806a42 #101827; }
.dh-world::-webkit-scrollbar { width:8px; } .dh-world::-webkit-scrollbar-thumb { background:#806a42; border-radius:8px; } .dh-world::-webkit-scrollbar-track { background:#101827; }
#dh-world-limit { font-size:.85rem; color:#aab7c9; }
.dh-world-ranking { table-layout:fixed; } .dh-world-ranking th { color:#e5c47e; } .dh-world-ranking th:nth-child(2) { width:30%; } .dh-world-ranking th:last-child { width:27%; }
.dh-world-ranking img { width:24px;height:24px;object-fit:contain;vertical-align:middle; }
.dh-world-ranking tbody tr:nth-child(odd) { background:rgba(255,255,255,.035); }
.dh-world-ranking tbody tr:hover,.dh-world-players tbody tr:hover { background:rgba(229,196,126,.09); }
.dh-rank-name { font-weight:600; } .dh-rank-bar { display:block;height:3px;border-radius:3px;margin:5px 0 0;opacity:.8; }
.dh-rank-1 td:last-child { color:#ffd700; } .dh-rank-2 td:last-child { color:#c0c0c0; } .dh-rank-3 td:last-child { color:#cd7f32; }
@media(max-width:480px){ .dh-world-ranking { font-size:.75rem; } .dh-world-ranking img { width:20px;height:20px; } }

.dh-history-period,.dh-history-legend {display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:14px 0;}
.dh-history-period button[aria-pressed="true"] {background:#e5c47e;color:#101827;}
.dh-history-stats {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:16px 0;}
.dh-history-stats div {border:1px solid #465367;border-radius:6px;padding:10px 2px;font-size:.8rem;}
.dh-history-stats strong {display:block;color:#e5c47e;font-size:1.4rem;}
#dh-world-history-chart {width:100%;height:auto;display:block;background:#0a1320;border:1px solid #334154;border-radius:6px;touch-action:pan-y;}
.dh-history-axis {fill:#aab7c9;font-size:13px;}
.dh-history-grid {stroke:#334154;stroke-dasharray:4 4;}
.dh-history-line {fill:none;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round;}
.dh-history-s1 {stroke:#e5c47e;color:#e5c47e;}.dh-history-s2 {stroke:#79baff;color:#79baff;}.dh-history-s3 {stroke:#ff8585;color:#ff8585;}
.dh-history-dot {fill:currentColor;stroke:none;}.dh-history-marker {stroke:#aab7c9;stroke-dasharray:3 3;}
.dh-history-legend label {margin:0;font-size:.85rem;}.dh-history-legend label:nth-child(1){color:#e5c47e;}.dh-history-legend label:nth-child(2){color:#79baff;}.dh-history-legend label:nth-child(3){color:#ff8585;}
#dh-world-history-detail,#dh-world-history-note {font-size:.8rem;color:#aab7c9;min-height:1em;}

.dh-history-area {fill:url(#dh-history-gold-fill);stroke:none;pointer-events:none;}

.dh-arena-table {table-layout:fixed;} .dh-arena-table th {color:#e5c47e;} .dh-arena-table th:nth-child(2){width:32%;} .dh-arena-table th:first-child{width:12%;}
.dh-arena-table button {padding:5px 4px;border:0;background:transparent;overflow-wrap:anywhere;}
.dh-arena-table progress {display:block;width:90%;height:6px;margin:5px auto;accent-color:#79c991;}
.dh-arena-win {color:#79c991;} .dh-arena-loss {color:#ff8585;} .dh-arena-note {font-size:.8rem;color:#aab7c9;}
.dh-arena-members {padding:5px;background:#121d2d;border-radius:5px;} .dh-arena-member {display:flex;align-items:center;gap:6px;padding:7px 3px;text-align:left;} .dh-arena-member img {width:22px;height:22px;} .dh-arena-nick {flex:1;overflow-wrap:anywhere;}
@media(max-width:480px){.dh-arena-table {font-size:.72rem!important;} .dh-arena-member img{width:17px;height:17px;}}
