/* Base map section styles */
.map-section {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 6rem auto;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* Container styles */
.map-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background: #000000;
    border-radius: 4px;
    cursor: grab;
}
.main-content > .map-section {
    padding: 2rem; /* Extra padding only on index page */
    margin-left: 7rem ; /* Extra left margin only on index page */
}

/* Specific styles for spawns.html - will use the default centered layout */
.spawn-page .map-section {
    padding: 1rem; /* Regular padding for spawn page */
    margin: 6rem auto; /* Keep it centered */
}


/* Section header specific styles */
.section-header {
    width: 100%; /* Add full width */
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Map controls container */
.map-controls {
    display: flex;
    align-items: center;
    justify-content: center; /* Add center alignment */
    gap: 1rem; /* Add consistent spacing */
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    margin-bottom: 1rem;
    width: 100%; /* Take full width of parent */
    box-sizing: border-box;
}



/* Specific styles for index.html map */
.home-page .map-section {
    margin: 2rem auto; /* Reduced top/bottom margin */
    padding: 0.5rem; /* Reduced padding */
}

.home-page .section-header {
    margin-bottom: 0.5rem; /* Reduced bottom margin for the header */
}

.home-page .map-controls {
    padding: 0.5rem; /* Reduced padding */
    margin-bottom: 0.5rem; /* Reduced bottom margin */
}

/* Specific styles for spawns.html map */
.spawn-page .map-section {
    margin: 2rem auto; /* Center the map on spawns page */
}




.map-container:active {
    cursor: grabbing;
}

.map-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    transition: transform 0.1s ease-out;
}


.map-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

.map-layer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Center the section header */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}




.map-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.map-btn.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.4);
}

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

.zoom-controls {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    padding-left: 1rem;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(0, 255, 255, 0.2);
}

#resetZoom {
    font-size: 0.8rem;
    width: auto;
    padding: 0 0.5rem;
}
.section-header .map-controls {
    margin-top: 1rem;
    width: auto; /* Allow controls to take natural width */
    min-width: 300px; /* Set minimum width */
}

/* Ensure consistent map container sizing */
.map-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    transition: transform 0.1s ease-out;
    display: flex;
    justify-content: center;
}

.map-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
}

.map-layer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Media queries for responsive design */
@media (max-width: 1200px) {
    .map-section {
        margin: 4rem 1rem;
        width: calc(100% - 2rem);
    }
}

@media (max-width: 768px) {
    .map-section {
        margin: 3rem 0.5rem;
        padding: 0.5rem;
    }
    
    .map-controls {
        flex-wrap: wrap;
    }
}