/* /socialtv/style-multifile.css - V77 ORIGINAL + FIXES VISUALES */



/* --- 1. ESTILOS GENERALES --- */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    padding-top: 110px;
}



/* Navbar */

.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 110px;
    background: linear-gradient(180deg, #1a1a1a 0%, #000 100%);
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    box-sizing: border-box;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.amedia-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: height 0.3s;
    margin: 15px;
    transform: translateY(-8px); /* subir un poco el logo de la cabecera */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item {
    color: #FFD700;
    text-decoration: none;
    font-size: 1.0rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-item:hover {
    color: #ffffff;
}



@media (max-width: 600px) {
    body {
        padding-top: 50px;
    }

    .top-navbar {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        height: auto;
        min-height: 50px;
        padding: 6px 10px;
        gap: 0px;
        flex-wrap: wrap;
    }

    .amedia-logo {
        height: 28px;
        margin: 0;
        flex-shrink: 0;
        transform: none; /* en movil no aplicamos la subida del desktop */
    }

    .nav-links {
        width: auto;
        justify-content: center;
        gap: 8px;
        margin-left: 16px;
        flex-wrap: wrap;
    }

    .nav-item {
        font-size: 0.65rem;
    }
}



/* HEADER CLIENTE */

.brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px 10px;
    background: #121212;
    gap: 0px;
    width: 100%;
    box-sizing: border-box;
}

.header-link {
    display: block;
    width: 100%;
    display: flex;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.header-link:hover {
    opacity: 0.9;
}

.img-client {
    display: block;
    max-width: 800px;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
    margin-bottom: 0;
    display: block;
    line-height: 0;
}

@media (max-width: 768px) {
    .brand-header {
        padding: 15px 10px;
    }

    .img-client {
        width: 40% !important;
    }
}



/* TAMAÑOS RESPONSIVE (V70) */

.width-video-vert {
    width: 85vw !important;
    max-width: 450px !important;
    margin: 10px auto 30px auto;
    display: block;
}

.width-video-horiz {
    width: 95vw !important;
    max-width: 800px !important;
    margin: 10px auto 30px auto;
    display: block;
}

.width-flyer {
    width: 90vw !important;
    max-width: 720px !important;
    margin: 10px auto 30px auto;
    display: block;
}

@media (min-width: 600px) and (max-width: 1024px) {
    .width-video-vert {
        width: 60vw !important;
        max-width: 400px !important;
    }

    .width-video-horiz {
        width: 90vw !important;
        max-width: 1000px !important;
    }

    .width-flyer {
        width: 80vw !important;
        max-width: 600px !important;
    }
}

@media (min-width: 1025px) {
    .width-video-vert {
        width: 35vw !important;
        max-width: 470px !important;
        min-width: 350px !important;
    }

    .width-video-horiz {
        width: 80vw !important;
        max-width: 1280px !important;
        min-width: 800px !important;
    }

    .width-flyer {
        width: 50vw !important;
        max-width: 720px !important;
    }
}



/* WRAPPERS */

.video-responsive-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    background: #000;
}

.video-responsive-wrapper.ratio-16-9 {
    padding-bottom: 56.25%;
}

.video-responsive-wrapper.ratio-9-16 {
    padding-bottom: 177.77%;
}

.video-responsive-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.header-flyer-wrapper {
    text-align: center;
}

.header-flyer-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.header-info-text {
    text-align: center;
    color: #FFD700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: auto;
    margin-right: auto;
}



/* LOADING */

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 215, 0, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFD700;
    font-size: 1.0rem;
    letter-spacing: 0.5px;
    width: 100%;
    min-height: 200px;
    margin-top: 20px;
    margin-bottom: 40px;
}

#scroll-loading {
    text-align: center;
    color: #FFD700;
    display: none;
    margin: 30px auto;
    gap: 15px;
    align-items: center;
    justify-content: center;
}



/* GRID CSS COLUMNS (FLEX MASONRY) */

.grid {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 5px;
    padding: 5px;
}

