:root {
    --bg-color: #0f172a;       
    --nav-color: rgba(30, 41, 59, 0.7); 
    --text-color: #f8fafc;     
    --active-color: #8b5cf6;   
    --glow: rgba(139, 92, 246, 0.4); 
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    font-family: 'Segoe UI', system-ui, sans-serif;
    /* Ya no se requiere padding-bottom gracias al Flexbox del HTML */
}

/* =========================================
   MAGIC SOCIAL SHARE MENU
   ========================================= */
.menu {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu .toggle {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #1e293b;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 0 0 20px var(--glow);
    transition: transform 1.25s, box-shadow 0.3s;
    z-index: 10;
}

.menu .toggle:hover {
    box-shadow: 0 0 30px var(--active-color);
}

.menu:hover .toggle {
    transform: rotate(360deg);
}

.menu li {
    position: absolute;
    list-style: none;
    left: 0;
    transform-origin: 140px;
    transition: 0.5s;
    transition-delay: calc(0.1s * var(--i));
    transform: rotate(0deg) translateX(110px);
}

.menu:hover li {
    transform: rotate(calc(360deg / 8 * var(--i)));
}

.menu li a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: #1e293b;
    border-radius: 50%;
    transform: rotate(calc(360deg / -8 * var(--i)));
    font-size: 1.5rem;
    color: var(--clr);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: 0.5s;
}

.menu li a:hover {
    color: #fff;
    background: var(--clr);
    box-shadow: 0 0 15px var(--clr), 0 0 30px var(--clr);
}

/* =========================================
   ANIMATED NAVBAR (INFERIOR)
   ========================================= */
.navigation-container {
    /* Cambio clave: de fixed a relative para que siga el flujo del HTML */
    position: relative; 
    display: flex;
    justify-content: center;
    background: transparent;
    padding: 15px 0;
    z-index: 1000;
}

.navigation {
    position: relative;
    width: 400px;
    height: 70px;
    background: var(--nav-color);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.navigation ul {
    display: flex;
    width: 350px;
    padding: 0;
    margin: 0;
}

.navigation ul li {
    position: relative;
    list-style: none;
    width: 70px;
    height: 70px;
    z-index: 1;
}

.navigation ul li a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    text-align: center;
    font-weight: 500;
    text-decoration: none;
}

.navigation ul li a .icon {
    position: relative;
    display: block;
    line-height: 75px;
    font-size: 1.5em;
    text-align: center;
    transition: 0.5s;
    color: rgba(255, 255, 255, 0.5);
}

.navigation ul li.active a .icon {
    transform: translateY(-35px);
    color: var(--text-color);
}

.navigation ul li a .text {
    position: absolute;
    color: var(--text-color);
    font-weight: 400;
    font-size: 0.75em;
    letter-spacing: 0.05em;
    transition: 0.5s;
    opacity: 0;
    transform: translateY(20px);
}

.navigation ul li.active a .text {
    opacity: 1;
    transform: translateY(10px);
}

.indicator {
    position: absolute;
    top: -50%;
    width: 70px;
    height: 70px;
    background: var(--active-color);
    border-radius: 50%;
    border: 6px solid var(--bg-color);
    transition: 0.5s;
    box-shadow: 0 0 15px var(--glow);
    pointer-events: none; /* Evita que la bolita interfiera con el mouse hover */
}

.indicator::before, .indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: transparent;
}

.indicator::before {
    left: -22px;
    border-top-right-radius: 20px;
    box-shadow: 1px -10px 0 0 var(--bg-color);
}

.indicator::after {
    right: -22px;
    border-top-left-radius: 20px;
    box-shadow: -1px -10px 0 0 var(--bg-color);
}

/* Desplazamiento del indicador */
.navigation ul li:nth-child(1).active ~ .indicator { transform: translateX(calc(70px * 0)); }
.navigation ul li:nth-child(2).active ~ .indicator { transform: translateX(calc(70px * 1)); }
.navigation ul li:nth-child(3).active ~ .indicator { transform: translateX(calc(70px * 2)); }
.navigation ul li:nth-child(4).active ~ .indicator { transform: translateX(calc(70px * 3)); }
.navigation ul li:nth-child(5).active ~ .indicator { transform: translateX(calc(70px * 4)); }