/* === ACP_GLOBAL [DEFAULT] === */

:root {
    --gold: #c5a059;
    --gold-dark: #8e6d2d;
    --gold-main: #C5A059;
    --gold-bright: #E8D48B;
    --bg-dark: #141414;
    --bg-panel: #1a1a1a;
    --bg-sidebar: #0f0f0f;
    --bg-content: #0d0d0d;
    --text-main: #e8e8e8;
    --text-muted: #aaa;
    --border-color: #2a2a2a;
    --border-line: #222;
    --admin-red: #ff4444;
}
* { box-sizing: border-box; }
body {
    background-color: #111111;
    color: var(--text-main);
    font-family: "Segoe UI", Roboto, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
:root {
    --glass-bg: rgba(8, 7, 6, 0.55);
    --glass-border: rgba(197, 160, 89, 0.18);
    --realm-alb: #c0392b;
    --realm-hib: #27ae60;
    --realm-mid: #2980b9;
    --realm-gradient: linear-gradient(90deg, var(--realm-alb) 0%, var(--gold) 25%, var(--realm-hib) 50%, var(--gold) 75%, var(--realm-mid) 100%);
    --shadow-deep: 0 20px 60px rgba(0,0,0,0.55);
}


.cms-debug-missing { color:red; font-weight:bold; }
.cms-debug-known { border-bottom:1px dotted #999; }

/* === RVR_MAP [DEFAULT] === */

#warmap-wrap { display: flex; flex-direction: column; height: calc(100vh - 120px); background: #0a0a0a; border: 1px solid #1a1a1a; overflow: hidden; }
:root { --gold: #c5a059; --gold-dim: #7a6035; --gold-glow: rgba(197,160,89,0.15); --alb: #c0392b; --alb-dim: rgba(192,57,43,0.25); --mid: #2980b9; --mid-dim: rgba(41,128,185,0.25); --hib: #27ae60; --hib-dim: rgba(39,174,96,0.25); --wm-bg: #0a0a0a; --wm-panel: #0f0f0f; --wm-border: #1a1a1a; --wm-text: #888; --wm-bright: #ccc; }

#wm-header { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 54px; border-bottom: 1px solid var(--wm-border); background: var(--wm-panel); flex-shrink: 0; }
#wm-header h2 { font-family: 'Cinzel', serif; font-size: 0.8em; letter-spacing: 4px; color: var(--gold); text-transform: uppercase; font-weight: 400; }
#wm-header h2 span { color: #333; margin: 0 8px; }
.wm-realm-scores { display: flex; gap: 24px; }
.wm-realm-score { display: flex; align-items: center; gap: 8px; font-family: 'Cinzel', serif; font-size: 0.65em; letter-spacing: 2px; }
.wm-realm-score .dot { width: 8px; height: 8px; border-radius: 50%; }
.wm-realm-score.alb .dot { background: var(--alb); box-shadow: 0 0 6px var(--alb); }
.wm-realm-score.mid .dot { background: var(--mid); box-shadow: 0 0 6px var(--mid); }
.wm-realm-score.hib .dot { background: var(--hib); box-shadow: 0 0 6px var(--hib); }
.wm-realm-score.alb { color: #c0392b99; }
.wm-realm-score.mid { color: #2980b999; }
.wm-realm-score.hib { color: #27ae6099; }
.wm-realm-score .count { font-size: 1.4em; font-weight: 600; }
.wm-realm-score.alb .count { color: var(--alb); }
.wm-realm-score.mid .count { color: var(--mid); }
.wm-realm-score.hib .count { color: var(--hib); }
.wm-live-badge { display: flex; align-items: center; gap: 6px; font-size: 0.6em; letter-spacing: 3px; color: #4caf50; font-family: 'Cinzel', serif; }
.wm-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #4caf50; animation: wm-pulse 2s infinite; }
@keyframes wm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

#wm-body { display: flex; flex: 1; overflow: hidden; }

#wm-sidebar { width: 220px; background: var(--wm-panel); border-right: 1px solid var(--wm-border); display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0; }
#wm-sidebar::-webkit-scrollbar { width: 3px; }
#wm-sidebar::-webkit-scrollbar-track { background: transparent; }
#wm-sidebar::-webkit-scrollbar-thumb { background: #1a1a1a; }
.wm-zone { border-bottom: 1px solid var(--wm-border); }
.wm-zone-header { padding: 10px 14px; font-family: 'Cinzel', serif; font-size: 0.58em; letter-spacing: 3px; color: #333; text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; cursor: default; }
.wm-keep-list { padding: 4px 0 8px 0; }
.wm-keep-item { display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 22px; font-size: 0.8em; color: #555; cursor: pointer; transition: all 0.15s; border-left: 2px solid transparent; font-family: 'Crimson Pro', serif; }
.wm-keep-item:hover { color: var(--wm-bright); background: rgba(197,160,89,0.03); }
.wm-keep-item.owned-alb { border-left-color: var(--alb); color: #c0392b88; }
.wm-keep-item.owned-mid { border-left-color: var(--mid); color: #2980b988; }
.wm-keep-item.owned-hib { border-left-color: var(--hib); color: #27ae6088; }
.wm-keep-icon { width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); flex-shrink: 0; opacity: 0.7; }
.wm-keep-item.owned-alb .wm-keep-icon { background: var(--alb-dim); border-color: var(--alb); }
.wm-keep-item.owned-mid .wm-keep-icon { background: var(--mid-dim); border-color: var(--mid); }
.wm-keep-item.owned-hib .wm-keep-icon { background: var(--hib-dim); border-color: var(--hib); }

#wm-map-container { flex: 1; position: relative; overflow: hidden; }
#wm-map { width: 100%; height: 100%; background: #080808 !important; }

.leaflet-container { background: #080808 !important; }
.leaflet-control-attribution { display: none; }
.leaflet-control-zoom a { background: var(--wm-panel) !important; color: var(--gold) !important; border: 1px solid var(--wm-border) !important; font-family: 'Cinzel', serif; }
.leaflet-control-zoom a:hover { background: var(--gold-glow) !important; }

.wm-keep-marker { display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; }
.wm-keep-marker:hover { transform: scale(1.15); }
.wm-keep-shape { width: 18px; height: 18px; border: 2px solid; transform: rotate(45deg); transition: all 0.3s; }
.wm-keep-marker.alb .wm-keep-shape { border-color: var(--alb); background: var(--alb-dim); box-shadow: 0 0 8px var(--alb-dim); }
.wm-keep-marker.mid .wm-keep-shape { border-color: var(--mid); background: var(--mid-dim); box-shadow: 0 0 8px var(--mid-dim); }
.wm-keep-marker.hib .wm-keep-shape { border-color: var(--hib); background: var(--hib-dim); box-shadow: 0 0 8px var(--hib-dim); }
.wm-keep-marker.neutral .wm-keep-shape { border-color: #333; background: #111; }
.wm-portal-keep .wm-keep-shape { width: 22px; height: 22px; }
.wm-portal-keep.alb .wm-keep-shape { box-shadow: 0 0 14px var(--alb); }
.wm-portal-keep.mid .wm-keep-shape { box-shadow: 0 0 14px var(--mid); }
.wm-portal-keep.hib .wm-keep-shape { box-shadow: 0 0 14px var(--hib); }

.leaflet-popup-content-wrapper { background: var(--wm-panel) !important; border: 1px solid var(--wm-border) !important; border-radius: 0 !important; box-shadow: 0 4px 24px rgba(0,0,0,0.8) !important; padding: 0 !important; }
.leaflet-popup-tip { background: var(--wm-panel) !important; }
.leaflet-popup-close-button { color: var(--wm-text) !important; }
.leaflet-popup-content { margin: 0 !important; }
.wm-popup { padding: 14px 18px; min-width: 170px; }
.wm-popup-name { font-family: 'Cinzel', serif; font-size: 0.8em; letter-spacing: 2px; color: var(--wm-bright); margin-bottom: 3px; }
.wm-popup-zone { font-size: 0.68em; color: #444; letter-spacing: 1px; font-family: 'Cinzel', serif; margin-bottom: 10px; }
.wm-popup-owner { display: flex; align-items: center; gap: 8px; font-size: 0.8em; font-family: 'Crimson Pro', serif; }
.wm-owner-dot { width: 7px; height: 7px; border-radius: 50%; }
.wm-owner-dot.alb { background: var(--alb); }
.wm-owner-dot.mid { background: var(--mid); }
.wm-owner-dot.hib { background: var(--hib); }
.wm-owner-dot.neutral { background: #333; }
.wm-owner-alb { color: var(--alb); }
.wm-owner-mid { color: var(--mid); }
.wm-owner-hib { color: var(--hib); }
.wm-owner-neutral { color: #444; }

.wm-zone-label { font-family: 'Cinzel', serif; font-size: 0.58em; letter-spacing: 3px; color: #222; text-transform: uppercase; white-space: nowrap; pointer-events: none; text-align: center; }

#wm-footer { height: 30px; border-top: 1px solid var(--wm-border); background: var(--wm-panel); display: flex; align-items: center; padding: 0 18px; gap: 20px; font-family: 'Cinzel', serif; font-size: 0.52em; letter-spacing: 2px; color: #2a2a2a; flex-shrink: 0; }
#wm-footer .wm-sep { color: #1a1a1a; }
.wm-df-status { margin-left: auto; color: #2a2a2a; }
.wm-df-status span { color: var(--gold-dim); }

@media screen and (max-width: 768px) {
    
    #warmap-wrap { 
        height: calc(100vh - 100px); 
        border-left: none;
        border-right: none;
    }

    
    #wm-header { 
        padding: 10px 15px; 
        height: auto; 
        position: relative;
    }
    
    
    #wm-header h2,
    .wm-live-badge { 
        display: none !important; 
    }
    
    
    .wm-realm-scores { 
        width: 100%; 
        justify-content: space-between; 
        gap: 5px;
    }
    .wm-realm-score { font-size: 0.55em; }
    .wm-realm-score .count { font-size: 1.8em; }

    
    #wm-sidebar { 
        display: none !important; 
    }

    
    #wm-footer { 
        display: none !important; 
    }
}
.wm-keep-item { transition: background 0.2s; }
.wm-live-dot { box-shadow: 0 0 8px currentColor; }



#wm-map-container { position: relative; }
#wm-map { background: #050a10; }
.leaflet-container { background: #050a10 !important; font-family: inherit; }


#wm-map-container::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 400;
    box-shadow: inset 0 0 120px rgba(0,0,0,0.85), inset 0 0 30px rgba(197,160,89,0.06);
    border: 1px solid rgba(197,160,89,0.12);
}


.wm-compass {
    position: absolute; right: 16px; bottom: 16px; width: 74px; height: 74px;
    z-index: 450; opacity: 0.55; pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.wm-compass-ring { fill: rgba(10,8,6,0.6); stroke: rgba(197,160,89,0.5); stroke-width: 1.5; }
.wm-compass-ring-inner { fill: none; stroke: rgba(197,160,89,0.25); stroke-width: 0.8; }
.wm-compass-n { fill: #c0392b; }
.wm-compass-s { fill: rgba(197,160,89,0.6); }
.wm-compass-label { fill: var(--gold,#c5a059); font-size: 11px; font-family: 'Cinzel',serif; text-anchor: middle; font-weight: 700; }


.wm-zone-label {
    font-family: 'Cinzel', serif; font-size: 14px; letter-spacing: 4px;
    color: rgba(197,160,89,0.16); text-transform: uppercase; text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8); white-space: nowrap; font-weight: 700;
}


.wm-keep-marker {
    position: relative; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
}
.wm-keep-marker:hover { transform: scale(1.2); z-index: 999; }
.wm-keep-shape {
    width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 30%, rgba(20,20,20,0.95), rgba(0,0,0,0.9));
    border: 1.5px solid currentColor; border-radius: 3px;
    font-size: 11px; color: #666;
    clip-path: polygon(20% 0%, 80% 0%, 100% 30%, 100% 100%, 0% 100%, 0% 30%);
    box-shadow: 0 0 0 rgba(0,0,0,0);
    transition: box-shadow 0.3s, color 0.3s;
}
.wm-keep-marker.alb .wm-keep-shape { color: #c0392b; box-shadow: 0 0 10px rgba(192,57,43,0.5); }
.wm-keep-marker.mid .wm-keep-shape { color: #2980b9; box-shadow: 0 0 10px rgba(41,128,185,0.5); }
.wm-keep-marker.hib .wm-keep-shape { color: #27ae60; box-shadow: 0 0 10px rgba(39,174,96,0.5); }
.wm-keep-marker.neutral .wm-keep-shape { color: #555; }
.wm-keep-shape i { filter: drop-shadow(0 0 3px currentColor); }


.wm-portal-keep .wm-keep-shape { width: 30px; height: 30px; font-size: 15px; border-width: 2px; }
.wm-keep-crown {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    font-size: 11px; color: var(--gold,#c5a059);
    filter: drop-shadow(0 0 4px rgba(197,160,89,0.7));
    animation: wmCrownFloat 3s ease-in-out infinite;
}
@keyframes wmCrownFloat { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-2px); } }


.wm-relic-temple {
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    font-size: 14px; border-radius: 50%;
    background: radial-gradient(circle, rgba(197,160,89,0.15), rgba(0,0,0,0.85));
    border: 1px solid rgba(197,160,89,0.4);
    animation: wmRelicPulse 4s ease-in-out infinite;
}
.wm-relic-temple.alb { color: #e74c3c; border-color: rgba(231,76,60,0.5); }
.wm-relic-temple.mid { color: #5dade2; border-color: rgba(93,173,226,0.5); }
.wm-relic-temple.hib { color: #52d98a; border-color: rgba(82,217,138,0.5); }
@keyframes wmRelicPulse { 0%,100% { box-shadow: 0 0 4px rgba(197,160,89,0.2); } 50% { box-shadow: 0 0 14px rgba(197,160,89,0.4); } }


.wm-popup-wrap .leaflet-popup-content-wrapper {
    background: linear-gradient(180deg, rgba(18,15,11,0.98), rgba(8,7,6,0.98));
    border: 1px solid rgba(197,160,89,0.3); border-radius: 3px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.wm-popup-wrap .leaflet-popup-tip { background: rgba(12,10,8,0.98); border: 1px solid rgba(197,160,89,0.3); }
.wm-popup { font-family: inherit; padding: 2px; }
.wm-popup-name { font-family: 'Cinzel',serif; font-size: 0.95em; letter-spacing: 2px; color: #e8ddc4; margin-bottom: 2px; }
.wm-popup-zone { font-size: 0.7em; color: #7a7263; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.wm-popup-owner { display: flex; align-items: center; gap: 6px; font-size: 0.85em; }
.wm-owner-dot { width: 9px; height: 9px; border-radius: 50%; }
.wm-owner-dot.alb { background: #c0392b; } .wm-owner-dot.mid { background: #2980b9; }
.wm-owner-dot.hib { background: #27ae60; } .wm-owner-dot.neutral { background: #555; }
.wm-owner-alb { color: #e74c3c; } .wm-owner-mid { color: #5dade2; } .wm-owner-hib { color: #52d98a; } .wm-owner-neutral { color: #888; }
.wm-popup-portal { color: var(--gold,#c5a059); margin-left: 6px; font-size: 0.85em; }
.wm-popup-guild { font-size: 0.75em; color: var(--gold,#c5a059); margin-top: 5px; font-family: 'Cinzel',serif; }
.wm-popup-guild i { margin-right: 4px; }


.wm-zone-header {
    display: flex; justify-content: space-between; align-items: center;
    border-left: 2px solid var(--zone-col, #333); padding-left: 8px;
    font-family: 'Cinzel',serif; font-size: 0.72em; letter-spacing: 2px;
    color: color-mix(in srgb, var(--zone-col,#888) 70%, #fff 30%);
    background: linear-gradient(90deg, color-mix(in srgb, var(--zone-col,#000) 8%, transparent), transparent);
}
.wm-zone-count { color: #444; font-size: 0.9em; }
.wm-keep-guild { display: block; font-size: 0.75em; color: #7a6035; padding-left: 17px; font-style: italic; }
.wm-keep-item:hover .wm-keep-icon { box-shadow: 0 0 6px currentColor; }


.wm-relic-row { color: var(--gold,#c5a059); font-size: 0.8em; padding: 6px 14px 6px 22px; cursor: default; border-bottom: 1px solid #080808; }
.wm-relic-row i { margin-right: 6px; font-size: 0.85em; opacity: 0.7; }
.wm-relic-sub { color: #555; font-size: 0.85em; }
.wm-relic-secure { padding: 10px 22px; font-size: 0.75em; color: #444; font-style: italic; }

@media (prefers-reduced-motion: reduce) {
    .wm-keep-crown, .wm-relic-temple { animation: none; }
}