.masonry-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0; /* Prevent flex item from blowing out limits */
}

.grid-sizer {
    display: none;
}

.grid-item {
    box-sizing: border-box;
    cursor: pointer;
    width: 100% !important;
}

/* Neutralizar variantes de tamaño (no aplican en column layout) */
.grid-item--big-mobile,
.grid-item--medium,
.grid-item--large {
    width: 100% !important;
}



/* --- CONTENEDOR DEL ITEM --- */

.grid-item-content {
    width: 100%;
    display: block;
    background-color: #111;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    position: relative;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.2s, transform 0.2s;
}



/* Animación de entrada "Pop" con rebote elástico exagerado (Burbuja) */

.grid-item-content.animate-in {
    animation: bubbleBounce 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bubbleBounce {
    0% {
        opacity: 0;
        transform: scale(0.4) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(-5px);
    }
    75% {
        transform: scale(0.97) translateY(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}



/* --- RESPONSIVE GAPS --- */

@media (min-width: 601px) {
    .grid {
        gap: 8px;
        padding: 8px;
    }
    .masonry-col { gap: 8px; }
}

@media (min-width: 1501px) {
    .grid {
        gap: 10px;
        padding: 10px;
    }
    .masonry-col { gap: 10px; }
}



.grid-item-content:hover {
    transform: translateY(-3px);
    border-color: #FFD700;
    z-index: 5;
}



/* IMAGEN (BLINDADA) */

.grid-item img.thumb {

    display: block;

    width: 100%;

    height: auto;

    opacity: 0;
    /* Invisible hasta que JS diga "loaded" */

    transition: opacity 0.3s;

    background-color: #111;

}

.grid-item img.thumb.loaded {

    opacity: 1;

}



/* Play Overlay */

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.3s;
}

.play-overlay svg {
    fill: #fff;
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

.grid-item-content:hover .play-overlay {
    background: #FFD700;
    border-color: #FFD700;
    transform: translate(-50%, -50%) scale(1.1);
}

.grid-item-content:hover .play-overlay svg {
    fill: #000;
}

.albums-block-wrapper {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    margin-top: 20px;
    margin-bottom: 0px;
    background-color: #151515;
}



/* SELECTOR */

.session-selector-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    position: relative;
}

.session-wrapper {
    position: relative;
    display: inline-block;
    min-width: 220px;
}

.session-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    color: #FFD700;
    border: none;
    font-size: 1.0rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 5px 30px 5px 10px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s;
    width: 100%;
}

.session-select:hover,
.session-select:focus {
    border-bottom: 1px solid #FFD700;
    outline: none;
    background-color: rgba(255, 255, 255, 0.05);
}

.session-wrapper svg {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.session-wrapper svg path {
    stroke: #FFD700;
}

.session-select option {
    background-color: #121212;
    color: #e0e0e0;
    padding: 10px;
    font-weight: normal;
}



/* POPUP */

#popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.swipe-edge { position: absolute; z-index: 10; touch-action: none; background: transparent; }
.edge-left { top: 0; bottom: 0; left: 0; width: 10%; min-width: 20px; }
.edge-right { top: 0; bottom: 0; right: 0; width: 10%; min-width: 20px; }
.edge-bottom { bottom: 0; left: 0; right: 0; height: 30%; min-height: 100px; transition: left 0.1s, width 0.1s; }

#popup-content-wrapper {
    width: 100%;
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#popup img {
    max-width: 98%;
    max-height: 100dvh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-in;
    transition: width 0.3s ease, height 0.3s ease;
    margin: auto;
}

#popup img.zoomed {
    max-width: none;
    max-height: none;
    height: 180vh;
    width: auto;
    cursor: zoom-out;
    cursor: grab;
}

#popup iframe {
    width: 90%;
    height: 90%;
    max-width: 1200px;
    border: none;
    background: #000;
    display: none;
}

#popup-close {
    position: absolute;
    top: 25px;
    right: 30px;
    color: #FFD700;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.2s;
    line-height: 1;
    z-index: 10001;
    opacity: 0.8;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

