/**
 * Xixou Map - Carte Interactive Dofus Rétro
 * CSS Principal
 */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
    --xm-bg: #0f0f23;
    --xm-card: #1a1a2e;
    --xm-card-hover: #252542;
    --xm-cyan: #00d4ff;
    --xm-purple: #8b5cf6;
    --xm-gold: #ffd700;
    --xm-green: #4ade80;
    --xm-red: #ef4444;
    --xm-text: #e0e0e0;
    --xm-muted: #888;
    --xm-border: rgba(255,255,255,0.1);
    --marker-scale: 1;
}

/* ==========================================
   FULLSCREEN MAP MODE
   ========================================== */

body.xm-fullscreen {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide ALL footers (WordPress, Elementor, Astra, GeneratePress, OceanWP, Divi, etc.) */
body.xm-fullscreen #footer,
body.xm-fullscreen .site-footer,
body.xm-fullscreen footer.footer,
body.xm-fullscreen footer:not(.xm-sidebar-footer),
body.xm-fullscreen .footer-wrap,
body.xm-fullscreen .ast-footer-overlay-wrap,
body.xm-fullscreen .ast-small-footer,
body.xm-fullscreen .ast-above-footer-wrap,
body.xm-fullscreen .ast-footer-markup,
body.xm-fullscreen #colophon,
body.xm-fullscreen .site-footer-wrap,
body.xm-fullscreen .footer-widgets,
body.xm-fullscreen .elementor-location-footer,
body.xm-fullscreen .generate-footer,
body.xm-fullscreen #et-footer,
body.xm-fullscreen .oceanwp-footer,
body.xm-fullscreen .wp-block-template-part:last-child {
    display: none !important;
}

/* Hide mobile bottom navigation bars in fullscreen */
body.xm-fullscreen .mobile-nav,
body.xm-fullscreen .bottom-bar,
body.xm-fullscreen .mobile-bottom-nav,
body.xm-fullscreen .site-bottom-bar,
body.xm-fullscreen .ast-mobile-header-wrap,
body.xm-fullscreen .elementor-menu-bar,
body.xm-fullscreen .jet-mobile-menu,
body.xm-fullscreen .mobile-menu-bar,
body.xm-fullscreen .sticky-mobile-menu,
body.xm-fullscreen nav[class*="mobile"],
body.xm-fullscreen div[class*="bottom-nav"],
body.xm-fullscreen div[class*="mobile-menu"]:not(.xm-mobile-toggle) {
    display: none !important;
}

/* Hide content below map container */
body.xm-fullscreen .xixou-map-container ~ *:not(script):not(style) {
    display: none !important;
}

/* Push container to fill viewport below WP header */
body.xm-fullscreen .xixou-map-container {
    height: calc(100vh - var(--xm-header-offset, 0px)) !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 0;
    border: none;
}

/* Sidebar adapts to full container height */
body.xm-fullscreen .xm-sidebar {
    max-height: none;
}

body.xm-fullscreen .xm-map-wrapper {
    min-height: 0;
    height: 100%;
}

body.xm-fullscreen #xixouMap {
    height: 100% !important;
    min-height: 0 !important;
}

/* ==========================================
   CONTAINER PRINCIPAL
   ========================================== */

.xixou-map-container {
    display: flex;
    background: var(--xm-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--xm-border);
    position: relative;
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    min-height: 80vh;
}

/* ==========================================
   SIDEBAR
   ========================================== */

.xm-sidebar {
    width: 360px;
    min-width: 360px;
    background: linear-gradient(180deg, 
        rgba(15, 20, 35, 0.98) 0%, 
        rgba(10, 14, 25, 0.99) 50%, 
        rgba(20, 15, 30, 0.98) 100%);
    border-right: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    box-shadow: 
        8px 0 40px rgba(0,0,0,0.5),
        inset -1px 0 0 rgba(255,255,255,0.05);
    position: relative;
}

.xm-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, 
        #fbbf24 0%, 
        #8b5cf6 30%, 
        #06b6d4 60%, 
        #8b5cf6 80%, 
        #fbbf24 100%);
    opacity: 0.7;
}

.xm-sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.xm-sidebar-header {
    padding: 16px 24px;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.25) 0%, 
        rgba(251, 191, 36, 0.15) 50%,
        rgba(6, 182, 212, 0.2) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    z-index: 1;
}

.xm-sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(251, 191, 36, 0.2) 0%, transparent 60%);
    animation: headerGlow 6s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes headerGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

.xm-sidebar-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    font-family: 'Orbitron', 'Rajdhani', monospace;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #fbbf24 0%, #fcd34d 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: 1px;
}

.xm-close-sidebar {
    display: none;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.xm-close-sidebar:hover {
    background: rgba(239, 68, 68, 0.4);
    border-color: #ef4444;
    transform: rotate(90deg);
}

/* Filtres */
.xm-filters {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.xm-filters::-webkit-scrollbar {
    width: 10px;
}

.xm-filters::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 5px;
}

.xm-filters::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #fbbf24, #8b5cf6, #06b6d4);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.xm-filters::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fcd34d, #a78bfa, #22d3ee);
}

/* Search */
.xm-search-box {
    margin-bottom: 20px;
    position: relative;
}

.xm-search-box::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(139, 92, 246, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.xm-search-box:focus-within::before {
    opacity: 1;
}

.xm-search-box input {
    width: 100%;
    padding: 16px 22px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.xm-search-box input:focus {
    outline: none;
    border-color: transparent;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(139, 92, 246, 0.05));
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.15);
}

.xm-search-box input::placeholder {
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}

/* Filter Groups */
.xm-filter-group {
    margin-bottom: 12px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s ease;
}

.xm-filter-group:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.15);
}

/* Catégorie de métiers (groupe parent) */
.xm-filter-category {
    margin-bottom: 16px;
    border: 1px solid rgba(132, 204, 22, 0.3);
    border-radius: 20px;
    background: rgba(132, 204, 22, 0.05);
    overflow: hidden;
}

.xm-category-header {
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(132, 204, 22, 0.2), rgba(132, 204, 22, 0.1));
    font-size: 1.5rem;
    font-weight: 700;
    color: #84cc16;
    border-bottom: 1px solid rgba(132, 204, 22, 0.2);
    text-shadow: 0 2px 10px rgba(132, 204, 22, 0.3);
}

.xm-filter-category .xm-filter-group {
    margin-bottom: 0;
    border-radius: 0;
    background: transparent;
}

.xm-filter-category .xm-filter-group:last-child {
    border-bottom: none;
}

.xm-filter-category .xm-filter-header {
    padding-left: 28px;
    font-size: 1.35rem;
}

.xm-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.45rem;
    color: #f3f4f6;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.xm-filter-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #fbbf24, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.xm-filter-header::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.xm-filter-header:hover {
    color: #fbbf24;
    transform: translateX(4px);
}

.xm-filter-header:hover::before {
    opacity: 1;
}

.xm-filter-header:hover::after {
    opacity: 1;
}

.xm-filter-header.open {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.12), rgba(139, 92, 246, 0.06));
    color: #fbbf24;
}

.xm-filter-header.open::before {
    opacity: 1;
}

.xm-filter-header .xm-toggle {
    font-size: 0.85rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: rgba(255,255,255,0.5);
    position: relative;
    z-index: 1;
}

.xm-filter-header:hover .xm-toggle {
    color: #fbbf24;
}

.xm-filter-header.open .xm-toggle {
    transform: rotate(180deg);
    color: #fbbf24;
}

/* Icône zaap dans sidebar header */
.xm-icon-zaap {
    width: 15px;
    height: 15px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Icône donjon dans sidebar header */
.xm-icon-dungeon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Icône zaap dans liste "Tous les Zaaps" */
.xm-icon-zaap-list {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Icône donjon dans la sidebar */
.xm-filter-dungeon-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: cover;
    background: transparent;
    border-radius: 50%;
}

/* Petite icône zaap pour liste individuelle */
.xm-icon-zaap-small {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Coordonnées dans liste zaaps */
.xm-coords-small {
    font-size: 1.25rem;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    margin-left: auto;
}

/* Style item zaap individuel */
.xm-zaap-item {
    padding-left: 25px;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 12px 25px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.xm-zaap-item .xm-name {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--xm-text);
}

.xm-zaap-item:hover {
    background: rgba(139,92,246,0.15);
    border-left-color: var(--xm-purple);
}

.xm-zaap-item:hover .xm-name {
    color: #fff;
}

/* Style item zone */
.xm-zone-item {
    border-left: 3px solid transparent;
    min-height: 42px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-left-color 0s;
}

.xm-zone-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.15);
    transition: transform 0.2s, box-shadow 0.3s;
}

