:root {
    --primary-red: #FF0000;
    --dark-red: #CC0000;
    --light-red: #FF3333;
    --accent-blue: #0095FF;
    --gradient-red: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    --gradient-dark: linear-gradient(180deg, #000000 0%, #1A1A1A 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    --text-light: #FFFFFF;
    --text-gray: #E0E0E0;
    --text-muted: #A0A0A0;
    --bg-overlay: rgba(0, 0, 0, 0.85);
    --bg-card: rgba(30, 30, 30, 0.95);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.35);
    --transition: transform 0.22s ease, opacity 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background: #000000;
    color: var(--text-light);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.main-swiper {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

.main-swiper .swiper-wrapper {
    will-change: transform;
    transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}

.reel-slide {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
    background: #000;
}

.horizontal-swiper {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: absolute;
    top: 0;
    left: 0;
    touch-action: pan-x;
}

.content-slide {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    transition: none;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.7) 30%,
            rgba(0, 0, 0, 0.0) 38%,
            transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.slide-content {
    position: relative;
    z-index: 10;
    width: 335px;
    padding: 0 16px 120px;
    transition: var(--transition);
}

.slide-header {
    position: absolute;
    top: 90px;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    pointer-events: none;
}

.slide-category {
    background: var(--gradient-red);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    font-family: 'Poppins', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 195px;
    pointer-events: auto;
}

.slide-date {
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-light);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.slide-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    width: 85%;
    color: white;
}

.slide-excerpt {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-gray);
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.swiper-slide-active .slide-excerpt {
    opacity: 1;
    transform: translateY(0);
}

.slide-actions {
    position: absolute;
    right: 12px;
    bottom: 45px;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px;
    position: relative;
    outline: none;
}

.action-button:active {
    transform: scale(0.95);
}

.action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.action-button:hover .action-icon {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.action-button.liked .action-icon,
.action-button.saved .action-icon {
    background: var(--gradient-red);
    border-color: var(--primary-red);
}

.action-button.liked .action-icon i {
    animation: heartPop 0.4s ease-out;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.views-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.horizontal-indicators {
    position: absolute;
    bottom: 140px;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
}

.horizontal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
    padding: 0;
}

.horizontal-dot.active {
    background: var(--primary-red);
    transform: scale(1.2);
}

/* Contador */
.timer-display {
    position: absolute;
    top: 130px;
    left: 20px;
    z-index: 20;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.reel-slide.swiper-slide-active .timer-display {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.timer-container {
    width: 97px !important;
    height: 30px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 80px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.timer-circle {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-progress-ring {
    position: absolute;
    width: 97px;
    height: 34px;
    inset: 3;
    overflow: visible;
}

.timer-progress-circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.timer-content {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 0;
}

.timer-value,
.timer-ms {
    font-size: 13px;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1;
}

.reel-slide.timer-active .timer-container {
    border-color: rgba(255, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.72);
}

.reel-slide.timer-active .timer-progress-circle {
    stroke: #ff0000;
    animation: dashFlow 60s linear forwards;
}

@keyframes dashFlow {
    0% {
        stroke-dashoffset: 100;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

.vertical-progress {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 100;
    display: block;
    display: none;
    /* Oculto temporalmente */
}

.vertical-progress-bar {
    height: 100%;
    background: var(--gradient-red);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 0 2px 2px 0;
}

/* Iframe de nota */
/* .content-slide iframe {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
} */

/* Capa para administrar gesto horizontal/vertical sobre iframe */
.swipe-area {
    position: absolute;
    inset: 0;
    z-index: 999999;
    background: transparent;
    touch-action: pan-x;
    -webkit-tap-highlight-color: transparent;
}

/* Botón visible para volver */
.swipe-area-inner {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 1000000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.swipe-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.swipe-icon i {
    font-size: 1.1rem;
    color: var(--text-light);
}

.swipe-text {
    opacity: 0.95;
    white-space: nowrap;
}

/* Anula capas viejas si quedaron en HTML */
.iframe-touch-layer {
    display: none !important;
    pointer-events: none !important;
}

/* Ayuda swipe */
.gesture-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 9px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.65);
    pointer-events: auto;
    overflow: hidden;
    opacity: 0;
    animation: hintIn 0.6s ease forwards;
    height: 75px;
}

.gesture-hint__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.gesture-hint__icon i {
    font-size: 0.7rem;
    animation: gestureArrow 1.2s ease-in-out infinite;
}

.gesture-hint__text {
    opacity: 0.95;
    white-space: nowrap;
}

.ayuda-swipe {
    display: none;
}

@keyframes hintIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }

    60% {
        opacity: 1;
        transform: translateY(-5px) scale(1.05);
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes gestureArrow {
    0% {
        transform: translateX(0);
        opacity: 0.5;
    }

    50% {
        transform: translateX(6px);
        opacity: 1;
    }

    100% {
        transform: translateX(0);
        opacity: 0.5;
    }
}

/* Modal comentarios */
.comments-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.98);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.comments-modal.active {
    opacity: 1;
    visibility: visible;
}

.comments-container {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    height: 85vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    transition: transform 0.35s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-modal.active .comments-container {
    transform: translateY(0);
}

.comments-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comments-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.close-comments {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.comment-item {
    padding: 16px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--text-light);
}

.comment-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-gray);
    line-height: 1.5;
}

.comments-input-container {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
}

.comment-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 12px 20px;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: rgba(255, 255, 255, 0.12);
}

.send-comment {
    background: var(--gradient-red);
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast */
.notification-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    padding: 14px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification-icon {
    width: 24px;
    height: 24px;
    background: var(--gradient-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.notification-text {
    font-weight: 500;
}

/* Login popup */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 40px 32px;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.login-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.login-logo {
    margin-bottom: 30px;
}

.login-logo h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.95rem;
    opacity: 0.8;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.google-login-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    padding: 16px 24px;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
}

.google-icon {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    object-fit: cover;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-red);
    font-size: 0.8rem;
}

.login-terms {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 20px;
    line-height: 1.4;
}

.login-terms a {
    color: var(--text-gray);
    text-decoration: underline;
}

/* User menu */
.login-trigger {
    background: var(--gradient-red);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-red);
    cursor: pointer;
    object-fit: cover;
}

.user-menu {
    position: absolute;
    top: 70px;
    right: 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.user-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.logout {
    color: var(--light-red);
    margin-top: 8px;
}

.menu-item.logout:hover {
    background: rgba(255, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .slide-actions {
        right: 5px;
        gap: 14px;
    }

    .action-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .slide-title {
        font-size: 1.6rem;
        width: 85%;
    }

    .horizontal-indicators {
        bottom: 45px;
    }
}

@media (max-width: 480px) {
    .slide-actions {
        right: 5px;
        gap: 14px;
    }

    .action-icon {
        width: 41px;
        height: 43px;
        font-size: 1.6rem;
    }

    .slide-title {
        font-size: 1.4rem;
    }

    .slide-content {
        padding: 0 12px 75px;
    }

    .timer-display {
        top: 130px !important;
        left: 16px !important;
    }

    .timer-value,
    .timer-ms {
        font-size: 10px;
        font-weight: 600;
    }
}

/* .content-slide iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: auto;
} */

.swipe-area {
    position: absolute;
    inset: 0;
    z-index: 999999;
    background: transparent;
    touch-action: pan-x;
}

.swipe-area-inner {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    pointer-events: auto;
}


.swipe-area {
    pointer-events: none;
}

.swipe-area-inner {
    pointer-events: auto;
}

.rubro-activo {
    position: fixed;
    top: 82px;
    left: 15px;
    z-index: 1001;
    padding: 7px 14px;
    border-radius: 30px;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.timer-display {
    display: none;
}

.big-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 80px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 999;
}

.big-heart.show {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
}

.btn-sound {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.8);

    z-index: 50;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;

    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .25s ease,
        transform .25s ease,
        visibility .25s;
}

.btn-sound.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.login-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.login-modal-overlay.active {
    display: flex;
}

.login-close-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
    z-index: 3001;
}

.login-modal {
    width: min(430px, 94vw);
    border-radius: 28px;
    padding: 28px;
    background: linear-gradient(180deg, rgba(28, 28, 28, .96), rgba(8, 8, 8, .96));
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

.login-logo {
    text-align: center;
    margin-bottom: 22px;
}

.login-logo h2 {
    margin: 0 0 8px;
    font-size: 1.45rem;
}

.login-logo p {
    margin: 0;
    color: rgba(255, 255, 255, .66);
    font-size: .92rem;
    line-height: 1.4;
    margin-top: 12px;
}

.login-buttons {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    min-height: 44px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: rgba(255, 255, 255, .52);
    font-size: .78rem;
}

.login-divider:before,
.login-divider:after {
    content: '';
    height: 1px;
    flex: 1;
    background: rgba(255, 255, 255, .12);
}

.login-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: .8rem;
}

.feature-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 0, 0, .16);
    color: #ff5757;
}

.login-terms {
    margin: 18px 0 0;
    font-size: .72rem;
    color: rgba(255, 255, 255, .48);
    text-align: center;
    line-height: 1.45;
}

.login-terms a {
    color: #fff;
}

.lt-user-avatar {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .25);
}

.comments-modal.active {
    display: flex;
}



.action-button.is-liked .action-icon {
    color: #ff2d55;
    /* background: rgba(255, 45, 85, .18); */
    border-color: rgba(255, 45, 85, .45);
}

.action-button.is-saved .action-icon {
    color: #ffd43b;
    /* background: rgba(255, 212, 59, .18); */
    border-color: rgba(255, 212, 59, .45);
}

.like-burst {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 80;
    transform: translate(-50%, -50%) scale(.4);
    pointer-events: none;
    color: #ff2d55;
    font-size: 5.2rem;
    opacity: 0;
    animation: likeBurst .7s ease forwards;
    text-shadow: 0 12px 38px rgba(0, 0, 0, .45);
}

@keyframes likeBurst {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(.4);
    }

    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.12);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.45);
    }
}