#popup-close:hover {
    transform: scale(1.1);
    color: #fff;
    opacity: 1;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #FFD700;
    padding: 15px;
    cursor: pointer;
    z-index: 10002;
    border-radius: 50%;
    transition: all 0.3s;
    user-select: none;
}

.nav-btn:hover {
    background-color: #FFD700;
    color: #000;
}

.nav-btn svg {
    width: 30px;
    height: 30px;
    display: block;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

@media (max-width: 600px) {
    .nav-btn {
        padding: 10px;
    }

    .nav-btn svg {
        width: 24px;
        height: 24px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}

#popup-caption-container {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    padding: 0 15px;
    box-sizing: border-box;
    z-index: 10002;
}

#popup-caption-text {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 20px;
    pointer-events: auto;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    max-width: 70vw;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.2s;
}

#popup-caption-text:hover {
    color: #fff;
    text-decoration: underline;
    background-color: rgba(0, 0, 0, 0.8);
}

#popup-external-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FFD700;
    color: #000;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    pointer-events: auto;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#popup-external-link:hover {
    background-color: #fff;
    transform: scale(1.1);
}

#popup-external-link svg {
    width: 18px;
    height: 18px;
}



/* SUBMENU */

.category-submenu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.submenu-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #ddd;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.submenu-btn:hover {
    color: #fff;
}

.submenu-btn.active {
    color: #FFD700;
    border-bottom: 2px solid #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.submenu-btn-empty {
    color: #555 !important;
    opacity: 0.4;
}

.submenu-btn-empty.active {
    color: #FFD700 !important;
    opacity: 1;
}



/* OPERATOR BLOCK */

.grid-item--full {
    width: 100% !important;
    column-span: all; /* Ocupa todas las columnas */
    margin-bottom: 30px;
    padding: 0 15px;
    box-sizing: border-box;
}

.operator-block {
    background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.operator-title {
    color: #FFD700;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.operator-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.operator-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    width: 80px;
    transition: transform 0.2s ease;
}

.operator-wrapper:hover {
    transform: translateY(-5px);
}

.operator-img-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #444;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s;
}

.operator-wrapper:hover .operator-img-btn {
    border-color: #FFD700;
}

.operator-name {
    color: #888;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    transition: color 0.3s;
}

.operator-wrapper:hover .operator-name {
    color: #FFD700;
}



/* FILTER BAR */

#active-filter-bar {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 15px 0 10px 0;
    animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
    position: relative;
}

.btn-clear-top {
    background-color: #FFD700;
    color: #121212;
    border: 2px solid #FFD700;
    padding: 7px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 1px;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.btn-clear-top:hover {
    background-color: #fff;
    border-color: #fff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.btn-clear-top strong {
    color: #000;
    text-decoration: underline;
}

.btn-clear-top::before {
    content: "✖";
    font-size: 1em;
    color: #000;
}



/* BTN BACK TO TOP */

#btn-back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    width: 50px;
    height: 50px;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    border: none;
    outline: none;
    background-color: #FFD700;
    color: #121212;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    font-weight: bold;
}

#btn-back-to-top:hover {
    background-color: #fff;
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

@media (max-width: 600px) {
    #btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* BTN COL SELECTOR */
#btn-col-selector {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 99;
    width: 50px;
    height: 50px;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    border: none;
    outline: none;
    background-color: #FFD700;
    color: #121212;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    font-weight: bold;
}

#btn-col-selector:hover {
    background-color: #fff;
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

@media (max-width: 600px) {
    #btn-col-selector {
        bottom: 75px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}



/* MEDIA FILTER */

.media-type-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    /* CAMBIO: Aumentamos márgenes para simetría */
    margin-top: 10px !important;
    margin-bottom: 30px;
}

.media-btn {
    background-color: transparent;
    color: #666;
    border: 1px solid #444;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.media-btn:hover {
    color: #e0e0e0;
    border-color: #888;
}