.xm-zone-item:hover .xm-zone-color {
    transform: scale(1.25);
}

.xm-zone-item:hover {
    background: rgba(255,255,255,0.05);
}

.xm-zone-item .xm-zone-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.xm-zone-item .xm-name {
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xm-zone-sub {
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.xm-zone-item:hover .xm-zone-sub {
    color: #d1d5db;
}

.xm-zone-badge {
    font-size: 0.75rem;
    color: #f87171;
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.2s;
}

.xm-zone-item:hover .xm-zone-badge {
    background: rgba(248,113,113,0.18);
    border-color: rgba(248,113,113,0.35);
}

.xm-zone-item.active .xm-zone-color {
    box-shadow: 0 0 10px var(--glow, currentColor);
}

/* Label de zone sur la carte */
.xm-zone-label {
    background: transparent !important;
    border: none !important;
}

.xm-zone-label span {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    white-space: nowrap;
    opacity: 0.85;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Label permanent de zone - toujours visible, suit le zoom */
.xm-zone-label-permanent {
    background: transparent !important;
    border: none !important;
    pointer-events: none;
    overflow: visible !important;
}

.xm-zone-label-permanent span {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,0.7);
    white-space: nowrap;
    opacity: 0.85;
    transform-origin: center center;
    transition: transform 0.15s ease-out;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Grille de coordonnées */
.xm-grid-label {
    background: transparent !important;
    border: none !important;
}

.xm-grid-label span {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    border: 1px solid rgba(255, 200, 50, 0.5);
}

.xm-grid-label-major span {
    background: rgba(0, 0, 0, 0.85);
    color: #ffc832;
    font-size: 12px;
    border: 1px solid rgba(255, 200, 50, 0.8);
}

/* Toggle grille - voir section sidebar footer */

/* Feedback clic coordonnées */
.xm-click-feedback {
    position: absolute;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2000;
    pointer-events: none;
    transform: translate(-50%, -100%) translateY(-10px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    animation: popIn 0.2s ease-out;
}

.xm-click-feedback.fade-out {
    opacity: 0;
    transition: opacity 0.3s;
}

@keyframes popIn {
    from { transform: translate(-50%, -100%) translateY(-5px) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, -100%) translateY(-10px) scale(1); opacity: 1; }
}

.xm-filter-items {
    display: none;
    padding: 10px 8px;
    flex-direction: column;
    gap: 6px;
}

.xm-filter-items.open {
    display: flex;
}

/* Filter Item */
.xm-filter-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin: 3px 8px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.35rem;
    color: #e5e7eb;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.xm-filter-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.12), rgba(139, 92, 246, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.xm-filter-item:hover {
    background: rgba(255,255,255,0.04);
    transform: translateX(6px);
    border-color: rgba(139, 92, 246, 0.2);
}

.xm-filter-item:hover::before {
    opacity: 1;
}

.xm-filter-item.active {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: 
        0 6px 20px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.xm-filter-item .xm-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.xm-filter-item:hover .xm-checkbox {
    border-color: rgba(251, 191, 36, 0.6);
    transform: scale(1.1);
}

.xm-filter-item.active .xm-checkbox {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5);
    transform: scale(1.05);
}

.xm-filter-item.active .xm-checkbox::after {
    content: '✓';
    color: #1a1a2e;
    font-size: 14px;
    font-weight: bold;
}

.xm-filter-item .xm-name {
    flex: 1;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
    font-weight: 500;
    min-width: 0;
}

.xm-filter-item:hover .xm-name {
    color: #fff;
}

.xm-filter-item.active .xm-name {
    color: #fff;
    font-weight: 500;
}

.xm-filter-item .xm-level {
    font-size: 1.15rem;
    color: #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.1));
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Icône de ressource dans la sidebar */
.xm-filter-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    image-rendering: auto;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Item désactivé (pas de positions) */
.xm-filter-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.xm-filter-item.disabled:hover {
    background: transparent;
    transform: none;
}

.xm-filter-item.disabled::before {
    display: none;
}

/* Badge compteur */
.xm-filter-item .xm-count {
    font-size: 1.1rem;
    color: #06b6d4;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0.1));
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 700;
    margin-left: auto;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Sidebar Footer */
.xm-sidebar-footer {
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.4));
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.xm-sidebar-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.3), rgba(139, 92, 246, 0.3), transparent);
}

.xm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.xm-btn-icon {
    font-size: 1.3rem;
}

.xm-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.xm-btn:hover::before {
    left: 100%;
}

.xm-btn-share {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #06b6d4 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}

.xm-btn-share:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.xm-btn-clear {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.xm-btn-clear:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.2));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Footer compact : 2 boutons côte à côte */
.xm-footer-compact {
    display: flex;
    gap: 8px;
    width: 100%;
}

.xm-compact-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    cursor: pointer;
    color: #e5e7eb;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.xm-compact-btn:hover {
    transform: translateY(-2px);
}

.xm-compact-btn.xm-toggle-grid:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1));
    border-color: rgba(139, 92, 246, 0.4);
}

.xm-compact-btn.xm-btn-reset:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0.1));
    border-color: rgba(6, 182, 212, 0.4);
    color: #67e8f9;
}

.xm-compact-btn .status {
    padding: 2px 6px;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.xm-compact-btn.active .status {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

/* Legacy - keep for compatibility */
.xm-toggle-grid .icon {
    font-size: 16px;
}

.xm-toggle-grid .status {
    margin-left: 0;
    padding: 2px 6px;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.xm-toggle-grid.active .status {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.15));
    color: #4ade80;
}

/* ==========================================
   MAP WRAPPER
   ========================================== */

.xm-map-wrapper {
    flex: 1;
    position: relative;
    background: var(--xm-bg);
    min-height: 80vh;
}

#xixouMap {
    width: 100%;
    height: 80vh !important;
    min-height: 500px;
    background: var(--xm-bg);
}

/* Rendu net des tuiles — seulement quand la grille est active */
#xixouMap.xm-pixelated .leaflet-tile-pane img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* ==========================================
   MARKER CLUSTERS
   ========================================== */

.xm-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
}

.xm-cluster-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    box-shadow: 0 3px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.xm-cluster-small .xm-cluster-inner {
    font-size: 14px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: 2px solid rgba(255,255,255,0.3);
}

.xm-cluster-medium .xm-cluster-inner {
    font-size: 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 2px solid rgba(255,255,255,0.3);
}

.xm-cluster-large .xm-cluster-inner {
    font-size: 18px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 2px solid rgba(255,255,255,0.3);
}

/* Qty badge on resource markers */
.xm-marker-qty {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1230;
    font-size: 14px;
    font-weight: 900;
    font-family: 'Rajdhani', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 0 2px rgba(255,255,255,0.6);
    line-height: 1;
    z-index: 10;
    letter-spacing: -0.3px;
}

/* Override default markercluster styles */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
    background: none !important;
}
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
    background: none !important;
}

/* Zone Banner - bandeau centré en haut de la carte */
.xm-zone-tooltip {
    --zt-color: #fff;
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xm-zone-tooltip.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Background glow bloom behind banner */
.xm-zt-glow {
    position: absolute;
    inset: -8px -20px;
    border-radius: 28px;
    opacity: 0.12;
    filter: blur(20px);
    z-index: 0;
    animation: zt-glow-pulse 2.5s ease-in-out infinite alternate;
}

@keyframes zt-glow-pulse {
    0% { opacity: 0.10; transform: scale(1); }
    100% { opacity: 0.18; transform: scale(1.04); }
}

/* Main inner container */
.xm-zt-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, rgba(8, 10, 22, 0.92), rgba(18, 20, 38, 0.88));
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 0;
    box-shadow:
        0 12px 40px rgba(0,0,0,0.55),
        0 2px 8px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -1px 0 rgba(0,0,0,0.2),
        0 0 0 1px rgba(255,255,255,0.03);
    overflow: hidden;
}

