/*
Theme Name: WeaponMod Theme
Theme URI: https://g.aitags.cn/
Author: Your Name
Author URI: #
Description: 三角洲行动改枪码主题复刻
Version: 1.0
Text Domain: weaponmod-theme
*/

/* 基础重置（和目标站Tailwind一致） */
@import url('/wp-content/themes/weaponmod-theme/assets/css/all.min.css');
:root {
    --wp--preset--color--indigo-700: #4338ca;
    --wp--preset--color--indigo-600: #4f46e5;
    --wp--preset--color--indigo-300: #a5b4fc;
    --wp--preset--color--indigo-200: #c7d2fe;
    --wp--preset--color--gray-900: #111827;
    --wp--preset--color--gray-800: #1f2937;
    --wp--preset--color--gray-700: #374151;
    --wp--preset--color--gray-600: #4b5563;
    --wp--preset--color--gray-500: #6b7280;
    --wp--preset--color--gray-400: #9ca3af;
    --wp--preset--color--gray-300: #d1d5db;
    --wp--preset--color--gray-200: #e5e7eb;
    --wp--preset--color--gray-100: #f3f4f6;
    --wp--preset--color--gray-50: #f9fafb;
    --wp--preset--color--white: #ffffff;
    --wp--preset--color--black: #000000;
    --wp--preset--color--green-600: #16a34a;
    --wp--preset--color--green-400: #4ade80;
}

/* 基础布局（复刻目标站） */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 地图遮罩层 - 官方风格 */
.map-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://game.gtimg.cn/images/dfm/cp/a20240729directory/map_mask.png');
    background-position: top;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;  /* 让点击穿透，不影响地图操作 */
    z-index: 500;          /* 确保遮罩层在地图之上但低于控件 */
}

/* 确保地图容器相对定位，作为遮罩层的参考系 */
#map {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0a1a2a;  /* 深蓝色基底 */
}

/* 让 Leaflet 容器透明，显示底层的深蓝色 */
.leaflet-container {
    background: transparent !important;
}



/* ========== 地图工具专属样式 ========== */
/* 用于template-delta-force-tiles.php */

/* 地图容器基础设置 */
html.map-tool-page, 
body.map-tool-page {
    height: 100%;
    overflow: hidden;
    background: #191e21;
}

/* 地图主容器 */
#map {
    width: 100%;
    height: 100%;
    background: #191e21;
    position: relative;
    overflow: hidden;
    margin-left: 80px;  /* 添加这行，向右偏移20px */
    width: calc(100% - 80px);  /* 修改这行，宽度减去偏移量 */
}

/* Leaflet 透明层设置 */
.leaflet-tile-container,
.leaflet-tile-pane,
.leaflet-overlay-pane,
.leaflet-shadow-pane,
.leaflet-marker-pane,
.leaflet-tooltip-pane,
.leaflet-popup-pane,
.leaflet-control-container,
.leaflet-layer {
    background: transparent !important;
}

.leaflet-tile {
    background: transparent !important;
}

/* 导航面板 - 融合官方和数据帝风格 */
.map-nav-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 320px;
    max-height: calc(100vh - 40px);
    background: rgba(17, 24, 39, 0.95);  /* 使用var(--wp--preset--color--gray-900)的RGBA */
    backdrop-filter: blur(10px);
    color: var(--wp--preset--color--gray-100);
    z-index: 1000;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--wp--preset--color--indigo-600);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--wp--preset--color--indigo-600) var(--wp--preset--color--gray-800);
}

.map-nav-panel::-webkit-scrollbar {
    width: 6px;
}

.map-nav-panel::-webkit-scrollbar-track {
    background: var(--wp--preset--color--gray-800);
    border-radius: 3px;
}

.map-nav-panel::-webkit-scrollbar-thumb {
    background: var(--wp--preset--color--indigo-600);
    border-radius: 3px;
}

/* 大屏适配 */
@media (min-width: 1024px) {
    .map-nav-panel {
        left: 220px;  /* 为主站侧边栏留出空间 */
    }
}

