/* Attack Map Styles */

/* Background Attack Map */
.attack-map-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.25;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.attack-map-background iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: brightness(0.7) contrast(1.2);
}

/* Background overlay for readability */
.attack-map-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    pointer-events: none;
}

/* Fullscreen Modal */
.attack-map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    flex-direction: column;
}

.attack-map-modal ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.attack-map-modal ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.attack-map-modal ::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.attack-map-modal ::-webkit-scrollbar-thumb:hover {
    background: var(--accent-2);
}

.attack-map-modal.active {
    display: flex;
}

.attack-map-header {
    background: var(--bg);
    border-bottom: 1px solid var(--accent);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.attack-map-title {
    color: var(--accent);
    font-size: 1.2em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.attack-map-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.attack-map-close {
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.attack-map-close:hover {
    background: var(--error);
    color: var(--bg);
}

.attack-map-content {
    flex: 1;
    position: relative;
}

.attack-map-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Background Controls */
.attack-map-bg-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--accent);
    border-radius: 0.5rem;
    z-index: 1000;
    display: none;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: move;
    user-select: none;
}

.attack-map-bg-controls.minimized {
    padding: 0.5rem;
    min-width: auto;
}

.attack-map-bg-controls.expanded {
    padding: 1rem;
    gap: 0.75rem;
    min-width: 200px;
}

.attack-map-bg-controls.visible {
    display: flex;
}

.attack-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 0.5rem 0.5rem 0 0;
    cursor: pointer;
}

.attack-map-title {
    color: var(--accent);
    font-size: 0.9em;
    margin: 0;
    font-weight: bold;
}

.attack-map-toggle {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.8em;
    padding: 0;
}

.bg-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bg-control-label {
    color: var(--text);
    font-size: 0.9em;
    margin: 0;
}

.attack-map-bg-controls.minimized .bg-control-group {
    display: none;
}

.bg-toggle {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bg-toggle:hover,
.bg-toggle.active {
    background: var(--accent);
    color: var(--bg);
}

.opacity-slider {
    width: 100%;
    height: 4px;
    background: var(--muted);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.opacity-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

.opacity-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.fullscreen-btn {
    background: transparent;
    border: 1px solid var(--accent-2);
    color: var(--accent-2);
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fullscreen-btn:hover {
    background: var(--accent-2);
    color: var(--bg);
}

/* Navigation menu item */
.nav a[href="#/attack-map"] {
    background: linear-gradient(45deg, var(--error), var(--accent));
    color: var(--bg);
    font-weight: bold;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
    }
    50% { 
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .attack-map-bg-controls {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
    }
    
    .attack-map-header {
        padding: 0.75rem;
    }
    
    .attack-map-title {
        font-size: 1em;
    }
    
    .attack-map-controls {
        gap: 0.5rem;
    }
}

/* Loading state */
.attack-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent);
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.attack-map-loading::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}