/* Animated top border accent */
.xm-zt-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--zt-color), transparent);
    opacity: 0.7;
    border-radius: 0 0 2px 2px;
}

/* Subtle shimmer sweep */
.xm-zt-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    animation: zt-shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes zt-shimmer {
    0%, 100% { left: -60%; }
    50% { left: 100%; }
}

/* Decorative side lines */
.xm-zt-line-l, .xm-zt-line-r {
    width: 28px;
    height: 1px;
    flex-shrink: 0;
    opacity: 0.4;
}

.xm-zt-line-l { margin-left: 6px; }
.xm-zt-line-r { margin-right: 6px; }

/* Zone name + dot content block */
.xm-zt-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
}

.xm-zt-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.25);
    animation: zt-dot-pulse 2s ease-in-out infinite alternate;
}

@keyframes zt-dot-pulse {
    0% { box-shadow: 0 0 8px currentColor, 0 0 4px currentColor; }
    100% { box-shadow: 0 0 16px currentColor, 0 0 8px currentColor; }
}

.xm-zt-name {
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    white-space: nowrap;
    line-height: 1;
}

.xm-zt-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.xm-zt-region {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.xm-zt-also {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 1;
    margin-top: 2px;
}

/* Multi-zone banner (shared cell) */
.xm-zt-content-multi {
    display: flex;
    align-items: center;
    gap: 6px;
}
.xm-zt-zone-chip {
    display: flex;
    align-items: center;
    gap: 6px;
}
.xm-zt-sep {
    color: rgba(255,255,255,0.25);
    font-size: 0.7rem;
    margin: 0 2px;
}
.xm-zt-zone-chip .xm-zt-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
}
.xm-zt-zone-chip .xm-zt-name {
    font-size: 1.1rem;
}
.xm-zt-zone-chip .xm-zt-region {
    font-size: 0.7rem;
}

/* ==========================================
   ZONE POPUP - MULTI-ZONE TABS
   ========================================== */

.xm-popup-zone-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-wrap: wrap;
    justify-content: center;
}

.xm-popup-zone-tab {
    padding: 7px 16px;
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.xm-popup-zone-tab:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
}

.xm-popup-zone-tab.active {
    border-color: var(--tab-color, #facc15);
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    color: #fff;
    box-shadow: 0 0 12px rgba(251,191,36,0.15);
}

.xm-popup-zone-panel {
    display: none;
}

.xm-popup-zone-panel.active {
    display: block;
}

/* ==========================================
   ZONE POPUP - RESOURCES SECTION
   ========================================== */

/* Zone resources summary */
.xm-popup-resources {
    margin-top: 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 14px;
}

.xm-popup-resources-header {
    font-size: 1.6rem;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.xm-popup-resources-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(16,185,129,0.3), rgba(5,150,105,0.3));
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.3);
}

.xm-popup-res-search {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 10px;
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 8px;
    background: rgba(0,0,0,0.25);
    color: #e5e7eb;
    font-size: 1.2rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.xm-popup-res-search::placeholder {
    color: #6b7280;
}

.xm-popup-res-search:focus {
    border-color: rgba(16,185,129,0.5);
    background: rgba(0,0,0,0.35);
}

.xm-popup-resources-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 260px;
    overflow-y: auto;
}

.xm-popup-resources-grid::-webkit-scrollbar { width: 4px; }
.xm-popup-resources-grid::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.3); border-radius: 4px; }

.xm-popup-res-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.xm-popup-res-item:hover {
    background: rgba(16,185,129,0.15);
}

.xm-popup-res-item:hover .xm-popup-res-name {
    color: #34d399;
}

.xm-popup-res-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
}

.xm-popup-res-icon-em {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    flex-shrink: 0;
}

.xm-popup-res-name {
    flex: 1;
    font-size: 1.5rem;
    color: #e5e7eb;
    font-weight: 600;
}

.xm-popup-res-meta {
    font-size: 1.15rem;
    color: #d1d5db;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
}

/* Tile-specific resources (injected at click) */
.xm-popup-tile-res {
    margin-top: 10px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    padding: 14px;
}

.xm-popup-tile-res-header {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 10px;
}

.xm-popup-tile-res-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.xm-popup-tile-res-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(251,191,36,0.06);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.xm-popup-tile-res-item:hover {
    background: rgba(251,191,36,0.15);
}

.xm-popup-tile-res-item:hover .xm-popup-tile-res-name {
    color: #fbbf24;
}

.xm-popup-tile-res-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
}

.xm-popup-tile-res-icon-em {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.xm-popup-tile-res-name {
    flex: 1;
    font-size: 1.45rem;
    color: #e5e7eb;
    font-weight: 600;
}

.xm-popup-tile-res-lvl {
    font-size: 1.15rem;
    color: #d1d5db;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.xm-popup-tile-res-qty {
    display: inline-block;
    background: rgba(251,191,36,0.25);
    color: #fbbf24;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 1rem;
    border: 1px solid rgba(251,191,36,0.3);
}

/* ==========================================
   POPUP COPY POSITION BUTTON
   ========================================== */

.xm-popup-coords-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 4px;
}

.xm-popup-coords-val {
    font-family: 'Rajdhani', monospace;
    font-weight: 700;
    color: #e5e7eb;
    letter-spacing: 0.5px;
}

.xm-popup-copy-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    cursor: pointer;
    padding: 3px 8px;
    font-size: 0.85rem;
    line-height: 1;
    transition: all 0.2s;
    color: inherit;
}

.xm-popup-copy-btn:hover {
    background: rgba(251,191,36,0.2);
    border-color: rgba(251,191,36,0.4);
    transform: scale(1.1);
}

/* Zone region headers in sidebar */
.xm-zone-region-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px 6px;
    margin-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.04);
    position: relative;
}

.xm-zone-region-header:first-of-type {
    margin-top: 6px;
    border-top: none;
}

.xm-zone-region-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--xm-accent, #facc15);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-shadow: 0 0 12px rgba(250,204,21,0.15);
}

.xm-zone-region-count {
    font-size: 0.88rem;
    color: var(--xm-muted, #6b7280);
    background: rgba(255,255,255,0.04);
    padding: 3px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    font-weight: 600;
}

/* Zone popup wrapper */
.xm-leaflet-popup-zone .leaflet-popup-content-wrapper {
    border-color: rgba(139, 92, 246, 0.3) !important;
    overflow: visible !important;
}

.xm-leaflet-popup-zone .leaflet-popup-content {
    padding: 22px 24px 16px !important;
    overflow: visible !important;
}

/* Zone popup styling */
.xm-popup-zone h3 {
    margin: 0 0 6px;
    font-size: 26px;
    text-align: center;
    padding-right: 0;
    padding-left: 0;
}

.xm-popup-region {
    display: block;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(251,191,36,0.8);
    margin-bottom: 6px;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.xm-popup-desc {
    font-size: 1rem;
    color: #d1d5db;
}

.xm-popup-zone .xm-popup-info {
    align-items: center;
}

.xm-popup-zone .xm-popup-info span {
    justify-content: center;
    text-align: center;
}

.xm-popup-zone .xm-popup-coords-line {
    justify-content: center;
    font-size: 1.05rem;
}

.xm-popup-zone .xm-popup-coords-val {
    font-size: 1.1rem;
}

/* ==========================================
   POPUP MONSTERS SECTION
   ========================================== */

.xm-popup-monsters {
    margin-top: 14px;
    padding: 14px;
    background: rgba(0,0,0,0.35);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}

.xm-popup-monsters-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--xm-accent, #facc15);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.xm-popup-monsters-count {
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(251,191,36,0.2);
    color: #fbbf24;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.3;
}

.xm-popup-monster-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.xm-popup-mcell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

.xm-popup-mcell-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03));
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.xm-popup-mcell:hover .xm-popup-mcell-img {
    border-color: rgba(251,191,36,0.6);
    box-shadow: 0 0 14px rgba(251,191,36,0.25);
    transform: scale(1.15);
}

