.map-container {
    position: relative;
    width: 100%;
    padding-top: 58.9%;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--borderlands-orange);
    border-radius: 4px;
    overflow: hidden;
}

.map-pins-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.usa-map-image {
    position: absolute;
    top: 0;
    right: 50px;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.map-pin {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--borderlands-orange);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    left: var(--x);
    top: var(--y);
    cursor: pointer;
    z-index: 4;
}

/* Grid Effect */
.map-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
            linear-gradient(rgba(255, 107, 0, 0.1) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 107, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 2;
}

/* Scan Effect */
.map-scan {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            to bottom,
            transparent,
            rgba(0, 255, 0, 0.1),
            transparent
    );
    animation: scan 3s linear infinite;
    pointer-events: none;
    z-index: 3;
}

/* Map Pins */

.map-pin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--borderlands-orange);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

/* Tooltips */
.map-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--borderlands-orange);
    padding: 10px;
    width: 200px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 5;
}

.map-pin:hover .map-tooltip {
    visibility: visible;
    opacity: 1;
}

.map-tooltip-title {
    color: var(--borderlands-yellow);
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.map-tooltip-status {
    color: var(--terminal-green);
    font-size: 12px;
    margin-bottom: 5px;
}

.map-tooltip-info {
    color: white;
    font-size: 12px;
}

/* Animations */
@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

@keyframes pulse {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    100% {
        width: 30px;
        height: 30px;
        opacity: 0;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .terminal-container {
        padding: 1rem;
        overflow: hidden;
    }

    .map-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: -1rem;
        padding: 1rem;
        padding-right: 2rem;
    }

    .map-container {
        height: 500px;
        min-width: 600px;
        width: calc(100% + 1rem);
        margin: 0;
        border-radius: 0;
    }

    .usa-map-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .map-grid,
    .map-scan {
        width: 100%;
    }

    /* Adjust tooltip position for mobile */
    .map-tooltip {
        width: 150px;
        font-size: 12px;
    }

    .map-tooltip-title {
        font-size: 12px;
    }

    .map-tooltip-status,
    .map-tooltip-info {
        font-size: 10px;
    }

    .map-pin {
        transform: scale(1.5); /* Make pins bigger on mobile */
    }
}