/* SYNTROPY v6.5 */

#orbital-system {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

#engravingCanvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}

#core-node {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 30;
    cursor: pointer;
}

.core-sphere {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at 28% 18%, 
        rgba(255, 255, 255, 0.85) 0%,
        rgba(200, 250, 255, 0.55) 10%,
        rgba(100, 200, 230, 0.35) 30%,
        rgba(50, 140, 180, 0.7) 50%,
        rgba(25, 80, 110, 0.9) 70%,
        rgba(6, 182, 212, 0.4) 100%
    );
    box-shadow:
        inset 0 0 70px rgba(220, 255, 255, 0.45),
        inset -30px -30px 60px rgba(0,0,0,0.45),
        inset 20px 20px 40px rgba(200,250,255,0.2),
        0 0 100px rgba(120, 220, 250, 0.5),
        0 0 60px rgba(100, 210, 240, 0.4),
        0 30px 70px rgba(0, 0, 0, 0.5),
        0 50px 100px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(220, 255, 255, 0.7);
    transition: all 0.4s ease;
    overflow: hidden;
}

.core-sphere::before {
    content: '';
    position: absolute;
    top: 4%;
    left: 6%;
    width: 48%;
    height: 32%;
    background: radial-gradient(ellipse at 35% 35%, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.5) 20%,
        rgba(220, 250, 255, 0.25) 45%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(3px);
}

/* Punto de luz blanca nítido (efecto cristal mojado) */
.core-sphere .sphere-content::before {
    content: "";
    position: absolute;
    top: 12%;
    left: 18%;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, 
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,0.8) 30%,
        rgba(200,250,255,0.4) 60%,
        transparent 100%
    );
    border-radius: 50%;
    filter: blur(1px);
    z-index: 10;
}

.core-sphere::after {
    content: '';
    position: absolute;
    bottom: 8%;
    right: 8%;
    width: 28%;
    height: 18%;
    background: rgba(150, 235, 255, 0.35);
    border-radius: 50%;
    filter: blur(14px);
}

.core-sphere:hover {
    transform: scale(1.08);
    box-shadow:
        inset 0 0 70px rgba(200, 250, 255, 0.45),
        inset -30px -30px 60px rgba(0,0,0,0.5),
        inset 18px 18px 35px rgba(180,240,255,0.18),
        0 0 100px rgba(100, 210, 240, 0.55),
        0 35px 80px rgba(0, 0, 0, 0.65);
}

.sphere-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Efecto de refracción de cristal para texto */
.core-sphere .sphere-content span {
  position: relative;
  filter: url('#glass-distortion');
  text-shadow: 
    0.5px 0 0 rgba(100, 220, 255, 0.3),
    -0.5px 0 0 rgba(255, 200, 220, 0.2);
}

/* SVG filter para distorsión de cristal (se inyecta en el HTML) */
.glass-filter {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.section-node {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 25;
    cursor: pointer;
    pointer-events: auto;
}

.node-sphere {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at 28% 18%, 
        rgba(250, 255, 255, 0.7) 0%,
        rgba(180, 240, 255, 0.4) 12%,
        rgba(60, 130, 160, 0.75) 45%,
        rgba(25, 70, 95, 0.93) 70%,
        rgba(6, 182, 212, 0.3) 100%
    );
    box-shadow:
        inset 0 0 50px rgba(200, 250, 255, 0.3),
        inset -28px -28px 55px rgba(0,0,0,0.55),
        inset 15px 15px 30px rgba(180,240,255,0.1),
        0 0 55px rgba(100, 210, 240, 0.35),
        0 25px 55px rgba(0, 0, 0, 0.55),
        0 45px 90px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(200, 250, 255, 0.55);
    transition: all 0.4s ease;
    overflow: hidden;
}

.node-sphere::before {
    content: '';
    position: absolute;
    top: 4%;
    left: 6%;
    width: 45%;
    height: 30%;
    background: radial-gradient(ellipse at 35% 35%, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.5) 20%,
        rgba(220, 250, 255, 0.25) 45%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(2px);
}

/* Punto de luz blanca nítido para nodos */
.node-sphere .sphere-content::before {
    content: "";
    position: absolute;
    top: 10%;
    left: 15%;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, 
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,0.8) 30%,
        rgba(200,250,255,0.4) 60%,
        transparent 100%
    );
    border-radius: 50%;
    filter: blur(0.5px);
    z-index: 10;
}

.node-sphere::after {
    content: '';
    position: absolute;
    bottom: 6%;
    right: 6%;
    width: 25%;
    height: 15%;
    background: rgba(150, 235, 255, 0.3);
    border-radius: 50%;
    filter: blur(12px);
}

.section-node:hover .node-sphere {
    transform: scale(1.15);
    box-shadow:
        inset 0 0 60px rgba(200, 250, 255, 0.4),
        inset -28px -28px 55px rgba(0,0,0,0.55),
        inset 15px 15px 30px rgba(180,240,255,0.15),
        0 0 75px rgba(100, 210, 240, 0.5),
        0 30px 65px rgba(0, 0, 0, 0.6);
    border-color: rgba(200, 250, 255, 0.8);
}

.node-sphere .sphere-content {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.node-label-container {
    position: absolute;
    top: 115%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
}

.node-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(200, 240, 255, 0.85);
    background: transparent;
    padding: 8px 0;
    border: none;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 4px 16px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 20, 30, 0.8);
    transition: all 0.3s ease;
}

.section-node:hover .node-label {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 4px 16px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(100, 210, 240, 0.5);
}

#section-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 520px;
    max-width: 90vw;
    height: 100vh;
    background: rgba(5, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -30px 0 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(6, 182, 212, 0.05);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    display: flex;
    flex-direction: column;
}
#section-sidebar.sidebar-open {
    padding-top: 80px;
    transform: translateX(0);
}

.system-blur {
    filter: blur(10px) brightness(0.3);
    transition: all 0.5s ease;
}

#hint-text {
    position: absolute;
    bottom: 40px;
    width: 100%;
    text-align: center;
    z-index: 20;
}

#hint-text span {
    color: rgba(130, 220, 250, 0.55);
    font-size: 0.72rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .core-sphere { width: 120px; height: 120px; }
    .node-sphere { width: 90px; height: 90px; }
    .node-label { font-size: 0.6rem; padding: 8px 12px; }
}

/* Pantallas muy pequeñas (<420px) */
@media (max-width: 420px) {
    #orbital-system {
    }
    .core-sphere { width: 90px; height: 90px; }
    .core-sphere .sphere-content i { width: 32px; height: 32px; }
    .core-sphere .sphere-content span { font-size: 7px; letter-spacing: 0.15em; }
    .node-sphere { width: 65px; height: 65px; }
    .node-sphere .sphere-content i { width: 24px; height: 24px; }
    .node-label { font-size: 0.45rem; letter-spacing: 0.1em; padding: 2px 0; }
    .node-label-container { white-space: normal; max-width: 80px; line-height: 1.0; top: 105%; }
    #hint-text { display: none; }
}