.xm-popup-mcell-img img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    pointer-events: none;
}

.xm-popup-mcell-img.no-img {
    background: linear-gradient(135deg, rgba(248,113,113,0.15), rgba(248,113,113,0.05));
    border-color: rgba(248,113,113,0.25);
}

.xm-popup-mcell-fallback {
    font-size: 1.1rem;
    line-height: 1;
}

/* Monster name tooltip on hover */
.xm-popup-mcell-name {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(5,5,18,0.97);
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
    border: 1px solid rgba(251,191,36,0.25);
    z-index: 20;
    letter-spacing: 0.3px;
}

.xm-popup-mcell-name::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(5,5,18,0.97);
}

.xm-popup-mcell:hover .xm-popup-mcell-name {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Touch devices */
@media (hover: none) {
    .xm-popup-mcell:active .xm-popup-mcell-name {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* Prevent double-tap zoom on interactive elements */
.xm-popup-copy-btn,
.xm-popup-mcell,
.xm-mobile-toggle,
.xm-close-sidebar,
.xm-compact-btn,
.xm-ctx-btn,
.xm-filter-item,
.xm-filter-header {
    touch-action: manipulation;
}

/* Popup zaap compact et stylé */
.xm-popup-zaap .leaflet-popup-content-wrapper {
    padding: 0 !important;
    background: linear-gradient(135deg, #1a1a2e, #252542) !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.2) !important;
}

.xm-popup-zaap .leaflet-popup-content {
    margin: 0 !important;
    min-width: auto !important;
}

.xm-popup-zaap .leaflet-popup-tip {
    background: #252542 !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
}

.xm-popup-zaap .xm-popup {
    padding: 14px 18px;
    white-space: nowrap;
    text-align: center;
}

.xm-popup-zaap .xm-popup h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    font-family: 'Orbitron', monospace;
}

.xm-popup-zaap .xm-popup-pos {
    font-size: 13px;
    color: #8b5cf6;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
}

/* Coordonnées - tooltip qui suit la souris */
.xm-coords {
    position: absolute;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.75);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    z-index: 800;
    white-space: nowrap;
    display: none;
}

.xm-coords.visible {
    opacity: 1;
}

/* Loading */
.xm-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--xm-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 2000;
    transition: opacity 0.4s;
}

.xm-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.xm-loading span {
    color: var(--xm-muted);
    font-size: 0.95rem;
}

.xm-spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--xm-cyan);
    border-radius: 50%;
    animation: xm-spin 0.8s linear infinite;
}

@keyframes xm-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   LEAFLET CUSTOMIZATION
   ========================================== */

/* Markers */
.xm-marker {
    background: rgba(26,26,46,0.95) !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px;
    box-shadow: inset 0 0 0 2px currentColor, 0 3px 12px rgba(0,0,0,0.5);
    overflow: visible !important;
    box-sizing: border-box !important;
    cursor: pointer;
    z-index: 500 !important;
}

/* Stack badge (multi-resource tile) */
.xm-tile-stack {
    position: absolute;
    bottom: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 11px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    font-family: 'Rajdhani', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(139,92,246,0.4);
    border: 2px solid rgba(255,255,255,0.6);
    line-height: 1;
    z-index: 10;
}

