/* Loader */
#spinnerLoader {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #fff;
    border-top: 5px solid #f00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll tipo TikTok */
.reels-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}
.reel {
    flex-shrink: 0;
    position: relative;
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    overflow: hidden;
}
.reel video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    max-width: 70%;
}
.overlay p.caption {
    max-height: 3.6em;
    font-size: 12px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.overlay p.caption.expanded {
    max-height: 300px;
}
.overlay button.toggle-caption {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 5px;
}
.overlay .tiktok-link {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    margin-top: 8px;
    font-size: 1em;
}
.overlay .tiktok-link i {
    margin-right: 5px;
    font-size: 1.2em;
}
.overlay .tiktok-link:hover {
    color: #ff0050;
}
.side-icons {
    position: absolute;
    right: 15px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-size: 1.4em;
}
.side-icons i {
    margin: 10px 0;
    cursor: pointer;
}
.side-icons span {
    font-size: 0.8em;
}

/* Botón para sonido fijo abajo derecha */
.sound-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    z-index: 10000;
}
.sound-toggle:hover {
    background: rgba(255,0,0,0.7);
}