/* 导航头部 */
.map-nav-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--wp--preset--color--gray-700);
}

.map-nav-header h2 {
    color: var(--wp--preset--color--indigo-300);
    font-size: 24px;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.map-version {
    background: var(--wp--preset--color--indigo-700);
    padding: 4px 10px;
    border-radius: 4px;
    color: white;
}

.map-progress {
    background: var(--wp--preset--color--gray-800);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--wp--preset--color--green-400);
}

/* 模式切换按钮组 */
.map-mode-switch {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    background: var(--wp--preset--color--gray-800);
    padding: 5px;
    border-radius: 8px;
}

.map-mode-btn {
    flex: 1;
    background: transparent;
    color: var(--wp--preset--color--gray-300);
    border: none;
    padding: 8px 5px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.map-mode-btn:hover {
    background: rgba(79, 70, 229, 0.3);
    color: white;
}

.map-mode-btn.active {
    background: var(--wp--preset--color--indigo-600);
    color: white;
}

/* 地图列表 */
.map-list {
    margin: 20px 0;
}

.map-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.map-item:hover {
    background: rgba(79, 70, 229, 0.15);
    border-color: var(--wp--preset--color--indigo-600);
}

.map-item.active {
    background: rgba(79, 70, 229, 0.25);
    border-left: 4px solid var(--wp--preset--color--indigo-400);
}

.map-name {
    flex: 0 0 100px;
    font-weight: 500;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--wp--preset--color--gray-700);
    border-radius: 3px;
    margin: 0 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wp--preset--color--indigo-600), var(--wp--preset--color--green-400));
    border-radius: 3px;
}

.progress-text {
    font-size: 12px;
    color: var(--wp--preset--color--gray-400);
    min-width: 45px;
    text-align: right;
}

/* 区域/楼层切换 */
.map-area-section {
    margin: 20px 0;
    border-top: 1px solid var(--wp--preset--color--gray-700);
    padding-top: 15px;
}

.map-area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: var(--wp--preset--color--indigo-300);
}

.map-area-header:hover {
    background: rgba(79, 70, 229, 0.15);
}

.map-area-items {
    margin-top: 10px;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.map-area-items.show {
    display: grid;
}

.map-area-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    border: 1px solid transparent;
}

.map-area-item:hover {
    background: rgba(79, 70, 229, 0.2);
    border-color: var(--wp--preset--color--indigo-600);
}

.map-area-item.active {
    background: var(--wp--preset--color--indigo-700);
    color: white;
}

/* 图例/点位过滤 */
.map-legend-panel {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.map-legend-panel h4 {
    color: var(--wp--preset--color--gray-300);
    margin: 0 0 12px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-legend-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.map-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wp--preset--color--gray-300);
    font-size: 13px;
    cursor: pointer;
}

.map-legend-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--wp--preset--color--indigo-600);
}

/* 更新日志 */
.map-changelog {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.map-changelog h4 {
    color: var(--wp--preset--color--indigo-300);
    margin: 0 0 10px 0;
    font-size: 16px;
}

.map-log-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--wp--preset--color--gray-700);
    color: var(--wp--preset--color--gray-400);
    font-size: 13px;
}

.map-log-item:last-child {
    border-bottom: none;
}

/* 紧急按钮 */
.map-emergency-btn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3000;
    background: var(--wp--preset--color--indigo-600);
    color: white;
    padding: 20px 40px;
    font-size: 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.5);
    display: none;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.map-emergency-btn.show {
    display: block;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* 隐藏元素 */
.map-hidden {
    display: none !important;
}

/* 临时导航栏兼容样式（如果还需要保留） */
.temp-nav {
    position: absolute;
    top: 220px;
    left: 20px;
    width: 300px;
    background: rgba(17, 24, 39, 0.9);
    color: var(--wp--preset--color--gray-100);
    z-index: 1000;
    padding: 15px;
    border: 1px solid var(--wp--preset--color--indigo-600);
    border-radius: 8px;
}