.media-btn.active {
    background-color: #FFD700;
    color: #121212;
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* --- NEW CONTENT BUTTON & HIGHLIGHT --- */
.media-btn[data-type="NEW"] {
    display: none; /* hidden by default until new items found */
    background-color: #000;
    color: #FF00FF;
    border-color: #FFD700;
    position: relative; /* relative for the tooltip */
}

.media-btn[data-type="NEW"]:hover {
    color: #FF00FF;
    border-color: #FFaaff;
    background-color: #111;
}

.media-btn[data-type="NEW"].active {
    background-color: #000;
    color: #FF00FF;
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* Fuchsia border on grid items — only when toggle is active (class removed on inactive) */
.is-new-media > .grid-item-content {
    border: 3px solid #ff00ff !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.6) !important;
}

/* NEW content toast notification */
#new-content-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: #000;
    color: #FF00FF;
    border: 2px solid #FFD700;
    padding: 12px 27px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    text-align: center;
}

#new-content-toast.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* NEW incoming content spinner (fuchsia) - fixed bottom */
#new-incoming-spinner {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid rgba(255, 0, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 9990;

    animation: fadeIn 0.4s ease;
}

.new-incoming-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.new-incoming-title {
    display: block;
    color: #FF00FF;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulseText 2s ease-in-out infinite;
    line-height: 1.3;
}

.new-incoming-sub {
    display: block;
    color: #888;
    font-size: 0.55rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.spinner-new-incoming {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 0, 255, 0.2);
    border-top-color: #FF00FF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* NEW popup tooltip */
.new-content-tooltip {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #FF00FF;
    border: 1.5px solid #FFD700;
    padding: 6px 25px 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: bounceTooltip 1s infinite alternate;
    z-index: 100;
}

.new-content-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #FFD700 transparent transparent transparent;
}

.new-content-tooltip .close-tooltip {
    position: absolute;
    right: 6px;
    top: 58%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    font-weight: normal;
    color: #FFD700;
}

@keyframes bounceTooltip {
    from { top: -45px; }
    to { top: -50px; }
}

/* STATUS BAR */

.status-bar-container {
    width: 100%;
    max-width: 400px;
    /* CAMBIO: Quitamos el margen superior (ya lo dan los botones) */
    margin: 0 auto 5px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 0 20px;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease;
}

.status-bar-bg {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    overflow: hidden;
}

.status-bar-fill {
    width: 0%;
    height: 100%;
    background-color: #FFD700;
    transition: width 1s ease-out;
}

.status-text {
    font-size: 0.6rem;
    color: #888;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-small {
    font-size: 0.55rem;
    text-transform: none;
    color: #999;
    margin-left: 5px;
    font-weight: 400;
}



/* FALLBACK ALERT */

.drive-fallback-alert {
    background: transparent;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 4px;
    padding: 8px 15px;
    margin: 15px auto 5px auto;
    max-width: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.75rem;
    color: #999;
}

.fallback-content {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 2px;
}

.drive-fallback-link {
    color: #FFD700;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.drive-fallback-link:hover {
    text-decoration: underline;
    color: #fff;
}

.banner-collab {
    cursor: pointer;
    border-color: #FFD700 !important;
}



/* CLIENT MENU BAR */

.client-menu-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.client-action-btn {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.client-action-btn:hover {
    border-color: #FFD700;
    color: #FFD700;
}

.client-action-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

#client-desc-dropdown {
    display: none;
    width: 90%;
    max-width: 600px;
    text-align: center;
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #333;
    font-size: 0.95rem;
    color: #ddd;
    line-height: 1.6;
    margin: 0 auto 20px auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* VISUAL TOAST */

#custom-visual-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid #FFD700;
    color: #FFD700;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    z-index: 2147483647;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

#custom-visual-toast.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}



/* --- AÑADIDOS NECESARIOS PARA NUEVA FUNCIONALIDAD --- */



/* Estilos Promo Tool (Restaurados) */

.promo-tool-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 10px;
    position: relative;
    z-index: 10;
}