/* Tile tooltip (hover) */
.xm-tile-tooltip-wrap {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    z-index: 9000 !important;
    pointer-events: none !important;
}
.xm-tile-tooltip-wrap .leaflet-tooltip-left::before,
.xm-tile-tooltip-wrap .leaflet-tooltip-right::before,
.xm-tile-tooltip-wrap::before {
    display: none !important;
}
.xm-tile-tooltip {
    background: rgba(15,15,30,0.97);
    border: 1px solid rgba(251,191,36,0.25);
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 180px;
    max-width: 260px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.xm-tt-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.xm-tt-header span {
    float: right;
    color: #8b5cf6;
    font-weight: 600;
}
.xm-tt-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: #e2e8f0;
    font-size: 0.85rem;
}
.xm-tt-row img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    padding: 2px;
    flex-shrink: 0;
}
.xm-tt-row b {
    flex: 1;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.xm-tt-row small {
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.xm-tt-row em {
    color: #06b6d4;
    font-style: normal;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.xm-tile-tooltip-single {
    background: rgba(15,15,30,0.97);
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: 8px;
    padding: 6px 10px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    color: #e2e8f0;
    font-size: 0.85rem;
    white-space: nowrap;
}
.xm-tile-tooltip-single b { font-weight: 700; }
.xm-tile-tooltip-single small { color: #fbbf24; font-weight: 600; margin-left: 6px; }

/* Multi-resource popup */
.xm-popup-multi {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}
.xm-popup-multi-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}
.xm-popup-multi-row img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}
.xm-popup-multi-row div {
    flex: 1;
    min-width: 0;
}
.xm-popup-multi-row strong {
    display: block;
    font-size: 1.05rem;
    color: #fff;
    font-weight: 700;
}
.xm-popup-multi-row span {
    font-size: 0.85rem;
    color: #9ca3af;
}

.xm-marker:hover {
    filter: brightness(1.3);
    z-index: 9000 !important;
    transform: scale(1.08);
    transition: transform 0.1s ease;
}

.xm-marker.wood { color: #4ade80; }
.xm-marker.ore { color: #94a3b8; }
.xm-marker.plant { color: #a855f7; }
.xm-marker.cereal { color: #fbbf24; }
.xm-marker.fish { color: #38bdf8; }
.xm-marker.meat { color: #ef4444; }

/* Icône de ressource sur la carte */
.xm-resource-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    image-rendering: auto;
    pointer-events: none;
    border-radius: 2px;
}

.xm-res-emoji {
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
}

/* Icône dans popup */
.xm-popup-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    image-rendering: auto;
    vertical-align: middle;
    margin-right: 6px;
}

.xm-marker.dungeon { 
    border-color: #ef4444;
    background: rgba(239,68,68,0.2);
    font-size: 16px;
}

/* Dungeon marker avec image */
.xm-dungeon-marker {
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.xm-dungeon-marker * {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.xm-dungeon-img {
    width: 14px;
    height: 14px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
    transition: all 0.15s ease;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    display: block;
}

/* Boss icon markers - individual boss images */
.xm-dungeon-boss-icon .xm-dungeon-img {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    background: radial-gradient(circle, rgba(30,30,40,0.9) 0%, rgba(20,20,30,0.95) 100%) !important;
    padding: 3px !important;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.6), 0 2px 8px rgba(0,0,0,0.7) !important;
    object-fit: cover;
}

.xm-dungeon-boss-icon:hover .xm-dungeon-img {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.9), 0 0 16px rgba(251, 191, 36, 0.4), 0 4px 12px rgba(0,0,0,0.5) !important;
    transform: translate(-50%, -50%) scale(1.15);
}

.xm-dungeon-marker:hover .xm-dungeon-img {
    filter: drop-shadow(0 3px 8px rgba(251, 191, 36, 0.6)) brightness(1.2);
}

/* Popup donjon - handled by .xm-popup-dj-* classes */



.xm-marker.zaap {
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

/* Zaap marker avec image */
.xm-zaap-marker {
    overflow: visible !important;
}

.xm-zaap-img {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 20px;
    height: auto;
    cursor: pointer;
    pointer-events: auto;
}

.xm-zaap-img:hover {
    filter: brightness(1.2);
}

/* Style pour L.icon zaap */
.leaflet-marker-icon.leaflet-zoom-animated {
    /* Les markers suivent le zoom instantanément */
    overflow: visible !important;
}

/* Override Leaflet default div-icon styling */
.leaflet-div-icon.xm-marker {
    background: rgba(26,26,46,0.95) !important;
    border: none !important;
}

/* Popup */
.leaflet-popup-content-wrapper {
    background: linear-gradient(165deg, #141928 0%, #0c0f18 35%, #1a1230 70%, #0c0f18 100%) !important;
    border: 1px solid rgba(251, 191, 36, 0.25) !important;
    border-radius: 16px !important;
    color: #fff !important;
    box-shadow: 
        0 12px 40px rgba(0,0,0,0.8),
        0 0 30px rgba(139, 92, 246, 0.1) !important;
    padding: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    animation: popupAppear 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes popupAppear {
    0% { opacity: 0; transform: scale(0.85) translateY(8px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 22px 24px !important;
    font-family: 'Rajdhani', 'Segoe UI', sans-serif !important;
    position: relative;
    z-index: 1;
}

.leaflet-popup-tip-container {
    margin-top: -1px !important;
}

.leaflet-popup-tip {
    background: #141928 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

.leaflet-popup-tip::before {
    display: none;
}

.leaflet-popup-close-button {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
    font-weight: 300 !important;
    color: rgba(255,255,255,0.4) !important;
    background: rgba(255,255,255,0.06) !important;
    border-radius: 8px !important;
    top: 10px !important;
    right: 10px !important;
    padding: 0 !important;
    line-height: 32px !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    z-index: 10 !important;
}

.leaflet-popup-close-button:hover {
    color: #fff !important;
    background: rgba(239, 68, 68, 0.8) !important;
    border-color: transparent !important;
    transform: scale(1.1) !important;
}

.xm-popup {
    min-width: 180px;
}

.xm-popup h3 {
    margin: 0 0 12px 0;
    padding-right: 28px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #fbbf24;
}

.xm-popup h3::after {
    display: none;
}

.xm-popup-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 1rem;
    color: #d1d5db;
}

.xm-popup-info span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    font-weight: 500;
    transition: background 0.2s;
}

.xm-popup-info span::before {
    display: none;
}

.xm-popup-info span:hover {
    background: rgba(251, 191, 36, 0.08);
}

.xm-popup-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.xm-popup-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white !important;
    text-decoration: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    border: none;
}

.xm-popup-link::before {
    display: none;
}

.xm-popup-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5);
}

.xm-popup-link-dungeon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: #1a1a2e !important;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3) !important;
}

.xm-popup-link-dungeon:hover {
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.5) !important;
}

/* ==================== POPUP DONJON REDESIGN ==================== */

.xm-leaflet-popup-dj .leaflet-popup-content-wrapper {
    border-color: rgba(251, 191, 36, 0.35) !important;
}

.xm-popup-dj-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}

.xm-popup-dj-boss {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 2px 12px rgba(251, 191, 36, 0.3);
    background: #1a1a2e;
    flex-shrink: 0;
}

.xm-popup-dj-title {
    flex: 1;
    min-width: 0;
}

.xm-popup-dj-title h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 24px;
    font-weight: 700;
    color: #fbbf24;
    line-height: 1.2;
}

.xm-popup-dj-lvl {
    display: inline-block;
    margin-top: 5px;
    padding: 3px 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.2));
    border-radius: 6px;
    font-size: 17px;
    font-weight: 600;
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.xm-popup-dj-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 18px;
    color: #b0b7c3;
}

.xm-popup-dj-meta span {
    padding: 5px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    white-space: nowrap;
}

.xm-popup-dj-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.xm-popup-dj-actions .xm-popup-link {
    padding: 12px 18px;
    font-size: 18px;
}

/* Zoom Controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
    z-index: 900 !important;
    position: relative !important;
}

.leaflet-control-zoom a {
    background: var(--xm-card) !important;
    color: var(--xm-cyan) !important;
    border: 1px solid var(--xm-border) !important;
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    font-size: 24px !important;
}

.leaflet-control-zoom a:hover {
    background: var(--xm-card-hover) !important;
}

.leaflet-control-zoom-in {
    border-radius: 8px 8px 0 0 !important;
}

.leaflet-control-zoom-out {
    border-radius: 0 0 8px 8px !important;
}

/* ==========================================
   MOBILE TOGGLE
   ========================================== */

.xm-mobile-toggle {
    display: none;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1001;
    background: linear-gradient(135deg, rgba(15,20,35,0.95), rgba(25,30,50,0.95));
    border: 1px solid var(--xm-cyan);
    color: var(--xm-cyan);
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.xm-mobile-toggle:hover {
    background: rgba(0,212,255,0.15);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

/* ==========================================
   RESPONSIVE - TABLET (≤900px)
   ========================================== */

@media (max-width: 900px) {
    .xixou-map-container {
        flex-direction: column;
    }
    
    /* Fullscreen on mobile: use dynamic viewport height */
    body.xm-fullscreen .xixou-map-container {
        height: calc(100dvh - var(--xm-header-offset, 0px)) !important;
        /* Account for site mobile bottom navigation */
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    
    body.xm-fullscreen #xixouMap {
        min-height: 0 !important;
    }
    
    /* Non-fullscreen: also account for bottom nav */
    #xixouMap {
        height: calc(80vh - 60px) !important;
    }
    
    .xm-sidebar {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1002;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        max-height: 100%;
        width: 300px;
        min-width: 300px;
        overscroll-behavior: contain;
    }
    
    .xm-sidebar.open {
        transform: translateX(0);
    }
    
    .xm-close-sidebar {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .xm-mobile-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        /* Top-right: away from zoom +/- which is top-left */
        top: 12px;
        left: auto;
        right: 12px;
        border-radius: 12px;
        padding: 14px 22px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 10px rgba(6,182,212,0.15);
    }
    
    .xm-coords {
        display: none !important;
    }
    
    /* Sidebar overlay */
    .xm-sidebar.open ~ .xm-map-wrapper::after {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
    }
    
    /* Popup sizing */
    .leaflet-popup-content {
        padding: 18px 20px !important;
    }
    
    .xm-popup h3 {
        font-size: 20px;
    }
    
    .xm-popup-info {
        font-size: 16px;
    }
    
    .xm-popup-info span {
        padding: 6px 8px;
    }
}

/* ==========================================
   RESPONSIVE - PHONE (≤500px)
   ========================================== */

@media (max-width: 500px) {
    .xm-sidebar {
        width: 100%;
        min-width: 100%;
    }
    
    /* Map fills available space on mobile */
    .xm-map-wrapper {
        min-height: 0;
    }
    
    #xixouMap {
        min-height: 300px;
    }
    
    /* Sidebar header compact */
    .xm-sidebar-header {
        padding: 12px 16px;
    }
    
    .xm-sidebar-header h2 {
        font-size: 1.15rem;
    }
    
    /* Search compact */
    .xm-search-box input {
        padding: 12px 16px;
        font-size: 1.05rem;
        border-radius: 12px;
    }
    
    /* Filter padding */
    .xm-filters {
        padding: 14px;
    }
    
    /* Filter group headers */
    .xm-filter-header {
        padding: 12px 14px;
        font-size: 1.05rem;
    }
    
    /* Filter items */
    .xm-filter-item {
        padding: 10px 12px;
        min-height: 44px;
    }
    
    .xm-filter-item .xm-name {
        font-size: 0.95rem;
        white-space: normal;
        -webkit-line-clamp: 2;
    }
    
    /* Zone items */
    .xm-zone-item .xm-name {
        font-size: 1.05rem;
    }
    
    .xm-zone-sub {
        font-size: 0.72rem;
    }
    
    .xm-zone-badge {
        font-size: 0.65rem;
        padding: 1px 6px;
    }
    
    .xm-zone-color {
        width: 12px;
        height: 12px;
    }
    
    /* Region headers */
    .xm-zone-region-header {
        padding: 6px 14px 4px;
        margin-top: 10px;
    }
    
    .xm-zone-region-label {
        font-size: 0.72rem;
    }
    
    .xm-zone-region-count {
        font-size: 0.65rem;
        padding: 1px 7px;
    }
    
    /* Footer buttons */
    .xm-sidebar-footer {
        padding: 10px 12px;
    }
    
    .xm-footer-compact {
        gap: 6px;
    }
    
    .xm-compact-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    /* Level filter */
    .xm-level-filter {
        padding: 10px;
    }
    
    /* Mobile toggle bigger touch target */
    .xm-mobile-toggle {
        padding: 14px 22px;
        font-size: 1.1rem;
    }
    
    /* Coords hidden on mobile - no cursor */
    .xm-coords {
        display: none !important;
    }
    
    /* Popup mobile */
    .leaflet-popup-content-wrapper {
        max-width: calc(100vw - 40px) !important;
    }
    
    .leaflet-popup-content {
        padding: 16px 16px !important;
    }
    
    /* Zone popup: allow tooltip overflow on mobile */
    .xm-leaflet-popup-zone .leaflet-popup-content {
        overflow: visible !important;
    }
    
    .xm-popup {
        min-width: 0;
    }
    
    .xm-popup h3 {
        font-size: 18px;
        padding-right: 30px;
    }
    
    .xm-popup-zone h3 {
        padding-right: 0;
    }
    
    .xm-popup-info {
        font-size: 0.92rem;
        gap: 5px;
    }
    
    .xm-popup-info span {
        padding: 5px 8px;
        font-size: 0.88rem;
    }
    
    /* Monster bubbles compact on mobile */
    .xm-popup-mcell-img {
        width: 36px;
        height: 36px;
    }
    
    .xm-popup-mcell-img img {
        width: 28px;
        height: 28px;
    }
    
    .xm-popup-monster-grid {
        gap: 5px;
    }
    
    .xm-popup-monsters {
        padding: 10px;
    }
    
    .xm-popup-monsters-header {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .xm-popup-mcell-name {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    /* Resources mobile */
    .xm-popup-resources {
        padding: 10px;
    }
    
    .xm-popup-resources-header {
        font-size: 1.25rem;
    }
    
    .xm-popup-resources-grid {
        max-height: 150px;
    }
    
    .xm-popup-res-name {
        font-size: 1.15rem;
    }
    
    .xm-popup-tile-res {
        padding: 10px;
    }
    
    .xm-popup-tile-res-header {
        font-size: 1.15rem;
    }
    
    /* Copy button touch friendly */
    .xm-popup-copy-btn {
        padding: 6px 12px;
        font-size: 1rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .xm-popup-coords-line {
        font-size: 0.8rem;
    }
    
    /* Dungeon popup mobile */
    .xm-popup-dj-boss {
        width: 50px;
        height: 50px;
    }
    
    .xm-popup-dj-title h3 {
        font-size: 18px !important;
    }
    
    .xm-popup-dj-meta {
        font-size: 13px;
    }
    
    .xm-popup-dj-actions {
        gap: 6px;
    }
    
    .xm-popup-link {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    /* Context menu mobile */
    .xm-context-actions {
        gap: 8px;
    }
    
    .xm-ctx-btn {
        padding: 14px 18px;
        font-size: 1rem;
        min-height: 48px;
    }
    
    /* Toast mobile */
    .xm-toast {
        width: calc(100% - 30px);
        max-width: none;
        font-size: 0.9rem;
    }
    
    /* Zone banner mobile */
    .xm-zone-tooltip {
        top: 8px;
        max-width: 94vw;
    }
    
    .xm-zt-content-multi {
        gap: 4px;
    }
    .xm-zt-zone-chip .xm-zt-name {
        font-size: 0.9rem;
    }
    .xm-zt-zone-chip .xm-zt-region {
        display: none;
    }
    
    .xm-zt-name {
        font-size: 1.1rem;
        letter-spacing: 0.5px;
    }
    
    .xm-zt-region {
        font-size: 0.92rem;
    }
    
    .xm-zt-also {
        font-size: 0.72rem;
    }
    
    .xm-popup-zone-tab {
        padding: 5px 12px;
        font-size: 0.82rem;
    }
    
    .xm-zt-content {
        padding: 9px 14px;
        gap: 8px;
    }
    
    .xm-zt-dot {
        width: 8px;
        height: 8px;
    }
    
    .xm-zt-line-l, .xm-zt-line-r {
        display: none;
    }
    
    .xm-zt-inner {
        border-radius: 10px;
    }
    
    .xm-zt-glow {
        height: 40px;
    }
    
    /* Leaflet controls mobile */
    .leaflet-control-zoom {
        margin: 8px !important;
    }
    
    .leaflet-control-zoom a {
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
        font-size: 18px !important;
    }
    
    /* Close button bigger for touch */
    .leaflet-popup-close-button {
        width: 36px !important;
        height: 36px !important;
        font-size: 20px !important;
        line-height: 36px !important;
    }
}

/* ==========================================
   RESPONSIVE - TINY PHONE (≤360px)
   ========================================== */

@media (max-width: 360px) {
    .xm-sidebar-header h2 {
        font-size: 1rem;
    }
    
    .xm-search-box input {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    
    .xm-filters {
        padding: 10px;
    }
    
    .xm-filter-item .xm-name {
        font-size: 0.85rem;
    }
    
    .xm-zone-item .xm-name {
        font-size: 0.95rem;
    }
    
    .xm-popup h3 {
        font-size: 16px;
    }
    
    .xm-popup-mcell-img {
        width: 32px;
        height: 32px;
    }
    
    .xm-popup-mcell-img img {
        width: 24px;
        height: 24px;
    }
    
    .xm-popup-mcell-name {
        font-size: 0.75rem;
    }
    
    .xm-popup-monster-grid {
        gap: 4px;
    }
    
    .xm-zt-name {
        font-size: 0.95rem;
    }
    
    .xm-zt-region {
        font-size: 0.75rem;
    }
    
    .xm-zt-also {
        font-size: 0.65rem;
    }
    
    .xm-mobile-toggle {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}

/* ==================== FILTRE PAR NIVEAU ==================== */

.xm-level-filter {
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.06));
    border-radius: 12px;
    margin: 10px 0;
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.xm-level-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24, #8b5cf6, #06b6d4);
}

.xm-level-header {
    font-size: 17px;
    font-weight: 600;
    color: #06b6d4;
    margin-bottom: 10px;
}

.xm-level-sliders {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xm-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xm-slider-row label {
    font-size: 16px;
    color: #e5e7eb;
    font-weight: 500;
    min-width: 65px;
    white-space: nowrap;
}

.xm-slider-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, #8b5cf6, #6366f1, #06b6d4);
    border-radius: 5px;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.xm-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(251, 191, 36, 0.5);
    border: 2px solid #fff;
    transition: all 0.2s ease;
}

.xm-slider-row input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(251, 191, 36, 0.7);
}

.xm-slider-row input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.xm-level-min-val, .xm-level-max-val {
    color: #fbbf24;
    font-weight: 700;
    font-size: 17px;
}

/* ==================== POI (Points d'intérêt) ==================== */

.xm-poi-zone-sep {
    padding: 8px 14px 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ec4899;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid rgba(236, 72, 153, 0.15);
    margin-top: 4px;
}

.xm-poi-item {
    cursor: pointer;
}

.xm-filter-poi-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

/* POI Marker sur la carte */
.xm-poi-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3), transparent);
}

.xm-poi-custom-icon .xm-poi-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ec4899;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5);
    background: #1a1a2e;
    transition: transform 0.2s;
}

