/**
 * MAP MENU MODERN - Стили для современного меню карты
 * Био-дизайн в стиле Evolution Game
 */

/* Скрываем старые селекторы меню когда открыто map menu */
body:has(.map-menu-modern) .menu-buttons {
    display: none !important;
}

.map-menu-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 20, 10, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.map-modern-window {
    background: linear-gradient(135deg, #0a1f15 0%, #0d2818 50%, #0a1f15 100%);
    border: 2px solid #2a5a3a;
    border-radius: 16px;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 0 30px rgba(42, 90, 58, 0.4),
        inset 0 0 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

/* Header */
.map-modern-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(42, 90, 58, 0.3) 0%, transparent 100%);
    border-bottom: 1px solid rgba(42, 90, 58, 0.3);
    flex-shrink: 0;
}

.map-modern-title {
    margin: 0;
    font-size: 1.5rem;
    color: #7fff7f;
    text-shadow: 0 0 10px rgba(127, 255, 127, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-modern-title-icon {
    font-size: 1.8rem;
}

.map-modern-close {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.map-modern-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Content */
.map-modern-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    overflow: hidden;
}

/* Canvas Container */
.map-canvas-container {
    position: relative;
    flex: 1;
    min-height: 300px;
    background: rgba(0, 30, 15, 0.5);
    border: 1px solid rgba(42, 90, 58, 0.4);
    border-radius: 12px;
    overflow: hidden;
}

.map-canvas-modern {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #7fff7f;
}

.map-loading .loading-icon {
    font-size: 3rem;
    animation: pulse 1.5s infinite;
}

.map-loading .loading-text {
    font-size: 1rem;
    color: #a0ffa0;
}

/* Legend */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(0, 30, 15, 0.4);
    border: 1px solid rgba(42, 90, 58, 0.3);
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a0c0a0;
    font-size: 0.9rem;
}

.legend-icon {
    width: 16px;
    height: 16px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.puzzle {
    background: #ffcc00;
    box-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}

.legend-dot.quest {
    background: #00ccff;
    box-shadow: 0 0 5px rgba(0, 204, 255, 0.5);
}

.legend-square {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.legend-square.friendly {
    background: rgba(22, 192, 42, 0.6);
    border: 1px solid #16c02a;
}

.legend-square.enemy {
    background: rgba(173, 2, 2, 0.6);
    border: 1px solid #ad0202;
}

/* Controls */
.map-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.map-preview-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #2a4a3a 0%, #1a3a2a 100%);
    border: 1px solid #3a6a4a;
    border-radius: 8px;
    color: #c0e0c0;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.map-preview-btn:hover {
    background: linear-gradient(180deg, #3a6a4a 0%, #2a5a3a 100%);
    border-color: #4a8a5a;
}

.map-preview-btn.active {
    background: linear-gradient(180deg, #2a6a3a 0%, #1a5a2a 100%);
    border-color: #7fff7f;
    color: #7fff7f;
    box-shadow: 0 0 10px rgba(127, 255, 127, 0.3);
}

.map-preview-btn .btn-icon {
    font-size: 1.1rem;
}

.map-hint {
    color: #6a8a6a;
    font-size: 0.85rem;
    font-style: italic;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* Hidden utility */
.map-menu-modern .hidden {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .map-modern-window {
        width: 98%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .map-modern-header {
        padding: 12px 15px;
    }
    
    .map-modern-title {
        font-size: 1.2rem;
    }
    
    .map-modern-content {
        padding: 10px;
    }
    
    .map-canvas-container {
        min-height: 250px;
    }
    
    .map-legend {
        gap: 10px;
        padding: 10px;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .map-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .map-preview-btn {
        justify-content: center;
    }
    
    .map-hint {
        text-align: center;
    }
}