.promo-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70%;
    max-width: 540px;
    padding: 10px 0;
    padding-right: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 4px;
    color: #999;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.sticker-new {
    color: #121212;
    background-color: #FFD700;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 12px;
    margin-left: 10px;
}

.promo-tool-btn:hover {
    border-color: #FFD700;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.15);
}

@media (max-width: 768px) {
    .promo-tool-btn {
        width: 85%;
        font-size: 0.75rem;
    }
}



/* --- MODO ADMIN CONTROLES --- */

#admin-floating-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #FFD700;
    padding: 10px 20px;
    border-radius: 50px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

/* Collapsed state */
#admin-floating-toolbar.admin-toolbar-collapsed .admin-toolbar-content {
    display: none;
}
#admin-floating-toolbar.admin-toolbar-collapsed {
    padding: 0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    justify-content: center;
    left: auto;
    right: 30px;
    bottom: 150px;
    transform: none;
    background: transparent;
    border-color: #FFD700;
    opacity: 0.7;
    cursor: pointer;
}
@media (max-width: 600px) {
    #admin-floating-toolbar.admin-toolbar-collapsed {
        right: 20px;
        bottom: 130px;
        width: 45px;
        height: 45px;
    }
}
#admin-floating-toolbar.admin-toolbar-collapsed:hover {
    opacity: 1;
    border-color: #FFD700;
}
#admin-floating-toolbar .admin-toolbar-pill {
    display: none;
}
#admin-floating-toolbar.admin-toolbar-collapsed .admin-toolbar-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 18px;
    cursor: pointer;
    color: #FFD700;
}

.admin-toolbar-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.admin-toolbar-title {
    color: #FFD700;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.admin-toolbar-toggles {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-toolbar-actions {
    display: flex;
    gap: 6px;
    margin-top: 0;
}

.admin-action-btn {
    background: transparent;
    border: 1px solid #666;
    color: #aaa;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.65rem;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    text-transform: uppercase;
}
.admin-action-btn:hover {
    border-color: #FFD700;
    color: #FFD700;
}
.admin-btn-collapse {
    font-size: 0.8rem;
    padding: 2px 10px;
}