.comments-empty {
    padding: 18px;
    text-align: center;
    color: rgba(255, 255, 255, .58);
    font-family: 'Montserrat', sans-serif;
    font-size: .9rem;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

.comment-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}

.comment-body strong {
    display: block;
    font-size: .82rem;
    margin-bottom: 3px;
}

.comment-body p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: .86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

@media (max-width: 520px) {
    .login-modal {
        padding: 22px;
        border-radius: 24px;
    }

    .login-features {
        grid-template-columns: 1fr;
    }
}

.horizontal-swiper {
    touch-action: pan-y;
}

.feed-edge-toast {
    position: fixed;
    left: 40%;
    top: 140px;
    z-index: 100;
    background: linear-gradient(135deg, #ff0000, #8b0000);
    color: #fff;
    padding: 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    width: 60px;
    text-align: center;
}

.feed-edge-toast.show {
    opacity: 1;
}

/*Preview parcial del detalle*/
.horizontal-swiper {
    overflow: visible;
}

.reel-slide .content-slide:first-child {
    transform-origin: center center;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.reel-slide.detail-opening .content-slide:first-child {
    transform: scale(0.965);
    filter: brightness(0.82) blur(1px);
}

.slide-actions button,
.btn-sound,
.gesture-hint,
.feed-edge-toast {
    -webkit-backdrop-filter: blur(12px);
}

/*Feedback swipe horizontal*/
.reel-slide.horizontal-dragging .slide-content,
.reel-slide.horizontal-dragging .slide-header {
    transform: translateX(-10px);
    opacity: 0.85;
    transition: all 0.12s ease;
}

/*Skeleton detalle*/
.nota-skeleton {
    padding: 24px;
    background: #fff;
    min-height: 100%;
}

.skeleton-line,
.skeleton-img {
    background: linear-gradient(90deg, #eee 25%, #f7f7f7 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeletonMove 1.2s infinite;
    border-radius: 12px;
}

.skeleton-img {
    height: 230px;
    margin-bottom: 22px;
}

.skeleton-line {
    height: 16px;
    margin-bottom: 12px;
}

.skeleton-line.big {
    height: 28px;
    width: 85%;
}

.skeleton-line.short {
    width: 55%;
}

@keyframes skeletonMove {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/*Transición búsqueda → nota*/
.search-opening-note {
    animation: searchOpenNote 0.35s ease forwards;
}

@keyframes searchOpenNote {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    100% {
        transform: scale(0.96);
        filter: brightness(0.75);
    }
}

/*Indicador continuidad*/
.feed-edge-toast {
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 12px 34px rgba(255, 0, 0, 0.45);
}


.slide-actions {
    position: absolute;
    right: 12px;
    bottom: 45px;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.actions-tab {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    width: 35px;
    height: 58px;
    opacity: 0;
    pointer-events: none;
    border: none;
    border-radius: 16px 0 0 16px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.reel-slide.detail-mode .actions-tab {
    opacity: 0;
    pointer-events: auto;
}

.reel-slide:not(.detail-mode) .actions-tab {
    opacity: 0;
    pointer-events: none;
}

video.slide-bg,
.no-copy {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.center-sound-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 120;
    width: 96px;
    height: 96px;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.18s ease;
}

.center-sound-icon.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}





.classic-version-wrap {
    position: absolute;
    top: 105px;
    right: 14px;
    z-index: 30;
    display: flex;
    align-items: center;
    transition:
        transform 0.35s cubic-bezier(.22, 1, .36, 1),
        opacity 0.25s ease;
}

.classic-version-btn {
    width: 238px;
    min-height: 62px;
    padding: 9px 12px 9px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 11px;
    box-sizing: border-box;

    color: #fff;
    text-decoration: none;
    font-family: Poppins, Montserrat, sans-serif;

    background:
        linear-gradient(135deg,
            rgba(35, 35, 35, 0.92),
            rgba(12, 12, 12, 0.78));

    box-shadow:
        0 14px 36px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.classic-version-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 10, 10, 0.65);

    background:
        linear-gradient(135deg,
            rgba(65, 18, 18, 0.96),
            rgba(15, 15, 15, 0.88));
}

.classic-version-btn:active {
    transform: scale(0.97);
}

.classic-version-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(135deg,
            #ec2027,
            #a80005);

    box-shadow: 0 8px 20px rgba(212, 10, 10, 0.35);
    font-size: 1.05rem;
}

.classic-version-text {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.classic-version-text strong {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
}

.classic-version-text small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.68rem;
    font-weight: 400;
    white-space: nowrap;
}

.classic-version-arrow {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.09);
    font-size: 0.72rem;
}

.classic-version-tab {
    width: 32px;
    height: 48px;
    margin-left: 6px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px 0 0 14px;

    display: none;
    align-items: center;
    justify-content: center;

    color: #fff;
    background: rgba(15, 15, 15, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    cursor: pointer;
}

.classic-version-wrap.is-collapsed .classic-version-btn {
    display: none;
}

.classic-version-wrap.is-collapsed .classic-version-tab {
    display: flex;
}

.reel-slide.detail-mode .classic-version-wrap {
    display: none;
}

.dev-indicator {
    position: fixed;
    left: -55px;
    bottom: 20px;
    width: 180px;
    text-align: center;
    background: #ff3b30;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 0;
    z-index: 999999;
    transform: rotate(45deg);
    box-shadow: 0 0 15px rgba(0, 0, 0, .35);
    pointer-events: none;
}

.dev-indicator::before {
    content: 'DEV';
}


.comments-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 600;
}

.comment-date {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
}

.lt-user-wrap {
    position: relative;
}

.lt-user-mini-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(15, 15, 15, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    z-index: 3000;
}

.lt-user-mini-menu.active {
    display: block;
}

.lt-user-mini-item {
    width: 100%;
    border: none;
    background: transparent;
    color: #fff;
    padding: 11px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.lt-user-mini-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lt-user-mini-item i {
    color: #ff3333;
}


.comments-container {
    background: rgba(10, 10, 10, 0.96);
    border-radius: 26px 26px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.comments-header {
    padding: 16px 20px;
}

.comments-title {
    font-size: 1rem;
    font-weight: 700;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 8px 2px;
    margin-bottom: 6px;
    background: transparent;
    border: none;
}

.comment-avatar,
.comment-input-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.75);
}

.comment-avatar img,
.comment-input-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-main {
    flex: 1;
    min-width: 0;
}

.comment-bubble {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 9px 12px;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.comment-meta strong {
    font-size: 0.82rem;
    color: #fff;
}

.comment-meta span {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
}

.comment-bubble p {
    font-size: 0.86rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.comment-actions {
    display: flex;
    gap: 14px;
    padding: 5px 0 0 10px;
}

.comment-actions button {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
}

.comment-actions button:active {
    color: #fff;
}

.comments-input-container {
    padding: 12px 14px 16px;
    gap: 10px;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
}

.comment-input {
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 15px;
}

.send-comment {
    width: 42px;
    height: 42px;
    min-width: 42px;
}

.comment-like-btn.is-liked {
    color: #ff2d55;
}

.comment-like-btn.is-liked i {
    color: #ff2d55;
}

.comment-replies {
    margin-top: 8px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-replies .comment-item {
    margin-bottom: 4px;
}

.comment-replies .comment-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
}

.comment-replies .comment-bubble {
    background: rgba(255, 255, 255, 0.045);
}

.comment-replying-to {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.42);
    margin-bottom: 4px;
}

.comment-reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.78rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.comment-reply-bar strong {
    color: #fff;
}

.comment-reply-bar button {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.comment-like-btn.is-liked {
    color: var(--like-color, #ff2d55);
}

.comment-like-btn.is-liked i {
    color: inherit !important;
}

.lt-menu-toggle {
    color: #2a2a2a;
}

.footer-reel-slide {
    width: 100%;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 100px 25px 40px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(circle at top,
            rgba(212, 10, 10, 0.35),
            transparent 45%),
        linear-gradient(180deg,
            #181818 0%,
            #050505 100%);
}

.footer-slide-content {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-slide-logo {
    width: 200px;
    height: auto;
    display: block;
    margin-bottom: 22px;
}

.footer-slide-content h2 {
    margin: 0 0 12px;
    color: #fff;
    font-family: Poppins, Montserrat, sans-serif;
    font-size: 2.2rem;
    line-height: 1.1;
}

.footer-slide-description {
    margin: 0 0 30px;
    color: rgba(255, 255, 255, 0.72);
    font-family: Poppins, Montserrat, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

.footer-slide-link {
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #d40a0a;
    color: #fff;
    font-family: Poppins, Montserrat, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(212, 10, 10, 0.3);
}

.footer-slide-copyright {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: rgba(255, 255, 255, 0.55);
    font-family: Poppins, Montserrat, sans-serif;
    font-size: 0.76rem;
}

.footer-slide-copyright strong {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 600px) {
    .classic-version-wrap {
        top: 135px;
        right: 0px;
    }

    .classic-version-btn {
        width: auto;
        min-height: 48px;
        padding: 6px 10px 6px 6px;
        border-radius: 15px;
    }

    .classic-version-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 11px;
        font-size: 0.9rem;
    }

    .classic-version-text small,
    .classic-version-arrow {
        display: none;
    }

    .classic-version-text strong {
        font-size: 0.76rem;
        white-space: nowrap;
    }
}


.ranking-reel-slide {
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    position: relative;
    overflow: hidden;
    background: #090909;
    box-sizing: border-box;
}

.ranking-slide-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 85% 5%,
            rgba(255, 75, 45, 0.22),
            transparent 35%),
        radial-gradient(circle at 10% 90%,
            rgba(175, 30, 30, 0.16),
            transparent 38%),
        linear-gradient(180deg,
            #191919 0%,
            #070707 100%);
}

.ranking-slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 65px 18px 45px 18px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

.ranking-header {
    max-width: 720px;
    margin: 0 auto 12px auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.ranking-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-family: Poppins, Montserrat, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ff755b;
}

.ranking-header h2 {
    margin: 0;
    font-family: Poppins, Montserrat, sans-serif;
    font-size: 2rem;
    line-height: 1.05;
    color: #fff;
}

.ranking-header p {
    margin: 10px 0 0 0;
    font-family: Poppins, Montserrat, sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.62);
}

.ranking-header-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(255, 95, 65, 0.13);
    color: #ff654b;
    font-size: 1.45rem;
    box-shadow:
        inset 0 0 0 1px rgba(255, 120, 90, 0.15),
        0 12px 35px rgba(0, 0, 0, 0.28);
}

.ranking-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    width: 100%;
    min-height: 90px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 18px;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(8px);
    transition:
        transform 0.18s ease,
        background 0.18s ease;
}

.ranking-item:active {
    transform: scale(0.985);
    background: rgba(255, 255, 255, 0.11);
}

.ranking-position {
    flex: 0 0 28px;
    text-align: center;
    font-family: Orbitron, Poppins, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.34);
}

.ranking-item:nth-child(1) .ranking-position {
    color: #ff6348;
}

.ranking-item:nth-child(2) .ranking-position {
    color: #ff947f;
}

.ranking-item:nth-child(3) .ranking-position {
    color: #ffc0b2;
}

.ranking-image-wrap {
    flex: 0 0 82px;
    width: 82px;
    height: 68px;
    overflow: hidden;
    border-radius: 13px;
    background: #222;
}

.ranking-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ranking-info {
    min-width: 0;
    flex: 1;
}

.ranking-category {
    margin-bottom: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: Poppins, Montserrat, sans-serif;
    font-size: 0.67rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ff806a;
}

.ranking-info h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-family: Poppins, Montserrat, sans-serif;
    font-size: 0.88rem;
    line-height: 1.25;
    font-weight: 600;
    color: #fff;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-views {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-family: Poppins, Montserrat, sans-serif;
    font-size: 0.69rem;
    color: rgba(255, 255, 255, 0.48);
}

.ranking-arrow {
    flex: 0 0 20px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.28);
}

@media (min-width: 700px) {
    .ranking-slide-content {
        padding-left: 30px;
        padding-right: 30px;
    }

    .ranking-image-wrap {
        flex-basis: 105px;
        width: 105px;
        height: 76px;
    }

    .ranking-info h3 {
        font-size: 1rem;
    }
}

/* Selector de tema global del feed */
.theme-toggle {
    position: fixed;
    top: 50%;
    left: max(12px, env(safe-area-inset-left));
    transform: translateY(-50%);
    z-index: 2400;
    min-width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 16px 5px 5px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(28, 28, 32, 0.94), rgba(8, 8, 10, 0.82));
    color: #fff;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    cursor: pointer;
    overflow: hidden;
    animation: themeToggleIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.4, 0, 0.2, 1), filter 0.42s ease;
}