.xm-poi-custom-icon .xm-poi-img:hover {
    transform: scale(1.2);
}

.xm-poi-emoji {
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.xm-poi-tooltip {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b47 100%) !important;
    color: #f9a8d4 !important;
    border: 1px solid rgba(236, 72, 153, 0.4) !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3) !important;
}

.xm-popup-poi h3 {
    color: #f9a8d4;
    border-bottom-color: rgba(236, 72, 153, 0.3);
}

/* ==================== FAVORIS ==================== */

.xm-favorites-list {
    max-height: 200px;
    overflow-y: auto;
}

.xm-fav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px !important;
    cursor: pointer;
}

.xm-fav-item:hover {
    background: rgba(251, 191, 36, 0.1) !important;
}

.xm-fav-star {
    font-size: 1rem;
    flex-shrink: 0;
}

.xm-fav-item .xm-name {
    flex: 1;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xm-fav-item .xm-coords {
    position: static;
    background: none;
    padding: 0;
    font-size: 0.75rem;
    color: var(--xm-muted);
}

.xm-fav-goto, .xm-fav-del {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.xm-fav-goto:hover {
    opacity: 1;
    color: #06b6d4;
}

.xm-fav-del:hover {
    opacity: 1;
    color: #ef4444;
}

.xm-empty-msg {
    padding: 15px;
    text-align: center;
    color: var(--xm-muted);
    font-size: 0.85rem;
    font-style: italic;
}

.xm-cloud-badge {
    font-size: 0.75rem;
    margin-left: 4px;
    opacity: 0.7;
}

/* ==================== MARKER TEMPORAIRE ==================== */

.xm-temp-marker {
    background: transparent !important;
    border: none !important;
}

.xm-temp-pin {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==================== FAVORIS MARKER ==================== */

.xm-favorite-marker {
    background: transparent !important;
    border: none !important;
}

.xm-favorite-marker .xm-fav-star {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* ==================== POPUP CONTEXTUEL ==================== */

.xm-popup-context h3 {
    font-size: 1.4rem !important;
}

.xm-context-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.xm-ctx-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.xm-ctx-btn:hover {
    background: rgba(255,255,255,0.2);
}

.xm-ctx-fav {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: #1a1a2e !important;
}

.xm-ctx-fav:hover {
    background: linear-gradient(135deg, #fcd34d, #fbbf24) !important;
}

.xm-ctx-close {
    background: rgba(239, 68, 68, 0.3) !important;
}

.xm-ctx-close:hover {
    background: rgba(239, 68, 68, 0.5) !important;
}

/* ==================== POPUP FAVORI ==================== */

.xm-btn-remove-fav {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.xm-btn-remove-fav:hover {
    background: rgba(239, 68, 68, 0.4);
}

/* ==================== MOBILE AMÉLIORÉ ==================== */


/* ==================== MARKER PARTAGÉ ==================== */

.xm-shared-marker {
    background: transparent !important;
    border: none !important;
}

.xm-shared-pin {
    font-size: 36px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
    animation: sharedBounce 1s ease infinite;
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -100%);
}

@keyframes sharedBounce {
    0%, 100% { transform: translate(-50%, -100%) translateY(0); }
    50% { transform: translate(-50%, -100%) translateY(-12px); }
}

/* ==================== TOAST AMÉLIORÉ ==================== */

.xm-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: linear-gradient(135deg, #141928 0%, #1a1230 50%, #0c0f18 100%);
    color: #fff;
    padding: 18px 36px;
    border-radius: 18px;
    font-size: 1.25rem;
    font-weight: 600;
    box-shadow: 
        0 15px 50px rgba(0,0,0,0.7),
        0 0 30px rgba(139, 92, 246, 0.2),
        inset 0 1px 1px rgba(255,255,255,0.1);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
}

.xm-toast::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fbbf24, #8b5cf6, #06b6d4);
    z-index: -1;
    opacity: 0.6;
}

.xm-toast::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #141928 0%, #1a1230 50%, #0c0f18 100%);
    z-index: -1;
}

.xm-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==================== ZONE LABELS - HOVER ONLY ==================== */

.xm-zone-label-hidden {
    opacity: 0 !important;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.xm-zone-label-visible {
    opacity: 1 !important;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

/* ==================== DUNGEON TOOLTIP ==================== */

.xm-dungeon-tooltip {
    background: linear-gradient(135deg, rgba(20, 15, 30, 0.97), rgba(12, 15, 24, 0.97)) !important;
    border: 2px solid rgba(251, 191, 36, 0.6) !important;
    border-radius: 12px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #fbbf24 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 15px rgba(251, 191, 36, 0.15) !important;
    white-space: nowrap !important;
    font-family: 'Rajdhani', sans-serif !important;
    letter-spacing: 0.5px !important;
}

.xm-dungeon-tooltip::before {
    border-top-color: rgba(251, 191, 36, 0.6) !important;
}

/* ==================== ZAAP TOOLTIP ==================== */

.xm-zaap-tooltip {
    background: linear-gradient(135deg, rgba(20, 15, 30, 0.97), rgba(12, 15, 24, 0.97)) !important;
    border: 2px solid rgba(139, 92, 246, 0.6) !important;
    border-radius: 12px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #a78bfa !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 15px rgba(139, 92, 246, 0.15) !important;
    white-space: nowrap !important;
    font-family: 'Rajdhani', sans-serif !important;
    letter-spacing: 0.5px !important;
}

.xm-zaap-tooltip::before {
    border-top-color: rgba(139, 92, 246, 0.6) !important;
}

/* ==================== BOUTON RESET ==================== */

.xm-btn-reset {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(6, 182, 212, 0.08));
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.xm-btn-reset:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(6, 182, 212, 0.2));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.25);
    border-color: rgba(6, 182, 212, 0.5);
}

/* ==================== DUNGEON ITEM SIDEBAR ==================== */

.xm-dungeon-item {
    padding-left: 25px;
}

/* Zone separator in dungeon list */
.xm-dungeon-zone-sep {
    padding: 6px 12px 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #facc15;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(250, 204, 21, 0.15);
    margin-top: 4px;
    opacity: 0.8;
}

.xm-dungeon-zone-sep:first-of-type {
    border-top: none;
    margin-top: 0;
}

/* Count badge */
.xm-count {
    margin-left: auto;
    padding: 1px 7px;
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}


/* ==================== GPS SYSTEM - PREMIUM ==================== */

/* GPS button */
.xm-gps-btn {
    width: 36px !important; height: 36px !important;
    display: flex !important; align-items: center; justify-content: center;
    font-size: 22px; cursor: pointer;
    background: rgba(26,26,46,0.95) !important;
    border: 2px solid rgba(251,191,36,0.4) !important;
    border-radius: 8px !important;
    transition: all 0.2s;
}
.xm-gps-btn:hover, .xm-gps-btn.active {
    background: rgba(251,191,36,0.15) !important;
    border-color: #fbbf24 !important;
    transform: scale(1.05);
}
.xm-gps-btn.active { box-shadow: 0 0 16px rgba(251,191,36,0.4); }

/* GPS cursor */
.xm-gps-cursor { cursor: crosshair !important; }
.xm-gps-cursor .leaflet-interactive { cursor: crosshair !important; }
.xm-gps-cursor .leaflet-marker-icon { cursor: crosshair !important; }

/* GPS panel */
.xm-gps-panel {
    position: absolute; top: 12px; right: 12px; z-index: 1200;
    width: 300px;
    background: linear-gradient(170deg, rgba(20,18,40,0.97), rgba(12,10,28,0.98));
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
    backdrop-filter: blur(20px);
    color: #e2e8f0;
    font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}
.xm-gps-panel.dragging { opacity: 0.92; box-shadow: 0 20px 60px rgba(0,0,0,0.7); }

/* Drag handle */
.xm-gps-drag {
    cursor: grab;
    user-select: none;
}
.xm-gps-drag:active { cursor: grabbing; }

.xm-gps-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px 12px;
    background: linear-gradient(135deg, rgba(251,191,36,0.08), transparent);
    border-bottom: 1px solid rgba(251,191,36,0.12);
}
.xm-gps-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.15rem; font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.xm-gps-logo {
    font-size: 1.3rem;
    -webkit-text-fill-color: initial;
    filter: drop-shadow(0 2px 4px rgba(251,191,36,0.3));
}
.xm-gps-close {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; color: #64748b;
    font-size: 14px; cursor: pointer; transition: 0.2s;
}
.xm-gps-close:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); color: #f87171; }

