@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    color: #00ffff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Estrellas de fondo */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.container {
    position: relative;
    z-index: 10;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.space-map {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Guatemala central */
.central-guatemala {
    position: absolute;
    width: 300px;
    height: 300px;
    z-index: 100;
    background: radial-gradient(circle, rgba(0,255,255,0.1) 0%, rgba(0,255,255,0.05) 100%);
    border: 2px solid #00ffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 30px rgba(0,255,255,0.5),
        inset 0 0 30px rgba(0,255,255,0.1);
    animation: pulse 4s infinite;
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 
            0 0 30px rgba(0,255,255,0.5),
            inset 0 0 30px rgba(0,255,255,0.1);
    }
    50% { 
        box-shadow: 
            0 0 50px rgba(0,255,255,0.8),
            inset 0 0 50px rgba(0,255,255,0.2);
    }
}

.central-guatemala svg {
    width: 180px;
    height: 180px;
    filter: drop-shadow(0 0 10px #00ffff);
}

.central-guatemala path {
    stroke-width: 2;
    transition: all 0.3s ease;
    opacity: 0.8;
}

/* Colores del mapa central por franja */
.central-guatemala path.franja-transversal {
    fill: rgba(255,107,53,0.2);
    stroke: #FF6B35;
}

.central-guatemala path.franja-altiplano {
    fill: rgba(155,89,182,0.2);
    stroke: #9B59B6;
}

.central-guatemala path.franja-otros {
    fill: rgba(0,255,255,0.2);
    stroke: #00ffff;
}

/* Departamentos flotantes */
.floating-department {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(0,255,255,0.05);
    border: 1px solid #00ffff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s ease;
    backdrop-filter: blur(5px);
    animation: float 6s ease-in-out infinite;
    z-index: 60;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.floating-department:hover {
    background: rgba(0,255,255,0.15);
    border-color: #ffffff;
    box-shadow: 
        0 0 25px rgba(0,255,255,0.6),
        0 0 50px rgba(0,255,255,0.4),
        inset 0 0 20px rgba(0,255,255,0.1);
    transform: scale(1.15) translateY(-8px);
    z-index: 150;
    border-width: 2px;
}

.floating-department svg {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
}

.floating-department path {
    stroke-width: 1;
    transition: all 0.3s ease;
}

.floating-department:hover path {
    fill: rgba(255,255,255,0.4);
    stroke: #ffffff;
    stroke-width: 2;
    filter: drop-shadow(0 0 8px #ffffff);
}

/* Colores específicos por franja */
.floating-department.franja-transversal {
    border-color: #FF6B35;
}

.floating-department.franja-transversal path {
    fill: rgba(255,107,53,0.3);
    stroke: #FF6B35;
}

.floating-department.franja-transversal:hover {
    border-color: #FF8C69;
    box-shadow: 
        0 0 25px rgba(255,107,53,0.6),
        0 0 50px rgba(255,107,53,0.4),
        inset 0 0 20px rgba(255,107,53,0.1);
}

.floating-department.franja-altiplano {
    border-color: #9B59B6;
}

.floating-department.franja-altiplano path {
    fill: rgba(155,89,182,0.3);
    stroke: #9B59B6;
}

.floating-department.franja-altiplano:hover {
    border-color: #BB7FD1;
    box-shadow: 
        0 0 25px rgba(155,89,182,0.6),
        0 0 50px rgba(155,89,182,0.4),
        inset 0 0 20px rgba(155,89,182,0.1);
}

.floating-department.franja-otros {
    border-color: #00ffff;
}

.floating-department.franja-otros path {
    fill: rgba(0,255,255,0.3);
    stroke: #00ffff;
}

.floating-department.franja-otros:hover {
    border-color: #ffffff;
    box-shadow: 
        0 0 25px rgba(0,255,255,0.6),
        0 0 50px rgba(0,255,255,0.4),
        inset 0 0 20px rgba(0,255,255,0.1);
}

.department-name {
    font-size: 10px;
    text-align: center;
    color: #00ffff;
    font-weight: 400;
    text-shadow: 0 0 5px rgba(0,255,255,0.8);
}

.floating-department:hover .department-name {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

/* Líneas de conexión */
.connection-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    opacity: 0.3;
    animation: pulse-line 3s infinite;
    z-index: 40;
}

@keyframes pulse-line {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Título */
.space-title {
    position: absolute;
    top: 30px;
    left: 30px;
    text-align: left;
    z-index: 200;
}

.space-title h1 {
    font-size: 2.5em;
    font-weight: 900;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0,255,255,0.8);
    margin-bottom: 5px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(0,255,255,0.8); }
    to { text-shadow: 0 0 30px rgba(0,255,255,1), 0 0 40px rgba(0,255,255,0.8); }
}

.space-title p {
    font-size: 1em;
    color: rgba(0,255,255,0.8);
    font-weight: 400;
}

/* Panel de información */
.info-panel {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 300px;
    background: rgba(0,0,0,0.8);
    border: 1px solid #00ffff;
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    z-index: 200;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.info-panel.active {
    opacity: 1;
    transform: translateY(0);
}

.info-panel h3 {
    color: #00ffff;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.info-panel p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 5px;
    font-size: 0.9em;
}

/* Tabla de franjas */
.franjas-panel {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 320px;
    background: rgba(0,0,0,0.8);
    border: 1px solid #00ffff;
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    z-index: 200;
}

.franjas-panel h3 {
    color: #00ffff;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-align: center;
}

.franja-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(0,255,255,0.05);
    transition: all 0.3s ease;
}

.franja-item:hover {
    background: rgba(0,255,255,0.1);
    transform: translateX(5px);
}

.color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.franja-info {
    flex: 1;
}

.franja-info strong {
    color: #ffffff;
    font-size: 0.9em;
    display: block;
    margin-bottom: 3px;
}

.franja-info p {
    color: rgba(255,255,255,0.7);
    font-size: 0.8em;
    line-height: 1.3;
    margin: 0;
}

/* Indicador de vista */
.space-controls {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 200;
}

.control-btn {
    background: rgba(0,255,255,0.2);
    border: 1px solid #00ffff;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 20px;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(0,255,255,0.4);
    animation: glow-indicator 3s ease-in-out infinite alternate;
}

@keyframes glow-indicator {
    from {
        box-shadow: 0 0 15px rgba(0,255,255,0.4);
        text-shadow: 0 0 5px rgba(255,255,255,0.8);
    }
    to {
        box-shadow: 0 0 25px rgba(0,255,255,0.6);
        text-shadow: 0 0 10px rgba(255,255,255,1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .central-guatemala {
        width: 200px;
        height: 200px;
    }

    .central-guatemala svg {
        width: 120px;
        height: 120px;
    }

    .floating-department {
        width: 80px;
        height: 80px;
    }

    .floating-department svg {
        width: 40px;
        height: 40px;
    }

    .department-name {
        font-size: 8px;
    }

    .space-title {
        top: 20px;
        left: 20px;
    }

    .space-title h1 {
        font-size: 1.8em;
    }

    .space-title p {
        font-size: 0.9em;
    }

    .info-panel {
        width: 250px;
        bottom: 20px;
        left: 20px;
    }

    .franjas-panel {
        width: 280px;
        bottom: 20px;
        right: 20px;
        padding: 15px;
    }

    .franjas-panel h3 {
        font-size: 1em;
    }

    .franja-info strong {
        font-size: 0.8em;
    }

    .franja-info p {
        font-size: 0.7em;
    }

    .space-controls {
        top: 20px;
        right: 20px;
    }

    .control-btn {
        padding: 8px 15px;
        font-size: 10px;
    }

    .drag-controls {
        top: 10px;
        right: 10px;
        gap: 5px;
    }

    .drag-button, .reset-button {
        padding: 8px 12px;
        font-size: 0.8em;
    }
}

/* Controles de Drag & Drop */
.drag-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.drag-button, .reset-button {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-shadow: 0 0 10px rgba(0,255,255,0.8);
    box-shadow: 0 0 20px rgba(0,255,255,0.3);
}

.drag-button:hover, .reset-button:hover {
    background: rgba(0,255,255,0.1);
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(0,255,255,0.5);
}

.drag-button.active {
    background: rgba(255,107,53,0.2);
    border-color: #FF6B35;
    color: #FF6B35;
    text-shadow: 0 0 10px rgba(255,107,53,0.8);
    box-shadow: 0 0 20px rgba(255,107,53,0.3);
}

.drag-button.active:hover {
    background: rgba(255,107,53,0.3);
    border-color: #ffffff;
    color: #ffffff;
}

/* Estados de arrastre */
.floating-department.draggable {
    cursor: move;
    transition: none;
}

.floating-department.dragging {
    z-index: 1001;
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0,255,255,0.6);
    opacity: 0.8;
}

.floating-department.draggable:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,255,255,0.4);
}
