/* ===== MINIMAP - Dark Modern Design ===== */
.minimap-box {
    position: absolute;
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, rgba(6, 6, 10, 0.97) 0%, rgba(3, 3, 8, 0.98) 100%);
    bottom: 15px;
    right: 15px;
    border-radius: 0px;
    pointer-events: all;
    border: 1px solid rgba(132, 94, 247, 0.15);
    backdrop-filter: blur(20px) saturate(150%);
    display: none;
    flex-direction: column;
    transform-origin: bottom right;
    z-index: 100;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(132, 94, 247, 0.12);
    overflow: hidden;
    transition: all 0.3s ease;
}

.minimap-box.visible {
    display: flex;
    animation: slideInMinimap 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInMinimap {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Collapsed Minimap */
.minimap-box.collapsed {
    height: 48px;
    width: 120px;
    padding: 12px 24px;
    /* Align collapsed minimap with leaderboard accent */
    background: linear-gradient(90deg, rgba(132, 94, 247, 0.12) 0%, rgba(20, 255, 220, 0.06) 100%);
    border: 1px solid rgba(132, 94, 247, 0.15);
    border-radius: 10px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(132, 94, 247, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.8);
    display: flex !important;
    backdrop-filter: blur(20px) saturate(150%);
    position: absolute;
    bottom: 15px;
    right: 15px;
    overflow: hidden;
}

.minimap-box.collapsed:hover {
    border-color: rgba(132, 94, 247, 0.5);
    background: linear-gradient(90deg, rgba(132, 94, 247, 0.18) 0%, rgba(20, 255, 220, 0.1) 100%);
    box-shadow: 
        0 6px 20px rgba(132, 94, 247, 0.4),
        0 0 0 1px rgba(132, 94, 247, 0.4);
    transform: translateY(-2px);
}

.minimap-box.collapsed .minimap-content {
    display: none;
}

.minimap-box.collapsed .minimap-header {
    border-radius: 10px;
    padding: 0;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    width: 100%;
    height: 100%;
    border-bottom: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.minimap-box.collapsed .minimap-header-content {
    justify-content: center;
}

.minimap-box.collapsed .minimap-collapse-btn {
    display: none;
}

.minimap-box.collapsed .minimap-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(132, 94, 247, 0.3), transparent);
    transition: left 0.4s;
    display: block;
}

.minimap-box.collapsed:hover .minimap-header::before {
    left: 100%;
}

/* Minimap Header */
.minimap-header {
    padding: 12px 14px;
    background: linear-gradient(90deg, rgba(132, 94, 247, 0.12) 0%, rgba(20, 255, 220, 0.06) 100%);
    border-bottom: 1px solid rgba(132, 94, 247, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    pointer-events: all;
    position: relative;
    overflow: hidden;
}

.minimap-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(132, 94, 247, 0.15), transparent);
    transition: left 0.4s;
}

.minimap-header:hover::before {
    left: 100%;
}

.minimap-header:hover {
    background: linear-gradient(90deg, rgba(132, 94, 247, 0.18) 0%, rgba(20, 255, 220, 0.1) 100%);
}

.minimap-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

.minimap-icon {
    font-size: 16px;
    filter: drop-shadow(0 0 6px rgba(132, 94, 247, 0.5));
}

.minimap-collapse-btn {
    background: rgba(132, 94, 247, 0.15);
    border: 1px solid rgba(132, 94, 247, 0.3);
    border-radius: 0px;
    color: #ffffff;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
    z-index: 1;
}

.minimap-collapse-btn:hover {
    background: rgba(132, 94, 247, 0.3);
    border-color: rgba(132, 94, 247, 0.5);
    transform: scale(1.05);
}

/* Minimap Content */
.minimap-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0px;
}

.minimap-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0px;
    filter: brightness(0.9) contrast(1.1);
}

/* Subtle Grid Overlay */
.minimap-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(0deg, rgba(132, 94, 247, 0.03) 0px, transparent 1px, transparent 10px),
        repeating-linear-gradient(90deg, rgba(132, 94, 247, 0.03) 0px, transparent 1px, transparent 10px);
    pointer-events: none;
    z-index: 1;
}

.minimap-box:hover {
    border-color: rgba(132, 94, 247, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(132, 94, 247, 0.2);
}

/* Mobile Responsiveness */
@media only screen and (max-width: 1224px) {
    .minimap-box {
        display: none !important;
    }
}