.theme-toggle-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff3b30, #b90000);
    box-shadow: 0 5px 15px rgba(217, 0, 0, 0.38);
    font-size: 1.05rem;
}

.theme-toggle-label {
    white-space: nowrap;
    font: 600 0.78rem/1 'Poppins', sans-serif;
    letter-spacing: 0.01em;
}

.theme-toggle {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity 0.45s ease,
        transform 0.45s ease;
}

.theme-toggle.is-hiding {
    opacity: 0;
    transform: translateY(-12px) scale(0.92)!important;
}

@keyframes themeToggleIn {
    from {
        opacity: 0;
        transform: translate(-115%, -50%) scale(0.82);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: translate(0, -50%) scale(1);
        filter: blur(0);
    }
}

.theme-toggle:focus-visible {
    outline: 3px solid rgba(255, 0, 0, 0.38);
    outline-offset: 2px;
}

/* Tema claro: feed, paneles y detalle cargado desde nota.php */
html.light-mode {
    --gradient-dark: linear-gradient(180deg, #ffffff 0%, #eef0f3 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 246, 248, 0.9));
    --text-light: #17191d;
    --text-gray: #34383f;
    --text-muted: #68707b;
    --bg-overlay: rgba(255, 255, 255, 0.94);
    --bg-card: rgba(255, 255, 255, 0.97);
    --shadow-lg: 0 8px 32px rgba(29, 35, 45, 0.12);
    --shadow-xl: 0 16px 48px rgba(29, 35, 45, 0.16);
}

html.light-mode,
html.light-mode body,
html.light-mode .main-swiper,
html.light-mode .reel-slide,
html.light-mode .horizontal-swiper,
html.light-mode .nota-container.nota-content {
    background: #f4f5f7 !important;
    color: #17191d;
}

html.light-mode .theme-toggle {
    border-color: rgba(24, 28, 34, 0.14);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(239, 242, 246, 0.92));
    color: #20242a;
    box-shadow: 0 5px 18px rgba(29, 35, 45, 0.16);
}