/* Body */
.xm-gps-body { padding: 14px 16px 16px; }

/* Points (start/end) */
.xm-gps-points {
    position: relative;
    padding: 0 0 0 4px;
}
.xm-gps-point {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    margin-bottom: 6px;
    transition: 0.2s;
}
.xm-gps-point:hover { background: rgba(255,255,255,0.06); }

.xm-gps-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.xm-gps-dot.start {
    background: radial-gradient(circle at 40% 40%, #4ade80, #16a34a);
    box-shadow: 0 0 10px rgba(74,222,128,0.4);
}
.xm-gps-dot.end {
    background: radial-gradient(circle at 40% 40%, #f87171, #dc2626);
    box-shadow: 0 0 10px rgba(248,113,113,0.4);
}
.xm-gps-dot.block {
    background: radial-gradient(circle at 40% 40%, #fbbf24, #d97706);
    box-shadow: 0 0 8px rgba(251,191,36,0.3);
    width: 10px; height: 10px;
}
.xm-gps-connector {
    position: absolute;
    left: 24px;
    top: 40px;
    width: 2px;
    height: 16px;
    background: linear-gradient(to bottom, #4ade80, #f87171);
    border-radius: 1px;
    opacity: 0.4;
}
.xm-gps-pt-info { flex: 1; min-width: 0; }
.xm-gps-pt-label {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 2px;
}
.xm-gps-coord {
    font-size: 0.95rem; color: #94a3b8;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 500;
}

/* Actions */
.xm-gps-actions {
    display: flex; gap: 6px; margin-top: 12px;
}
.xm-gps-go {
    flex: 1;
    padding: 10px 14px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e; border: none; border-radius: 10px;
    font-size: 0.95rem; font-weight: 800; cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    font-family: 'Rajdhani', sans-serif;
}
.xm-gps-go:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(251,191,36,0.35); }
.xm-gps-go:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.xm-gps-go-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}
.xm-gps-go-red:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(239,68,68,0.35); }
.xm-gps-clear {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.04); color: #64748b;
    border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
    font-size: 1rem; cursor: pointer; transition: 0.2s;
    flex-shrink: 0;
}
.xm-gps-clear:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; }

