/* 地图界面样式 */

#map-view {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a1a 100%);
    position: relative;
    overflow: hidden;
}

#map-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(74, 138, 200, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(138, 74, 200, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(200, 74, 138, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

#map-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

/* 地图网格 */
#map-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px solid rgba(74, 138, 200, 0.3);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

#map-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 49%, rgba(74, 138, 200, 0.1) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(74, 138, 200, 0.1) 50%, transparent 51%);
    background-size: 20px 20px;
    pointer-events: none;
}

/* 地图区域 */
.map-area {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(74, 138, 200, 0.3);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.map-area:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4a8ac8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 138, 200, 0.3);
}

.map-area.current {
    background: rgba(74, 138, 200, 0.3);
    border-color: #4a8ac8;
    box-shadow: 0 0 20px rgba(74, 138, 200, 0.5);
}

.map-area.accessible {
    border-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}

.map-area.inaccessible {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
}

.map-area.hidden {
    background: rgba(0, 0, 0, 0.5);
    border-color: #8a8a8a;
    opacity: 0.3;
}

/* 区域图标 */
.area-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #4a8ac8, #8a4ac8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 15px rgba(74, 138, 200, 0.5);
    position: relative;
}

.area-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.area-icon.npc {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.5);
}

.area-icon.enemy {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

.area-icon.shop {
    background: linear-gradient(45deg, #ffd93d, #ffed4d);
    box-shadow: 0 0 15px rgba(255, 217, 61, 0.5);
}

.area-icon.quest {
    background: linear-gradient(45deg, #c84a8a, #d85a9a);
    box-shadow: 0 0 15px rgba(200, 74, 138, 0.5);
}

/* 区域名称 */
.area-name {
    font-size: 0.8rem;
    font-weight: bold;
    color: #4a8ac8;
    text-align: center;
    margin-bottom: 0.3rem;
}

.area-name.current {
    color: #4ecdc4;
    text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

/* 区域状态指示器 */
.area-status {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid white;
}

.area-status.event {
    background: #ffd93d;
    animation: pulse 2s infinite;
}

.area-status.danger {
    background: #ff6b6b;
    animation: pulse 1s infinite;
}

.area-status.quest {
    background: #4ecdc4;
}

.area-status.npc {
    background: #8a4ac8;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* 地图信息面板 */
#map-info {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4a8ac8;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

#map-info h3 {
    color: #4a8ac8;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

#area-description {
    color: #cccccc;
    line-height: 1.4;
    font-size: 0.9rem;
}

/* 地图控制按钮 */
#map-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

.direction-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #4a8ac8, #8a4ac8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 138, 200, 0.3);
    position: relative;
    overflow: hidden;
}

.direction-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: rotate 3s linear infinite;
}

.direction-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 138, 200, 0.5);
}

.direction-btn:active {
    transform: translateY(0);
}

.direction-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 特殊区域样式 */
.map-area.boss {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    animation: bossGlow 2s ease-in-out infinite alternate;
}

@keyframes bossGlow {
    from { box-shadow: 0 0 20px rgba(255, 107, 107, 0.3); }
    to { box-shadow: 0 0 30px rgba(255, 107, 107, 0.6); }
}

.map-area.safe {
    background: rgba(78, 205, 196, 0.2);
    border-color: #4ecdc4;
}

.map-area.training {
    background: rgba(255, 217, 61, 0.2);
    border-color: #ffd93d;
}

.map-area.hidden-area {
    background: rgba(0, 0, 0, 0.8);
    border-color: #8a8a8a;
    position: relative;
}

.map-area.hidden-area::after {
    content: '?';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: #8a8a8a;
    font-weight: bold;
}

/* 路径连接线 */
.map-path {
    position: absolute;
    background: linear-gradient(45deg, #4a8ac8, #8a4ac8);
    border-radius: 2px;
    z-index: 0;
    animation: pathGlow 2s ease-in-out infinite alternate;
}

@keyframes pathGlow {
    from { box-shadow: 0 0 5px rgba(74, 138, 200, 0.3); }
    to { box-shadow: 0 0 10px rgba(74, 138, 200, 0.6); }
}

/* 事件指示器 */
.event-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #ffd93d;
    border-radius: 50%;
    animation: eventPulse 1s ease-in-out infinite;
    z-index: 2;
}

@keyframes eventPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.5; }
}

/* 迷你地图 */
.mini-map {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 150px;
    height: 100px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #4a8ac8;
    border-radius: 8px;
    padding: 0.5rem;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.mini-map-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 1px;
    height: 100%;
}

.mini-map-cell {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mini-map-cell.current {
    background: #4ecdc4;
    box-shadow: 0 0 5px rgba(78, 205, 196, 0.5);
}

.mini-map-cell.accessible {
    background: rgba(74, 138, 200, 0.5);
}

.mini-map-cell.inaccessible {
    background: rgba(255, 107, 107, 0.5);
}

/* 区域详情面板 */
.area-details {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #4a8ac8;
    border-radius: 10px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    z-index: 5;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.area-details.show {
    transform: translateY(0);
}

.area-details h4 {
    color: #4a8ac8;
    margin-bottom: 0.5rem;
}

.area-details p {
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.area-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.area-feature {
    background: rgba(74, 138, 200, 0.2);
    border: 1px solid #4a8ac8;
    border-radius: 15px;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    color: #4a8ac8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #map-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(8, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .map-area {
        padding: 0.5rem;
    }
    
    .area-icon {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .area-name {
        font-size: 0.7rem;
    }
    
    .direction-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    #map-controls {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .mini-map {
        width: 120px;
        height: 80px;
    }
    
    .area-details {
        left: 0.5rem;
        right: 0.5rem;
        padding: 0.8rem;
    }
} 