html.light-mode .comments-container,
html.light-mode .user-menu,
html.light-mode .login-modal,
html.light-mode .lt-search-floating-box,
html.light-mode .nota-skeleton {
    background: #fff;
    color: #20242a;
    border-color: #dfe3e8;
}

html.light-mode .revista-reel-slide,
html.light-mode .ranking-reel-slide,
html.light-mode .footer-reel-slide {
    background: #f4f5f7 !important;
    color: #20242a;
}

html.light-mode .revistas-slide-bg,
html.light-mode .podcast-slide-bg {
    background: radial-gradient(circle at top left, rgba(217, 0, 0, 0.08), transparent 38%),
        linear-gradient(180deg, #ffffff 0%, #edf0f3 100%) !important;
}

html.light-mode .revistas-kicker,
html.light-mode .revistas-header h2,
html.light-mode .revistas-count,
html.light-mode .revista-card,
html.light-mode .footer-slide-description,
html.light-mode .footer-slide-copyright {
    color: #252a31;
}

html.light-mode .revista-card,
html.light-mode .revistas-count {
    background: rgba(255, 255, 255, 0.88);
    border-color: #dfe3e8;
    box-shadow: 0 18px 50px rgba(29, 35, 45, 0.14);
}

html.light-mode .comments-header,
html.light-mode .comments-input-container,
html.light-mode .feature-item,
html.light-mode .comment-input,
html.light-mode .menu-item {
    background: #f6f7f9;
    color: #252a31;
    border-color: #dfe3e8;
}

html.light-mode .comments-empty,
html.light-mode .comment-item,
html.light-mode .comment-body p,
html.light-mode .login-logo p,
html.light-mode .login-terms,
html.light-mode .login-divider {
    color: #68707b;
    border-color: #e3e6ea;
}

html.light-mode .login-terms a,
html.light-mode .comments-title {
    color: #20242a;
}

html.light-mode .skeleton-line,
html.light-mode .skeleton-img {
    background: linear-gradient(90deg, #e8eaed 25%, #f7f8f9 50%, #e8eaed 75%);
    background-size: 200% 100%;
}

html.light-mode .nota-main-container,
html.light-mode .nota-detalle-moderno,
html.light-mode .nota-contenido-moderno,
html.light-mode .trending-section {
    background: #fff !important;
    color: #25282d;
}

html.light-mode .nota-copete-moderno,
html.light-mode .compartir-moderno,
html.light-mode .cita-moderna {
    background: #f3f5f7;
    color: #34383f;
}

html.light-mode .copete-texto,
html.light-mode .nota-cuerpo-moderno,
html.light-mode .subtitulo-moderno,
html.light-mode .subtitulo-secundario {
    color: #292d33;
}

html.light-mode .nota-meta-superior,
html.light-mode .nota-meta-inferior {
    border-color: #dde1e6;
}

html.light-mode .meta-item,
html.light-mode .tags-titulo,
html.light-mode .compartir-titulo {
    color: #626a75;
}

html.light-mode .tag-item,
html.light-mode .trending-card {
    background: #f5f6f8;
    color: #34383f;
    border-color: #e1e4e8;
}

/* Los textos superpuestos a fotos conservan contraste en ambos temas. */
html.light-mode .content-slide .slide-title,
html.light-mode .content-slide .slide-excerpt,
html.light-mode .content-slide .slide-date,
html.light-mode .content-slide .action-button,
html.light-mode .media-principal,
html.light-mode .media-principal h1,
html.light-mode .media-principal button {
    color: #fff;
}

@media (max-width: 520px) {
    .theme-toggle {
        left: max(9px, env(safe-area-inset-left));
        height: 48px;
        padding-right: 13px;
    }

    .theme-toggle-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle {
        animation-duration: 0.01ms;
        transition-duration: 0.01ms;
    }
}

.classic-version-btn {
    display: none;
}

.reel-slide[data-index="0"] .classic-version-btn {
    display: flex;
}
/* ==========================================================
   LIGHT MODE GLOBAL: feed + cabecera
   ========================================================== */

/* El selector ahora vive en la cabecera, junto a la lupa. */
.header-theme-toggle {
    position: static !important;
    transform: none !important;
    min-width: 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    gap: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: none;
    overflow: visible;
    flex: 0 0 38px;
}

.header-theme-toggle .theme-toggle-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    background: transparent;
    box-shadow: none;
    font-size: 1.25rem;
}

.header-theme-toggle .theme-toggle-label {
    display: none;
}

.header-theme-toggle.is-hiding {
    opacity: 1 !important;
    transform: none !important;
}

/* Si nota.php todavía trae el viejo selector flotante, se oculta. */
.nota-container .theme-toggle:not(.header-theme-toggle) {
    display: none !important;
}

html.light-mode .header-theme-toggle {
    background: transparent;
    color: #20242a;
    border: none;
    box-shadow: none;
}

/* Feed: pasar la máscara inferior de negro a blanco. */
html.light-mode .content-slide .gradient-overlay {
    background: linear-gradient(to top,
        rgba(255,255,255,.98) 0%,
        rgba(255,255,255,.92) 10%,
        rgba(255,255,255,.70) 21%,
        rgba(255,255,255,.16) 30%,
        rgba(255,255,255,0) 35%,
        transparent 100%) !important
}

/* Textos del feed sobre la zona blanca. */
html.light-mode .content-slide .slide-title {
    color: #17191d !important;
    text-shadow: 0 1px 2px rgba(255,255,255,.72), 0 2px 10px rgba(255,255,255,.92);
}

html.light-mode .content-slide .slide-excerpt {
    color: #34383f !important;
    text-shadow: none;
}

/* Badges del encabezado de cada nota. */
html.light-mode .content-slide .slide-category {
    background: rgba(255,255,255,.94) !important;
    color: #cc0000 !important;
    border-color: rgba(204,0,0,.22) !important;
    box-shadow: 0 4px 14px rgba(25,30,36,.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

html.light-mode .content-slide .slide-date {
    background: rgba(255,255,255,.92) !important;
    color: #34383f !important;
    border-color: rgba(20,24,30,.10) !important;
    box-shadow: 0 4px 14px rgba(25,30,36,.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Acciones laterales: iconos oscuros sobre cápsulas blancas. */
html.light-mode .content-slide .action-button {
    color: #20242a !important;
}

html.light-mode .content-slide .action-icon {
    background: rgba(255,255,255,.90);
    border: 1px solid rgba(20,24,30,.10);
    box-shadow: 0 5px 18px rgba(25,30,36,.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html.light-mode .content-slide .action-button:hover .action-icon {
    background: #fff;
    border-color: rgba(20,24,30,.18);
}

html.light-mode .content-slide .action-button.is-liked .action-icon,
html.light-mode .content-slide .action-button.liked .action-icon {
    color: #e91e4d !important;
    background: #fff0f4;
    border-color: rgba(233,30,77,.28);
}

html.light-mode .content-slide .action-button.is-saved .action-icon,
html.light-mode .content-slide .action-button.saved .action-icon {
    color: #b98700 !important;
    background: #fff8dc;
    border-color: rgba(185,135,0,.28);
}

html.light-mode .content-slide .views-label {
    color: #4f5660;
    text-shadow: 0 1px 2px rgba(255,255,255,.9);
}

html.light-mode .content-slide .horizontal-dot {
    background: rgba(35,39,45,.24);
}

html.light-mode .content-slide .horizontal-dot.active {
    background: var(--primary-red);
}

html.light-mode .content-slide .timer-container {
    background: rgba(255,255,255,.92);
    border-color: rgba(20,24,30,.10);
    box-shadow: 0 4px 14px rgba(25,30,36,.10);
}

html.light-mode .content-slide .timer-value,
html.light-mode .content-slide .timer-ms {
    color: #20242a;
}

html.light-mode .reel-slide.timer-active .timer-container {
    background: rgba(255,255,255,.96);
    border-color: rgba(204,0,0,.20);
}

/* ==========================================================
   LIGHT MODE - AJUSTES FEED / HEADER
   ========================================================== */

/* Acciones laterales del feed */
html.light-mode .slide-actions .action-button {
    color: #20242a;
}

html.light-mode .slide-actions .action-icon {
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(25, 30, 36, 0.12);
    box-shadow: 0 4px 14px rgba(20, 25, 30, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

html.light-mode .slide-actions .action-button:hover .action-icon {
    background: #ffffff;
    border-color: rgba(25, 30, 36, 0.20);
    box-shadow: 0 6px 18px rgba(20, 25, 30, 0.18);
}

/* Like activo */
html.light-mode .slide-actions .btn-like.is-liked .action-icon,
html.light-mode .slide-actions .action-button.liked .action-icon {
    background: linear-gradient(135deg, #ff3232 0%, #d90000 100%);
    color: #fff;
    border-color: rgba(190, 0, 0, 0.35);
}

/* Menú hamburguesa */
html.light-mode .lt-menu-toggle {
    color: #20242a !important;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(25, 30, 36, 0.10);
    box-shadow: 0 4px 14px rgba(20, 25, 30, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

html.light-mode .lt-menu-toggle:hover {
    color: #d60000 !important;
    background: #fff;
    border-color: rgba(214, 0, 0, 0.28);
}


/* ==========================================================
   HEADER - GRADIENTE MEJORADO
   ========================================================== */

/* DARK MODE */
html.dark-mode .lt-header {
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.94) 0%,
            rgba(0, 0, 0, 0.86) 34%,
            rgba(0, 0, 0, 0.60) 62%,
            rgba(0, 0, 0, 0.22) 84%,
            rgba(0, 0, 0, 0) 100%
        );
}

/* LIGHT MODE */
html.light-mode .lt-header {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.94) 35%,
            rgba(255, 255, 255, 0.76) 62%,
            rgba(255, 255, 255, 0.30) 84%,
            rgba(255, 255, 255, 0) 100%
        );
}

/* DARK MODE */
html.dark-mode .lt-menu-toggle {
    color: #fff !important;
}

/* LIGHT MODE */
html.light-mode .lt-menu-toggle {
    color: #20242a !important;
}