.map-container {
    max-width: 100%;
    margin: 2rem auto;
    padding: 0 1rem;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-controls {
    background: rgba(10, 15, 25, 0.7);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    width: 1773px;
    max-width: 100%;
}

.floor-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.floor-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(120, 150, 180, 0.3);
    color: #7896b4;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.floor-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: #7896b4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(120, 150, 180, 0.3);
}

.floor-display {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(120, 150, 180, 0.3);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-align: center;
    min-width: 120px;
}

.floor-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.floor-number {
    display: block;
    color: #7896b4;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
}

.map-tools {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tool-btn {
    background: rgba(60, 60, 80, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-btn:hover {
    background: rgba(80, 80, 100, 0.8);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.tool-btn.admin-btn {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.4), rgba(139, 0, 0, 0.2));
    border-color: rgba(220, 20, 60, 0.5);
    color: #ff6b6b;
}

.tool-btn.admin-btn:hover {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.6), rgba(139, 0, 0, 0.3));
    border-color: #DC143C;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(20, 20, 30, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.zoom-btn {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #D4AF37;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: #D4AF37;
}

.zoom-level {
    color: #D4AF37;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    font-size: 0.95rem;
}

.map-viewport {
    background: transparent;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    overflow: auto;
    position: relative;
    width: 100%;
    max-width: 1773px;
    height: 800px;
    cursor: grab;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
}

.map-viewport::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.map-viewport::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.map-viewport::-webkit-scrollbar-thumb {
    background: rgba(120, 150, 180, 0.5);
    border-radius: 4px;
}

.map-viewport::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 150, 180, 0.7);
}

.map-viewport:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
}

.map-viewport:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
}

.map-viewport:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
}

.map-viewport:fullscreen .map-wrapper,
.map-viewport:-webkit-full-screen .map-wrapper,
.map-viewport:-moz-full-screen .map-wrapper {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
}

.map-viewport:fullscreen .map-image,
.map-viewport:-webkit-full-screen .map-image,
.map-viewport:-moz-full-screen .map-image {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

.map-viewport:active {
    cursor: grabbing;
}

.map-wrapper {
    position: relative;
    width: 1773px;
    height: 2108px;
}

.map-image {
    display: block;
    width: 1773px;
    height: 2108px;
    image-rendering: pixelated;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: 0 0;
}

.markers-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 1773px;
    height: 2108px;
    pointer-events: none;
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: all;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #FFD700;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: markerPulse 2s infinite;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
    z-index: 20;
}

@keyframes markerPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 215, 0, 0);
    }
}

.marker-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* Hover effect para marcadores sem bolinha (outfit/custom) */
[data-id]:not(.map-marker):hover {
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.8));
    transform: translate(-50%, -50%) scale(1.1);
    transition: all 0.3s ease;
}

[data-id]:not(.map-marker):hover .marker-tooltip {
    opacity: 1;
}

.marker-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.98);
    border: 2px solid #D4AF37;
    border-radius: 8px;
    padding: 0.75rem;
    min-width: 200px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.map-marker:hover .marker-tooltip {
    opacity: 1;
}

.marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #D4AF37;
}

.marker-tooltip strong {
    display: block;
    color: #D4AF37;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.marker-tooltip p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.marker-tooltip small {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-family: monospace;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, rgba(212, 175, 55, 0.1) 0px, transparent 1px, transparent 50px, rgba(212, 175, 55, 0.1) 51px),
        repeating-linear-gradient(90deg, rgba(212, 175, 55, 0.1) 0px, transparent 1px, transparent 50px, rgba(212, 175, 55, 0.1) 51px);
    pointer-events: none;
    z-index: 5;
}

@keyframes markerPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.7; }
}

@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

.highlighted-marker {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    animation: markerPulse 2s ease-in-out infinite !important;
    z-index: 100 !important;
}

.map-info {
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.info-item i {
    color: #D4AF37;
    font-size: 1.1rem;
}

.info-item span {
    color: rgba(255, 255, 255, 0.7);
}

.marker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: rgba(10, 15, 25, 0.95);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 12px;
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #4A90E2;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin: 0;
}

.close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #D4AF37;
}

.modal-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-body .form-group {
    grid-column: span 2;
}

.modal-body .form-group.half-width {
    grid-column: span 1;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    color: #4A90E2;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background: rgba(20, 30, 48, 0.8);
    border: 1px solid rgba(74, 144, 226, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-input:read-only {
    background: rgba(40, 40, 50, 0.5);
    cursor: not-allowed;
}

input[type="color"].form-input {
    height: 50px;
    padding: 4px;
    cursor: pointer;
    border: 2px solid rgba(74, 144, 226, 0.4);
}

input[type="color"].form-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"].form-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

input[type="color"].form-input::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(74, 144, 226, 0.3);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #7896b4, #5a7a99);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8aa6c4, #7896b4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(120, 150, 180, 0.4);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(120, 150, 180, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: #7896b4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(120, 150, 180, 0.3);
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: linear-gradient(135deg, #c41f1f, #a31717);
    color: #ffffff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d43737, #c41f1f);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 31, 31, 0.3);
}

.modal-footer {
    display: flex;
    gap: 10px;
}

/* Confirm Delete Modal */
.confirm-delete-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.outfit-grid {
    scrollbar-width: thin;
    scrollbar-color: #4A90E2 rgba(30, 40, 60, 0.5);
}

.outfit-grid::-webkit-scrollbar {
    width: 8px;
}

.outfit-grid::-webkit-scrollbar-track {
    background: rgba(30, 40, 60, 0.5);
    border-radius: 4px;
}

.outfit-grid::-webkit-scrollbar-thumb {
    background: #4A90E2;
    border-radius: 4px;
}

.outfit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(40, 50, 70, 0.6);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.outfit-item:hover {
    background: rgba(50, 60, 80, 0.8);
    border-color: #4A90E2;
    transform: scale(1.05);
}

.outfit-item.selected {
    background: rgba(74, 144, 226, 0.3);
    border-color: #4A90E2;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.outfit-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: pixelated;
}

.outfit-item span {
    font-size: 10px;
    color: #ccc;
    margin-top: 4px;
}


@media (max-width: 768px) {
    .map-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .floor-selector,
    .map-tools,
    .zoom-controls {
        width: 100%;
        justify-content: center;
    }
    
    .map-viewport {
        height: 500px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
