/* app.css - Estilos de la app principal: intro, header, sol, dock, modales, feed, visor. Extraido de index.html */

    /* Agitar pantalla para el Big Bang */
    @keyframes bigBangShake {
        0%, 100% { transform: translate(0, 0); }
        10%, 30%, 50%, 70%, 90% { transform: translate(-8px, 8px); }
        20%, 40%, 60%, 80% { transform: translate(8px, -8px); }
    }
    .shake-active {
        animation: bigBangShake 0.4s ease-in-out;
    }

    /* --- FONDOS MÁGICOS Y NEBULOSAS --- */
    #nebulaBackground { 
        position: fixed; 
        inset: 0; 
        z-index: 0; 
        pointer-events: none; 
        background: 
            radial-gradient(circle at 20% 30%, rgba(45, 10, 75, 0.6) 0%, transparent 40%), 
            radial-gradient(circle at 80% 70%, rgba(15, 40, 90, 0.6) 0%, transparent 50%), 
            radial-gradient(circle at 50% 50%, rgba(10, 5, 20, 1) 0%, #00020a 100%); 
        animation: breatheNebula 25s infinite alternate ease-in-out; 
    }

    @keyframes breatheNebula { 
        0% { transform: scale(1); filter: hue-rotate(0deg) brightness(1); } 
        100% { transform: scale(1.1); filter: hue-rotate(20deg) brightness(1.2); } 
    }

    #universeFX { 
        z-index: 2; 
        pointer-events: auto; 
    } 

    #bgCanvas { 
        z-index: 1; 
        opacity: 0.6; 
        pointer-events: none; 
    } 

    /* --- PANTALLA DE PRÓXIMAMENTE --- */
    #coming-soon-overlay {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: radial-gradient(circle at center, #1a0b2e 0%, #00020a 100%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: white;
    }

    .coming-soon-content {
        text-align: center;
        background: rgba(10, 5, 20, 0.8);
        padding: 40px;
        border-radius: 20px;
        border: 1px solid rgba(255, 77, 109, 0.3);
        box-shadow: 0 0 50px rgba(255, 77, 109, 0.3);
        backdrop-filter: blur(10px);
        max-width: 90%;
        /* Transición para cuando empiece el Big Bang */
        transition: all 0.8s cubic-bezier(0.5, 0, 0.2, 1);
    }

    #cs-title {
        font-family: 'Pacifico', cursive; 
        color: #ffdf73; 
        font-size: clamp(2rem, 5vw, 3.5rem); 
        margin-top: 0;
        margin-bottom: 10px;
        text-shadow: 0 0 15px rgba(255, 77, 109, 0.6);
        user-select: none;
    }

    .cs-text {
        color: #ccc; 
        font-size: clamp(1rem, 3vw, 1.2rem); 
        margin-bottom: 30px; 
        text-align: center;
        line-height: 1.6;
    }

    #coming-soon-timer {
        display: flex;
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .time-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: rgba(255, 255, 255, 0.05);
        padding: 15px;
        border-radius: 10px;
        min-width: 65px;
        border: 1px solid rgba(0, 170, 255, 0.3);
        box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    }

    .time-box span {
        font-family: 'Press Start 2P', cursive;
        font-size: clamp(1.2rem, 4vw, 1.8rem);
        color: #00ffff;
        margin-bottom: 8px;
        text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    }

    .time-box small {
        font-size: 0.75rem;
        color: #ffdf73;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: 600;
    }

    /* --- NOMBRES Y CRONÓMETRO --- */
    #headerContainer { 
        position: fixed; 
        top: 12%; 
        left: 50%; 
        transform: translateX(-50%); 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        z-index: 15; 
        pointer-events: none; 
        width: 100%; 
        transition: opacity 0.3s; 
    }

    #coupleContainer { 
        display: flex; 
        align-items: center; 
        justify-content: center; 
    }

    .name-glow { 
        font-family: 'Pacifico', cursive; 
        font-size: clamp(2.2rem, 5vw, 4rem); 
        color: #fff; 
        text-shadow: 0 0 15px rgba(255, 77, 109, 0.8), 0 0 30px rgba(255, 77, 109, 0.5); 
        animation: pulseName 3s infinite ease-in-out; 
        letter-spacing: 2px; 
    }

    .spacer-heart { 
        font-size: clamp(1.5rem, 4vw, 3rem); 
        margin: 0 15px; 
        animation: heartbeat 1.5s infinite; 
        filter: drop-shadow(0 0 15px #ff4d6d); 
        pointer-events: auto; 
    }

    #orbita-timer { 
        margin-top: 15px; 
        font-family: 'Poppins', sans-serif; 
        font-weight: 400; 
        font-size: clamp(11px, 2.5vw, 14px); 
        color: #ffffff; 
        letter-spacing: 2px; 
        text-transform: uppercase; 
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)); 
        backdrop-filter: blur(10px); 
        -webkit-backdrop-filter: blur(10px); 
        padding: 8px 22px; 
        border-radius: 30px; 
        border: 1px solid rgba(255, 255, 255, 0.18); 
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); 
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.4); 
        text-align: center;
    }

    #orbita-timer span { 
        color: #ffdf73; 
        font-weight: 600; 
        text-shadow: 0 0 10px rgba(255, 223, 115, 0.8); 
    }

    @keyframes pulseName { 
        0%, 100% { opacity: 0.9; transform: scale(1); } 
        50% { opacity: 1; transform: scale(1.03); text-shadow: 0 0 25px #ff4d6d, 0 0 45px #ff0055; } 
    }

    @keyframes heartbeat { 
        0%, 100% { transform: scale(1); } 
        20% { transform: scale(1.25); } 
        40% { transform: scale(1); } 
        60% { transform: scale(1.25); } 
    }

    /* --- EL SOL HIPER-ACTIVO --- */
    #sol { 
        position: absolute; 
        top: 50%; 
        left: 50%; 
        transform: translate(-50%, -50%) scale(1); 
        width: 120px; 
        height: 120px; 
        border-radius: 50%; 
        z-index: 10; 
        transition: all 0.3s ease-out; 
        background: 
            radial-gradient(circle at 30% 30%, #fff 0%, transparent 20%), 
            radial-gradient(circle at 70% 60%, #fffdf2 0%, transparent 15%), 
            radial-gradient(circle, #fffdf2 0%, #ffdf73 20%, #ffb347 50%, #e05e00 80%, #000 100%); 
        background-size: 100% 100%, 100% 100%, 100% 100%; 
        box-shadow: 0 0 30px 5px #fff, 0 0 60px 20px #ffdf73, 0 0 100px 40px #ffb347, 0 0 140px 60px rgba(255, 77, 109, 0.4), inset 0 0 30px #e05e00; 
        animation: brilloSol 4s infinite alternate, churnSurface 10s infinite linear; 
    }

    #sol::before { 
        content: ''; 
        position: absolute; 
        inset: -15px; 
        border-radius: 50%; 
        background: radial-gradient(circle, #fff 0%, #ffb347 40%, transparent 70%); 
        filter: blur(10px); 
        opacity: 0.6; 
        z-index: -1; 
        clip-path: polygon(50% 0%, 65% 20%, 90% 10%, 80% 40%, 100% 50%, 80% 60%, 90% 90%, 60% 75%, 50% 100%, 40% 75%, 10% 90%, 20% 60%, 0% 50%, 20% 40%, 10% 10%, 35% 20%); 
        animation: solarFlares 6s infinite linear; 
    }

    #sol::after { 
        content: ''; 
        position: absolute; 
        inset: -5px; 
        border-radius: 50%; 
        background: inherit; 
        filter: blur(8px); 
        opacity: 0.8; 
        z-index: -1; 
        animation: churnSurface 5s infinite linear reverse; 
    }

    #sol:hover { 
        transform: translate(-50%, -50%) scale(1.1); 
        filter: brightness(1.15); 
    }

    #sol.imploding { 
        transform: translate(-50%, -50%) scale(0.01) !important; 
        filter: brightness(10) blur(2px) !important; 
        box-shadow: 0 0 150px 80px #ffffff !important; 
        background: #ffffff !important; 
        transition: all 0.4s ease-in !important; 
    }

    #sol.imploding::before, #sol.imploding::after { 
        opacity: 0; 
        transition: 0.2s; 
    } 

    #sol.blackhole { 
        background: #000 !important; 
        box-shadow: 0 0 40px 15px rgba(75, 0, 130, 0.9), 0 0 100px 40px rgba(0, 0, 255, 0.7), inset 0 0 25px #000 !important; 
        transform: translate(-50%, -50%) scale(0.9) !important; 
        border: 2px solid rgba(100, 100, 255, 0.3); 
        animation: pulseBlackHole 0.5s infinite alternate !important; 
    }

    #sol.blackhole::before { 
        content: ''; 
        position: absolute; 
        inset: -20px; 
        background: conic-gradient(from 0deg, transparent, rgba(100, 0, 255, 0.8), transparent 40%, rgba(0, 100, 255, 0.8), transparent 70%); 
        filter: blur(10px); 
        opacity: 0.8; 
        z-index: -1; 
        clip-path: none; 
        animation: rotateAcretion 1s infinite linear; 
    }

    #sol.blackhole::after { 
        opacity: 0; 
    }

    @keyframes brilloSol { 
        0%, 100% { box-shadow: 0 0 30px 5px #fff, 0 0 60px 20px #ffdf73, 0 0 100px 40px #ffb347, 0 0 140px 60px rgba(255, 77, 109, 0.4), inset 0 0 30px #e05e00; filter: brightness(1); } 
        50% { box-shadow: 0 0 40px 10px #fff, 0 0 80px 30px #ffdf73, 0 0 120px 50px #ffb347, 0 0 160px 70px rgba(255, 77, 109, 0.6), inset 0 0 40px #e05e00; filter: brightness(1.1); } 
    }

    @keyframes churnSurface { 
        0% { background-position: 0% 0%, 0% 0%, 0% 0%; } 
        100% { background-position: 100% 50%, -50% 100%, 0% 0%; } 
    }

    @keyframes solarFlares { 
        0% { transform: rotate(0deg) scale(1); opacity: 0.5; } 
        25% { transform: rotate(90deg) scale(1.05); opacity: 0.8; filter: blur(8px); } 
        50% { transform: rotate(180deg) scale(1); opacity: 0.5; filter: blur(12px); } 
        75% { transform: rotate(270deg) scale(1.1); opacity: 0.8; filter: blur(8px); } 
        100% { transform: rotate(360deg) scale(1); opacity: 0.5; } 
    }

    @keyframes rotateAcretion { 
        from { transform: rotate(0deg); } 
        to { transform: rotate(360deg); } 
    }

    @keyframes pulseBlackHole { 
        0% { box-shadow: 0 0 40px 15px rgba(75, 0, 130, 0.9), 0 0 100px 40px rgba(0, 0, 255, 0.7), inset 0 0 20px #000; } 
        100% { box-shadow: 0 0 50px 20px rgba(100, 0, 200, 1), 0 0 120px 50px rgba(50, 0, 255, 0.9), inset 0 0 30px #000; } 
    }

    /* --- RENOVACIÓN PANTALLA DE INICIO: órbitas + planetas + viñeta --- */
    #orbitas {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 9;                 /* detrás del sol (z-10), delante del fondo */
        pointer-events: none;
    }

    .orbita-anillo {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        border: 1px solid rgba(170, 190, 255, 0.10);
    }
    .orbita-anillo.o1 { width: 230px; height: 230px; }
    .orbita-anillo.o2 { width: 340px; height: 340px; border-color: rgba(255, 180, 210, 0.09); }
    .orbita-anillo.o3 { width: 460px; height: 460px; border-color: rgba(170, 190, 255, 0.07); }

    /* Contenedores que giran; el planeta cuelga del borde superior. */
    .orbita-giro {
        position: absolute;
        top: 50%;
        left: 50%;
        border-radius: 50%;
        will-change: transform;
    }
    .orbita-giro.g1 { width: 230px; height: 230px; animation: orbitar 16s linear infinite; }
    .orbita-giro.g2 { width: 340px; height: 340px; animation: orbitar 27s linear infinite reverse; }
    .orbita-giro.g3 { width: 460px; height: 460px; animation: orbitar 40s linear infinite; }

    /* La traslación va DENTRO del keyframe para no pelear con el rotate. */
    @keyframes orbitar {
        from { transform: translate(-50%, -50%) rotate(0deg); }
        to   { transform: translate(-50%, -50%) rotate(360deg); }
    }

    .orbita-planeta {
        position: absolute;
        top: -6px;
        left: 50%;
        margin-left: -6px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
    }
    .orbita-planeta.p1 { background: #7fd3ff; box-shadow: 0 0 10px 2px #7fd3ff; }
    .orbita-planeta.p2 { background: #ff7fb0; box-shadow: 0 0 10px 2px #ff7fb0; width: 9px; height: 9px; margin-left: -4.5px; }
    .orbita-planeta.p3 { background: #ffd27f; box-shadow: 0 0 10px 2px #ffd27f; width: 14px; height: 14px; margin-left: -7px; }

    /* Viñeta: foco hacia el centro, oscurece bordes. Usamos radial-gradient
     * (no box-shadow con blur enorme) porque pinta mucho más barato. */
    #inicio-vineta {
        position: fixed;
        inset: 0;
        z-index: 3;
        pointer-events: none;
        background: radial-gradient(circle at 50% 50%, transparent 34%, rgba(0, 0, 3, 0.55) 100%);
    }

    /* --- CONTROL DE SESIÓN EN EL HEADER --- */
    #sesion-control {
        pointer-events: auto;       /* el header es pe:none; el control sí recibe clics */
        position: relative;
        margin-bottom: 14px;
        min-height: 36px;
    }

    .sesion-pill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 7px 14px;
        background: rgba(20, 16, 36, 0.55);
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 22px;
        color: #eef0fb;
        font-family: 'Poppins', sans-serif;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
        transition: transform 0.2s, border-color 0.2s, background 0.2s;
    }
    .sesion-pill:hover { transform: translateY(-2px); border-color: rgba(255, 77, 109, 0.5); }
    .sesion-pill .sp-emoji { font-size: 16px; }
    .sesion-pill .sesion-caret { font-size: 10px; opacity: 0.7; }
    /* Estado "iniciar sesión": resaltado con gradiente para invitar a entrar. */
    .sesion-pill.sp-login {
        background: linear-gradient(135deg, #ff4d6d, #c9184a);
        border-color: transparent;
        box-shadow: 0 6px 20px rgba(255, 77, 109, 0.4);
    }

    .sesion-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%) scale(0.96);
        transform-origin: top center;
        min-width: 190px;
        background: rgba(14, 10, 26, 0.97);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 14px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 6px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
        z-index: 30;
    }
    .sesion-menu.abierto { opacity: 1; visibility: visible; transform: translateX(-50%) scale(1); }
    .sesion-saludo { font-size: 11px; color: #aab2d6; padding: 8px 12px 4px; text-align: left; }
    .sesion-menu button {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        text-align: left;
        background: transparent;
        border: none;
        color: #eef0fb;
        font-family: 'Poppins', sans-serif;
        font-size: 13px;
        padding: 10px 12px;
        border-radius: 10px;
        cursor: pointer;
    }
    .sesion-menu button:hover { background: rgba(255, 255, 255, 0.07); }
    .sesion-menu button.sm-salir { color: #ff8095; }
    .sesion-menu .sm-sep { height: 1px; background: rgba(255, 255, 255, 0.08); margin: 4px 6px; }

    /* --- ELEMENTOS FLOTANTES --- */
    #btn-config {
        position: fixed; 
        top: 20px; 
        right: 20px; 
        width: 45px; 
        height: 45px; 
        font-size: 20px; 
        z-index: 250; 
        background: rgba(15, 10, 25, 0.6); 
        backdrop-filter: blur(5px); 
        border: 1px solid rgba(255, 255, 255, 0.2); 
        border-radius: 50%; 
        display: flex; 
        justify-content: center; 
        align-items: center; 
        transition: all 0.3s; 
        opacity: 0.8; 
    }

    #btn-config:hover { 
        transform: rotate(90deg); 
        opacity: 1; 
        border-color: #ffdf73; 
    }

    #music-player { 
        position: fixed; 
        top: 20px; 
        left: 20px; 
        z-index: 250; 
        display: flex; 
        align-items: center; 
        gap: 10px; 
        background: rgba(15, 10, 25, 0.6); 
        backdrop-filter: blur(10px); 
        padding: 8px 15px; 
        border-radius: 30px; 
        border: 1px solid rgba(255, 255, 255, 0.1); 
        transition: opacity 0.3s; 
    }

    #play-btn { 
        background: none; 
        border: none; 
        color: white; 
        font-size: 18px; 
        transition: 0.3s; 
        padding: 0;
    } 

    #play-btn:hover { 
        color: #ffdf73; 
        transform: scale(1.1); 
    }

    .equalizer { 
        display: flex; 
        gap: 3px; 
        height: 15px; 
        align-items: flex-end; 
    } 

    .bar { 
        width: 3px; 
        background: #ff4d6d; 
        border-radius: 2px; 
        height: 3px; 
        transition: height 0.1s; 
    } 

    .playing .bar { 
        animation: eqBounce 1s infinite ease-in-out; 
    } 

    .playing .bar:nth-child(1) { animation-duration: 0.6s; } 
    .playing .bar:nth-child(2) { animation-duration: 0.9s; } 
    .playing .bar:nth-child(3) { animation-duration: 0.7s; } 
    .playing .bar:nth-child(4) { animation-duration: 1.1s; }

    @keyframes eqBounce { 
        0%, 100% { height: 3px; } 
        50% { height: 15px; } 
    }

    /* --- DOCK INFERIOR (barra de pestañas de vidrio) --- */
    #main-dock {
        position: fixed;
        bottom: 22px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: flex-end;
        justify-content: center;
        gap: 5px;
        background: rgba(14, 12, 28, 0.55);
        backdrop-filter: blur(20px) saturate(140%);
        -webkit-backdrop-filter: blur(20px) saturate(140%);
        padding: 8px 14px;
        border-radius: 26px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        z-index: 250;
        width: max-content;
        max-width: 96vw;
        box-shadow: 0 14px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.12);
        transition: opacity 0.3s;
    }

    /* Hairline de luz en el borde superior. */
    #main-dock::before {
        content: '';
        position: absolute;
        top: 0;
        left: 24px;
        right: 24px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
        pointer-events: none;
    }

    .dock-btn {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 54px;
        padding: 7px 9px;
        background: transparent;
        color: #eef0fb;
        border: none;
        border-radius: 16px;
        font-family: 'Poppins', sans-serif;
        font-weight: 500;
        font-size: 19px;            /* tamaño del emoji */
        line-height: 1;
        white-space: nowrap;
        transition: transform 0.25s ease, background 0.25s ease;
    }

    .dock-btn .d-text {
        font-size: 9.5px;
        font-weight: 600;
        letter-spacing: 0.3px;
        color: #aab2d6;
        transition: color 0.25s ease;
    }

    .dock-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        transform: translateY(-4px);
    }

    .dock-btn:hover .d-text { color: #fff; }
    .dock-btn:active { transform: translateY(-1px) scale(0.95); }

    /* Botón especial (arcade): círculo con gradiente y anillo de luz. */
    .dock-btn.special {
        background: linear-gradient(135deg, #ff4d6d, #c9184a);
        border: none;
        width: 52px;
        height: 52px;
        min-width: 52px;
        border-radius: 50%;
        padding: 0;
        margin-left: 4px;
        font-size: 24px;
        animation: pulseName 2.4s infinite alternate;
        box-shadow: 0 6px 18px rgba(255, 77, 109, 0.45), inset 0 1px 0 rgba(255,255,255,0.3);
    }
    .dock-btn.special:hover { transform: translateY(-4px) scale(1.06); }

    /* --- REGLAS DE RESPONSIVIDAD --- */
    @media (max-width: 600px) {
        .d-text { display: none; }
        #main-dock { padding: 7px 9px; gap: 3px; border-radius: 24px; bottom: 14px; }
        .dock-btn { min-width: 42px; padding: 9px; font-size: 21px; border-radius: 14px; }
        .dock-btn.special { width: 48px; height: 48px; min-width: 48px; font-size: 23px; margin-left: 3px; }
        .modal-container { padding: 20px; width: 95%; } 
        .ig-post { border-radius: 10px; border-left: none; border-right: none; }
        .visor-nav { padding: 10px; font-size: 35px; } 
        #visor-nav-left { left: 0px; } 
        #visor-nav-right { right: 0px; }
        .ig-grid { height: 90vw; }
        #coming-soon-timer { gap: 8px; }
        .time-box { min-width: 55px; padding: 10px; }
        /* Órbitas más pequeñas para que quepan en el móvil. */
        .orbita-anillo.o1, .orbita-giro.g1 { width: 175px; height: 175px; }
        .orbita-anillo.o2, .orbita-giro.g2 { width: 255px; height: 255px; }
        .orbita-anillo.o3, .orbita-giro.g3 { width: 335px; height: 335px; }
        #sesion-control { margin-bottom: 10px; }
        .sesion-pill { font-size: 12px; padding: 6px 12px; }
    }

    @media (max-width: 450px) {
        #headerContainer { top: 12%; } 
        #music-player { top: 12px; left: 12px; padding: 5px 10px; } 
        #play-btn { font-size: 14px; }
        #btn-config { top: 12px; right: 12px; width: 35px; height: 35px; font-size: 16px; } 
        #orbita-timer { font-size: 9px; padding: 6px 15px; }
        #sol { width: 90px; height: 90px; } 
        .menu-title { font-size: 20px; }
    }

    /* --- MODALES Y FEED --- */
    .modal-container { 
        display: none; 
        position: fixed; 
        top: 50%; 
        left: 50%; 
        transform: translate(-50%, -50%); 
        background: rgba(10, 5, 20, 0.95); 
        backdrop-filter: blur(15px); 
        padding: 30px; 
        border-radius: 20px; 
        border: 1px solid rgba(255, 255, 255, 0.1); 
        z-index: 400; 
        box-shadow: 0 20px 50px rgba(0,0,0,0.8); 
        max-width: 85%; 
        max-height: 85vh; 
        overflow-y: auto; 
        text-align: center; 
    }

    .modal-container h2 { 
        font-family: 'Pacifico', cursive; 
        color: #ffdf73; 
        font-size: 2.2rem; 
        margin-top: 0; 
        margin-bottom: 20px; 
        text-shadow: 0 2px 10px rgba(0,0,0,0.5); 
    }

    .modal-container::-webkit-scrollbar { width: 6px; } 
    .modal-container::-webkit-scrollbar-thumb { background: rgba(255,77,109,0.5); border-radius: 10px; }
    
    .btn-galeria, .cerrar-modal { 
        padding: 10px 20px; 
        background: rgba(255, 255, 255, 0.05); 
        color: #fff; 
        border: 1px solid rgba(255, 255, 255, 0.2); 
        border-radius: 30px; 
        font-family: 'Poppins', sans-serif; 
        transition: all 0.3s; 
        margin-top: 20px;
    }

    .btn-galeria:hover, .cerrar-modal:hover { 
        background: rgba(255, 77, 109, 0.3); 
        border-color: #ff4d6d; 
    }

    #feed-container { 
        display: flex; 
        flex-direction: column; 
        gap: 35px; 
        align-items: center; 
        margin-top: 20px; 
        padding-bottom: 20px;
    }

    .ig-post { 
        width: 100%; 
        max-width: 450px; 
        background: #000; 
        border: 1px solid rgba(255, 255, 255, 0.15); 
        border-radius: 12px; 
        overflow: hidden; 
        box-shadow: 0 10px 25px rgba(0,0,0,0.6); 
        text-align: left; 
    }

    .ig-header { 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        padding: 12px 15px; 
        background: rgba(15,10,25,0.9); 
        border-bottom: 1px solid rgba(255,255,255,0.05); 
    }

    .ig-user { display: flex; align-items: center; gap: 10px; } 
    .ig-avatar { 
        width: 32px; height: 32px; border-radius: 50%; 
        background: linear-gradient(135deg, #ff4d6d, #7209b7); 
        display: flex; align-items: center; justify-content: center; 
        font-size: 14px; border: 2px solid #ffdf73; 
    }
    .ig-username { font-weight: 600; color: #fff; font-size: 13px; font-family: 'Poppins'; } 
    .ig-date { font-size: 11px; color: #888; }
    
    .ig-grid { display: grid; gap: 2px; width: 100%; height: 400px; background: #000; }
    .ig-grid-item { position: relative; overflow: hidden; background: #111; display: flex; align-items: center; justify-content: center; }
    .ig-grid-item img, .ig-grid-item video { width: 100%; height: 100%; object-fit: cover; transition: filter 0.3s; }
    .ig-grid-item:hover img, .ig-grid-item:hover video { filter: brightness(0.85); }
    .more-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; color: white; font-size: 28px; font-weight: bold; font-family: 'Poppins'; pointer-events: none; z-index: 2; }
    
    .ig-grid[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; height: auto; aspect-ratio: 4/5; }
    .ig-grid[data-count="2"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
    .ig-grid[data-count="3"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; } 
    .ig-grid[data-count="3"] .ig-grid-item:nth-child(1) { grid-column: span 2; }
    .ig-grid[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
    .ig-grid[data-count="5"], .ig-grid[data-count="more"] { grid-template-columns: repeat(6, 1fr); grid-template-rows: 1fr 1fr; }
    .ig-grid[data-count="5"] .ig-grid-item:nth-child(1), .ig-grid[data-count="more"] .ig-grid-item:nth-child(1), .ig-grid[data-count="5"] .ig-grid-item:nth-child(2), .ig-grid[data-count="more"] .ig-grid-item:nth-child(2) { grid-column: span 3; }
    .ig-grid[data-count="5"] .ig-grid-item:nth-child(3), .ig-grid[data-count="more"] .ig-grid-item:nth-child(3), .ig-grid[data-count="5"] .ig-grid-item:nth-child(4), .ig-grid[data-count="more"] .ig-grid-item:nth-child(4), .ig-grid[data-count="5"] .ig-grid-item:nth-child(5), .ig-grid[data-count="more"] .ig-grid-item:nth-child(5) { grid-column: span 2; }
    
    .ig-footer { padding: 12px 15px; background: rgba(15,10,25,0.9); }
    .ig-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } 
    .ig-actions-left { display: flex; gap: 15px; align-items: center;}
    .ig-btn { background: none; border: none; color: white; font-size: 26px; padding: 0; transition: 0.2s; } 
    .ig-btn:hover { transform: scale(1.1); } 
    .ig-btn.liked { color: #ff4d6d; animation: pulseName 0.5s; }
    .ig-btn-trash { font-size: 22px; opacity: 0.8; } 
    .ig-btn-trash:hover { opacity: 1; color: #ff4d6d; }
    .ig-likes { font-weight: 600; font-size: 13px; color: #fff; margin-bottom: 5px; } 
    .ig-caption { font-size: 13px; color: #ddd; line-height: 1.4; } 
    .ig-caption span { font-weight: 600; color: #fff; margin-right: 5px; }

    /* VISOR INDIVIDUAL DESLIZABLE */
    #visor-imagen { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 1500; align-items: center; justify-content: center; backdrop-filter: blur(10px); flex-direction: column; touch-action: pan-y; }
    #visor-wrapper { position: relative; max-width: 90%; max-height: 80vh; display: flex; flex-direction: column; align-items: center; }
    #visor-imagen img, #visor-imagen video { max-width: 100%; max-height: 80vh; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); animation: zoomIn 0.3s ease; object-fit: contain; }
    .cerrar-visor { position: absolute; top: 15px; right: 20px; font-size: 40px; color: rgba(255,255,255,0.7); transition: 0.3s; z-index: 1505;} 
    .cerrar-visor:hover { color: #ffdf73; transform: scale(1.1); }
    #visor-counter { position: absolute; top: 25px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.6); color: white; padding: 6px 15px; border-radius: 20px; font-family: 'Poppins'; font-size: 14px; font-weight: 600; letter-spacing: 1px; z-index: 1505; border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(5px); }
    .visor-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 45px; color: rgba(255,255,255,0.6); padding: 20px; z-index: 1505; user-select: none; transition: 0.3s; display: none; }
    .visor-nav:hover { color: #ffdf73; scale: 1.1; }
    #visor-nav-left { left: 5px; } 
    #visor-nav-right { right: 5px; }
    @keyframes zoomIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

    /* Formularios y Inputs */
    .file-upload-wrapper { position: relative; width: 100%; text-align: center; margin-top: 15px; }
    .file-upload-input { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
    .file-upload-label { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; background: rgba(255, 255, 255, 0.03); border: 2px dashed rgba(255, 77, 109, 0.5); border-radius: 15px; color: #e0e0e0; font-family: 'Poppins', sans-serif; font-size: 14px; transition: all 0.3s ease; }
    .input-dark { background: rgba(0,0,0,0.5); border: 1px solid #555; color: white; padding: 12px; width: 100%; border-radius: 8px; margin-bottom: 5px; box-sizing: border-box; font-family: 'Poppins'; }

    /* === Funciones nuevas: música, comentarios, doble-tap === */
    .ig-music-badge { color:#1db954; font-size:15px; margin-left:6px; }
    .ig-music { width:100%; background:#000; }
    .ig-music iframe { width:100%; display:block; border:0; }

    .heart-burst {
        position:absolute; top:50%; left:50%; transform:translate(-50%,-50%) scale(0);
        font-size:90px; pointer-events:none; z-index:5;
        animation: heartBurst .8s ease-out forwards;
        text-shadow:0 0 30px rgba(255,77,109,0.8);
    }
    @keyframes heartBurst {
        0% { transform:translate(-50%,-50%) scale(0); opacity:0; }
        25% { transform:translate(-50%,-50%) scale(1.2); opacity:1; }
        70% { transform:translate(-50%,-50%) scale(1); opacity:1; }
        100% { transform:translate(-50%,-55%) scale(1.1); opacity:0; }
    }

    .ig-comentarios { margin-top:10px; border-top:1px solid rgba(255,255,255,0.08); padding-top:8px; }
    .comentarios-lista { max-height:160px; overflow-y:auto; margin-bottom:8px; }
    .comentario { font-size:13px; color:#ddd; line-height:1.5; margin-bottom:4px; }
    .comentario-autor { font-weight:600; color:#fff; margin-right:5px; }
    .comentario-vacio { font-size:12px; color:#888; }
    .comentario-input { display:flex; gap:6px; align-items:center; }
    .comentario-input .input-dark { margin-bottom:0; padding:8px 10px; font-size:13px; }
    .comentario-enviar { background:none; border:none; color:#ff4d6d; font-weight:600; font-size:13px; cursor:pointer; white-space:nowrap; }
    .comentario-enviar:hover { color:#fff; }

    /* Botón de emoji */
    .emoji-trigger { background:none; border:none; cursor:pointer; font-size:18px; padding:0 4px; }
    #emoji-picker-pop {
        position:fixed; z-index:9600; width:280px; max-height:220px; overflow-y:auto;
        background:rgba(10,5,20,0.98); border:1px solid rgba(255,77,109,0.3);
        border-radius:12px; padding:8px; box-shadow:0 10px 30px rgba(0,0,0,0.6);
        display:flex; flex-wrap:wrap; gap:2px;
    }
    #emoji-picker-pop button { background:none; border:none; font-size:22px; cursor:pointer; width:34px; height:34px; border-radius:8px; }
    #emoji-picker-pop button:hover { background:rgba(255,255,255,0.1); }

    /* === Cartas === */
    .cartas-tab { background:none; border:1px solid rgba(255,77,109,0.4); color:#ddd; padding:6px 16px; border-radius:20px; cursor:pointer; font-family:'Poppins'; font-size:13px; }
    .cartas-tab.activa { background:rgba(255,77,109,0.4); color:#fff; }
    #cartas-bandeja, #cartas-escribir { text-align:left; max-height:55vh; overflow-y:auto; }
    .carta-card { background:rgba(255,255,255,0.04); border:1px solid rgba(255,77,109,0.25); border-radius:12px; padding:12px 14px; margin-bottom:10px; }
    .carta-card.carta-nueva { border-color:#ff4d6d; box-shadow:0 0 12px rgba(255,77,109,0.4); }
    .carta-bloqueada { border-style:dashed; opacity:0.85; text-align:center; }
    .carta-top { display:flex; justify-content:space-between; }
    .carta-de { color:#ffdf73; font-size:12px; font-weight:600; }
    .carta-titulo { color:#fff; font-weight:600; margin:4px 0; font-size:15px; }
    .carta-fecha { color:#888; font-size:11px; margin-bottom:6px; }
    .carta-cuerpo { color:#eee; font-size:14px; line-height:1.6; white-space:pre-wrap; margin:8px 0; }
    .carta-abrir { background:none; border:none; color:#ff4d6d; font-weight:600; cursor:pointer; font-size:13px; padding:0; }
    .carta-lock { font-size:18px; color:#ffdf73; margin:6px 0; }
    .carta-cuenta { font-family:'Press Start 2P', monospace; font-size:11px; color:#00aaff; }

    /* === Extras (fechas + razones) === */
    .extras-sub { color:#ffdf73; font-size:15px; margin:6px 0 10px; text-align:left; }
    #extras-fechas, #extras-razones { text-align:left; }
    .fecha-fila { display:flex; justify-content:space-between; align-items:center; padding:8px 10px; background:rgba(255,255,255,0.03); border-radius:8px; margin-bottom:6px; }
    .fecha-titulo { color:#fff; font-size:14px; }
    .fecha-cuenta { color:#ff4d6d; font-size:13px; font-weight:600; }
    .razon-carta { min-height:90px; display:flex; align-items:center; justify-content:center; text-align:center; padding:18px; background:linear-gradient(135deg, rgba(255,77,109,0.15), rgba(114,9,183,0.15)); border:1px solid rgba(255,77,109,0.3); border-radius:14px; color:#fff; font-size:16px; line-height:1.5; font-family:'Pacifico', cursive; }
    .razon-carta.flip { animation: razonFlip 0.5s ease; }
    @keyframes razonFlip { 0% { transform:rotateY(90deg); opacity:0; } 100% { transform:rotateY(0); opacity:1; } }
    .razon-nav { text-align:center; margin:12px 0; }
    .extras-add { margin-top:12px; background:rgba(0,0,0,0.25); border-radius:10px; padding:6px 10px; }
    .extras-add summary { cursor:pointer; color:#ffdf73; font-size:13px; padding:4px 0; }
    .extras-add input, .extras-add textarea { margin-top:8px; }

    /* === Toasts === */
    #toast-cont { position:fixed; bottom:90px; left:50%; transform:translateX(-50%); z-index:9800; display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none; width:auto; max-width:90vw; }
    .toast { pointer-events:auto; background:rgba(10,5,20,0.95); color:#fff; border:1px solid rgba(255,77,109,0.4); border-radius:24px; padding:10px 18px; font-family:'Poppins'; font-size:13px; box-shadow:0 8px 24px rgba(0,0,0,0.5); opacity:0; transform:translateY(16px) scale(0.96); transition:all .35s cubic-bezier(.2,.8,.2,1); max-width:88vw; text-align:center; }
    .toast.visible { opacity:1; transform:translateY(0) scale(1); }
    .toast-exito { border-color:#28a745; }
    .toast-error { border-color:#ff4d6d; background:rgba(40,5,15,0.95); }
    .toast-amor { border-color:#ff4d6d; color:#ffdbe4; }

    /* === Lluvia de corazones === */
    #celebrate-layer { position:fixed; inset:0; z-index:9700; pointer-events:none; overflow:hidden; }
    .celebrate-heart { position:absolute; top:-40px; will-change:transform,opacity; animation-name:caerCorazon; animation-timing-function:ease-in; opacity:0; }
    @keyframes caerCorazon {
        0% { transform:translateY(-40px) rotate(0deg); opacity:0; }
        10% { opacity:1; }
        100% { transform:translateY(105vh) rotate(360deg); opacity:0; }
    }

    /* === Animación al abrir carta === */
    .carta-cuerpo { overflow:hidden; }
    .carta-cuerpo.abriendo { animation:desplegarCarta .5s ease; }
    @keyframes desplegarCarta {
        0% { opacity:0; transform:translateY(-8px); max-height:0; }
        100% { opacity:1; transform:translateY(0); max-height:600px; }
    }

    /* === Mensaje del día (bajo el header) === */
    #mensaje-dia { margin-top:8px; font-family:'Pacifico', cursive; color:#ffdbe4; font-size:14px; text-shadow:0 0 10px rgba(255,77,109,0.5); opacity:0; transition:opacity 1s ease; max-width:80vw; text-align:center; }
    #mensaje-dia.visible { opacity:0.95; }

    /* === Permisos: ocultar controles de dueño a los demás === */
    body.no-owner .solo-owner { display: none !important; }

    /* --- Panel administrar collage (captions por foto) --- */
    .ac-fila { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .ac-thumb { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 10px; overflow: hidden; background: #0c0c14; }
    .ac-thumb img, .ac-thumb video { width: 100%; height: 100%; object-fit: cover; }
    .ac-cuerpo { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
    .ac-cap { width: 100%; box-sizing: border-box; }
    .ac-acciones { display: flex; gap: 8px; align-items: center; }
    .ac-btn { padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); color: #fff; font-family: 'Poppins', sans-serif; font-size: 13px; cursor: pointer; }
    .ac-btn:hover { background: rgba(255,223,115,0.18); border-color: #ffdf73; }
    .ac-del { border-color: rgba(255,77,109,0.4); }
    .ac-estado { font-size: 14px; color: #ffdf73; min-width: 14px; }

    /* Visor: contenedor relativo para el corazón de doble-tap */
    #visor-wrapper { position: relative; }
    .ig-btn-edit { font-size: 20px; opacity: 0.85; }
    .ig-btn-edit:hover { opacity: 1; }

    /* === Cosas por hacer === */
    #pend-random-result { margin-top:12px; min-height:24px; text-align:center; color:#fff; font-size:16px; font-family:'Pacifico',cursive; }
    #pend-random-result.flip { animation: razonFlip .5s ease; }
    .pend-fila { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 10px; background:rgba(255,255,255,0.03); border-radius:8px; margin-bottom:6px; }
    .pend-texto { color:#eee; font-size:14px; flex:1; }
    .pend-hecho .pend-texto { color:#888; text-decoration:line-through; }
    .pend-del { background:none; border:none; cursor:pointer; font-size:15px; opacity:0.7; }
    .pend-del:hover { opacity:1; }

    /* "ver más / ver menos" en el caption del feed */
    .ig-vermas { color:#8ab4ff; cursor:pointer; font-weight:600; font-size:13px; white-space:nowrap; }
    .ig-vermas:hover { color:#fff; text-decoration:underline; }
    .ig-caption { white-space:pre-wrap; word-break:break-word; }