.admin-toggle {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

.admin-toggle.active {
    background: #FFD700;
    color: #000;
    border-color: #FFD700;
}

.admin-toggle-all {
    background: transparent;
    border: none;
    color: #aaa;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 700;
    margin-left: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.admin-toggle-all:hover {
    color: #FFD700;
    transform: scale(1.2);
}

.admin-toggle-all.active {
    color: #FFD700;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.6));
}

/* Base overlay in items */
.admin-item-overlay {
    position: absolute;
    bottom: 5px; /* Moved from top to bottom */
    left: 5px;
    background: rgba(0,0,0,0.85);
    padding: 6px 10px;
    border-radius: 6px;
    z-index: 9999;
    pointer-events: auto; /* Enable clicks for voting */
    text-align: center;
    min-width: 50px;
    max-width: calc(100% - 10px);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    border: 1px solid #444;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Individual Data Rows */
.admin-data-row {
    line-height: 1.2;
    transition: opacity 0.2s;
}

/* Toggle displays through Body classes */
body:not(.show-admin-votes) .admin-overlay-votes { display: none !important; }
body:not(.show-admin-drive-id) .admin-overlay-drive-id { display: none !important; }
body:not(.show-admin-global-id) .admin-overlay-global-id { display: none !important; }
body:not(.show-admin-type-id) .admin-overlay-type-id { display: none !important; }
body:not(.show-admin-filename) .admin-overlay-filename { display: none !important; }
body:not(.show-admin-upload-date) .admin-overlay-upload-date { display: none !important; }
body:not(.show-admin-render-order) .admin-overlay-render-order { display: none !important; }

/* Hide entire overlay when NO toggles are active (replaces broken :has() rule) */
body:not(.admin-any-active) .admin-item-overlay {
    display: none !important;
}

/* --- Admin Source Badges --- */
.admin-source-badge {
    font-size: 14px;
    line-height: 1;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.admin-badge-yt { color: #FF4444; }
.admin-badge-cache { color: #4CAF50; }
.admin-badge-drive { color: #4285F4; }
.admin-badge-hd { color: #00BCD4; }

/* Hide source badges when toggle is off */
body:not(.show-admin-source-badge) .admin-source-badge { display: none !important; }

.admin-drive-spin {
    display: inline-block;
    font-size: 16px;
}
.admin-badge-triggered .admin-drive-spin {
    animation: spinDriveBadge 1s linear infinite;
}
@keyframes spinDriveBadge {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Green check icon badge for Drive-processed videos */
.yt-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #27ae60;
    color: white;
    border-radius: 4px;
    padding: 2px 5px;
    width: 22px;
    height: 16px;
    box-sizing: border-box;
}
.yt-check-icon svg {
    width: 12px;
    height: 12px;
}

/* Mobile compact toolbar */
@media (max-width: 600px) {
    #admin-floating-toolbar {
        padding: 6px 12px;
        border-radius: 30px;
        gap: 4px;
        bottom: 12px;
    }
    .admin-toolbar-content {
        gap: 4px;
    }
    .admin-toolbar-toggles {
        gap: 5px;
    }
    .admin-toggle {
        padding: 3px 8px;
        font-size: 0.6rem;
    }
    .admin-toggle-all {
        font-size: 0.85rem;
        padding: 2px 5px;
    }
    .admin-toolbar-actions {
        gap: 6px;
        margin-top: 0;
    }
    .admin-action-btn {
        padding: 2px 8px;
        font-size: 0.6rem;
    }
}

/* Action Buttons inside Overlay */
.admin-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    margin: 0 4px;
    user-select: none;
}

.admin-vote-btn:hover {
    background: #FFD700;
    color: #000;
}

.admin-vote-btn:active {
    transform: scale(0.9);
}



/* Botón Descarga Popup */

.video-fallback-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    cursor: pointer;
    z-index: 50;
}

.btn-fallback-download {
    background: rgba(255, 215, 0, 0.95);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    text-decoration: none;
}

.btn-fallback-download:hover {
    transform: scale(1.1);
    background: #fff;
}

.btn-fallback-download svg {
    width: 40px;
    height: 40px;
    fill: #000;
}

.text-fallback-msg {
    color: #fff;
    text-align: center;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.text-fallback-msg strong {
    color: #FFD700;
    font-size: 18px;
    display: block;
    margin-top: 5px;
}



/* Hack videos */

video[style*="fixed"] {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* --- FIX ESPACIADO --- */

/* 1. Si el submenu está vacío, lo hacemos desaparecer totalmente */
.category-submenu:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. Ajuste forzado de los botones */
.media-type-container {
    margin-top: 30px !important; /* Ajusta este valor si quieres más/menos cerca */
    margin-bottom: 30px !important;
}

/* --- MULTI-SELECT ACTIONS --- */

/* Action Panel Overlay (Above toolbar) */
#admin-actions-overlay {
    position: fixed;
    bottom: 80px; /* Above the toolbar */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #e74c3c;
    border-radius: 12px;
    padding: 12px 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 25px rgba(231, 76, 60, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#admin-actions-overlay.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.admin-actions-count {
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
}

.admin-action-delete-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.admin-action-delete-btn:hover {
    background: #c0392b;
}

/* Item Checkboxes */
.admin-item-checkbox {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.7);
    border: 2px solid #fff;
    border-radius: 6px;
    z-index: 10000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

body.selection-mode-active .admin-item-checkbox {
    opacity: 0.8;
    pointer-events: auto;
}

body.selection-mode-active .admin-item-checkbox:hover {
    opacity: 1;
    border-color: #FFD700;
}

/* Selected State */
.grid-item-content.selected-for-action {
    border: 3px solid #e74c3c !important;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.6) inset;
}

.grid-item-content.selected-for-action .admin-item-checkbox {
    opacity: 1;
    background: #e74c3c;
    border-color: #ffcccc;
}

.grid-item-content.selected-for-action .admin-item-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}