/* Result */
.xm-gps-result {
    margin-top: 12px;
    padding: 12px 14px;
    display: flex; gap: 10px; align-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(139,92,246,0.06));
    border: 1px solid rgba(251,191,36,0.15);
}
.xm-gps-steps {
    font-size: 1.3rem; font-weight: 900; color: #fbbf24;
    letter-spacing: 0.5px;
}
.xm-gps-zaap-info {
    font-size: 0.95rem; font-weight: 700; color: #a78bfa;
    display: flex; align-items: center; gap: 4px;
}
.xm-gps-walk-info {
    font-size: 0.85rem; font-weight: 600; color: #64748b;
}
.xm-gps-error {
    font-size: 0.9rem; color: #f87171; font-weight: 600;
}

/* GPS markers on map */
.xm-gps-marker {
    display: flex !important; align-items: center; justify-content: center;
    font-size: 22px;
    background: none !important; border: none !important;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
}

/* GPS path */
.xm-gps-path { filter: drop-shadow(0 2px 8px rgba(251,191,36,0.4)); }

/* Direction arrows */
.xm-gps-arrow {
    display: flex !important; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 900; color: #fbbf24;
    background: rgba(20,18,40,0.92) !important;
    border: 2px solid rgba(251,191,36,0.5) !important;
    border-radius: 50% !important;
}

/* Zaap jump */
.xm-gps-zaap-icon {
    display: flex !important; align-items: center; justify-content: center;
    font-size: 18px;
    background: rgba(139,92,246,0.25) !important; border: none !important;
    border-radius: 50% !important;
}

/* Block mode (admin) */
.xm-gps-block-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(239,68,68,0.08); color: #f87171;
    border: 1px solid rgba(239,68,68,0.2); border-radius: 10px;
    font-size: 1rem; cursor: pointer; transition: 0.2s;
    flex-shrink: 0;
}
.xm-gps-block-btn:hover, .xm-gps-block-btn.active {
    background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4);
}
.xm-gps-block-panel {
    margin-top: 10px; padding: 12px;
    border-radius: 10px;
    background: rgba(239,68,68,0.04);
    border: 1px solid rgba(239,68,68,0.12);
}
.xm-gps-block-info {
    font-size: 0.75rem; color: #f87171; margin-bottom: 8px; font-weight: 700;
}
.xm-gps-block-count {
    font-size: 0.78rem; color: #f87171; margin-top: 8px; font-weight: 700;
}

/* Mobile GPS */
@media (max-width: 768px) {
    .xm-gps-panel { width: 260px; top: 8px; right: 8px; }
    .xm-gps-header { padding: 12px 14px 10px; }
    .xm-gps-body { padding: 10px 12px 12px; }
    .xm-gps-title { font-size: 1rem; }
}

/* GPS Search */
.xm-gps-search-wrap { position: relative; margin-bottom: 10px; }
.xm-gps-search {
    width: 100%; padding: 9px 12px;
    background: rgba(255,255,255,0.05); color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    font-size: 0.88rem; font-family: inherit;
    outline: none; transition: 0.2s;
    box-sizing: border-box;
}
.xm-gps-search:focus { border-color: rgba(251,191,36,0.4); background: rgba(255,255,255,0.07); }
.xm-gps-search-results {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 10;
    background: rgba(15,15,30,0.98); border: 1px solid rgba(251,191,36,0.2);
    border-radius: 0 0 10px 10px; max-height: 200px; overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.xm-gps-sr {
    padding: 8px 12px; cursor: pointer; font-size: 0.85rem; color: #cbd5e1;
    border-bottom: 1px solid rgba(255,255,255,0.04); transition: 0.15s;
}
.xm-gps-sr:hover { background: rgba(251,191,36,0.1); color: #fff; }
.xm-gps-sr-type { font-size: 0.9rem; margin-right: 4px; }
.xm-gps-sr b { font-weight: 600; color: #e2e8f0; }
.xm-gps-sr small { color: #64748b; margin-left: 6px; font-family: monospace; font-size: 0.75rem; }

/* GPS Toolbar */
.xm-gps-toolbar {
    display: flex; gap: 4px; margin: 8px 0;
    flex-wrap: wrap;
}
.xm-gps-tool {
    flex: 1; min-width: 0;
    padding: 6px 8px;
    background: rgba(255,255,255,0.04); color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
    font-size: 0.72rem; font-weight: 600; cursor: pointer;
    transition: 0.2s; white-space: nowrap;
    font-family: 'Rajdhani', sans-serif;
}
.xm-gps-tool:hover { background: rgba(251,191,36,0.1); color: #fbbf24; border-color: rgba(251,191,36,0.25); }

/* GPS Waypoints */
.xm-gps-wp {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; margin: 4px 0;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; font-size: 0.82rem;
}
.xm-gps-dot.wp {
    width: 10px; height: 10px;
    background: radial-gradient(circle at 40% 40%, #fbbf24, #d97706);
    box-shadow: 0 0 6px rgba(251,191,36,0.3);
    border-radius: 50%; flex-shrink: 0;
}
.xm-gps-wp-label { color: #94a3b8; font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; }
.xm-gps-wp-coord { flex: 1; color: #cbd5e1; font-family: monospace; font-size: 0.82rem; }
.xm-gps-wp-del {
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
    background: rgba(239,68,68,0.1); color: #f87171; border: none; border-radius: 4px;
    cursor: pointer; font-size: 10px; transition: 0.15s;
}
.xm-gps-wp-del:hover { background: rgba(239,68,68,0.25); }

/* GPS Waypoint marker on map */
.xm-gps-wp-marker {
    display: flex !important; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #fbbf24, #d97706) !important;
    border: 2px solid rgba(255,255,255,0.6) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(251,191,36,0.4);
}
.xm-gps-wp-marker span {
    font-size: 12px; font-weight: 900; color: #1a1a2e;
    font-family: 'Rajdhani', sans-serif;
}

/* GPS loading */
.xm-gps-loading { font-size: 0.9rem; color: #94a3b8; font-weight: 600; }

/* Discord button */
.xm-gps-discord { color: #7289da !important; }
.xm-gps-discord:hover { background: rgba(114,137,218,0.15) !important; border-color: rgba(114,137,218,0.3) !important; }

/* Dungeon row in tile tooltip */
.xm-tt-dungeon b { color: #f87171; }
.xm-tt-dungeon img { border-radius: 50%; background: rgba(239,68,68,0.15); padding: 2px; }

/* Dungeon glow on resource marker */
.xm-has-dungeon {
    box-shadow: inset 0 0 0 2px currentColor, 0 3px 12px rgba(0,0,0,0.5), 0 0 0 3px rgba(239,68,68,0.4) !important;
}

/* Popup separator between dungeon and resources */
.xm-popup-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251,191,36,0.2), transparent);
    margin: 12px 0;
}

/* Dungeon section inside combined popup */
.xm-popup-dj-section {
    margin-bottom: 6px;
}
.xm-popup-dj-section + .xm-popup-dj-section {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 8px;
}
