* {
    box-sizing: border-box;
}

html {
    background: #000;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #000;
    /* Solid black for Safari bars to blend */
    color: white;
    font-family: 'Montserrat', sans-serif;
    overflow-y: auto;
    touch-action: manipulation;
    padding-top: 60px;
    /* Space for fixed header */
}

.hidden {
    display: none !important;
}

/* Global Drag & Drop Overlay (Glassmorphism) */
.global-drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    visibility: visible;
    opacity: 1;
}

.global-drop-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.global-drop-overlay .drop-content {
    text-align: center;
    color: white;
    padding: 60px;
    border: 4px dashed rgba(255, 140, 0, 0.4);
    border-radius: 50px;
    background: rgba(255, 140, 0, 0.05);
    max-width: 90%;
    animation: pulseDrop 2s infinite ease-in-out;
}

.global-drop-overlay i {
    font-size: 80px;
    color: #ff8c00;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 20px rgba(255, 140, 0, 0.3));
}

.global-drop-overlay p {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
}

@keyframes pulseDrop {
    0% {
        transform: scale(1);
        border-color: rgba(255, 140, 0, 0.4);
    }

    50% {
        transform: scale(1.03);
        border-color: rgba(255, 140, 0, 0.8);
    }

    100% {
        transform: scale(1);
        border-color: rgba(255, 140, 0, 0.4);
    }
}

/* Edit Video Styles v6.5.0 */
.edit-video-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.edit-video-btn:hover {
    background: #ff8c00;
    transform: scale(1.1);
}

.edit-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.edit-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.edit-form-group input,
.edit-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.edit-form-group input:focus,
.edit-form-group textarea:focus {
    border-color: #ff8c00;
}

.edit-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.edit-submit-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    border: none;
    border-radius: 12px;
    color: #000;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.edit-submit-btn:hover {
    transform: translateY(-2px);
}

/* Woowia Studio v1.0 - Video Filters & Overlays */
.v-filter-vivid {
    filter: saturate(1.4) contrast(1.1) brightness(1.05);
}

.v-filter-vintage {
    filter: sepia(0.4) contrast(1.1) brightness(0.9) hue-rotate(-10deg);
}

.v-filter-bw {
    filter: grayscale(1) contrast(1.2);
}

.v-filter-cold {
    filter: hue-rotate(180deg) saturate(0.8) brightness(0.9) contrast(1.1);
}

/* Simulado frío con hue rotate invertido y desaturación */
.v-filter-none {
    filter: none;
}

/* Especial para frío sin rotar colores de piel demasiado */
.v-filter-cold {
    filter: brightness(1.1) contrast(0.9) saturate(0.8) sepia(0.1) hue-rotate(180deg) brightness(0.8);
}

/* Re-definición más precisa de frío */
.v-filter-cold {
    filter: saturate(0.7) brightness(0.9) hue-rotate(10deg);
}

.video-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 5%;
    container-type: inline-size;
}

.video-overlay-text {
    color: #ffffff;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 0, 0, 0.6);
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.5);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 2px;
    width: 100%;
    max-width: 95%;
    opacity: 0.95;
    user-select: none;
    animation: fadeInOverlay 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
        filter: blur(5px);
    }

    to {
        opacity: 0.95;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* Woowia Studio Constrained Positioning */
.video-overlay-container.pos-top {
    justify-content: flex-start;
    padding-top: 15%;
}

.video-overlay-container.pos-center {
    justify-content: center;
}

.video-overlay-container.pos-bottom {
    justify-content: flex-end;
    padding-bottom: 25%;
}

/* Responsive text via CQW (Container Queries) so feed VS maximized looks perfect */
.video-overlay-text.size-sm {
    font-size: clamp(0.9rem, 5cqw, 1.5rem);
    letter-spacing: 1px;
}

.video-overlay-text.size-md {
    font-size: clamp(1.4rem, 9cqw, 3.5rem);
}

.video-overlay-text.size-lg {
    font-size: clamp(2.2rem, 14cqw, 5.5rem);
    line-height: 1.1;
}

.video-overlay-text.align-left {
    text-align: left;
}

.video-overlay-text.align-center {
    text-align: center;
}

.video-overlay-text.align-right {
    text-align: right;
}

/* Studio Editor UI Updates */
.studio-control-group {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
}

.studio-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.studio-icon-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.studio-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.studio-icon-btn.active {
    background: #ff8c00;
    color: black;
    border-color: #ff8c00;
}

.studio-icon-btn i {
    font-size: 14px;
}

/* Woowia Studio v1.2 - Special Effects Animations */
.video-effect-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
    /* Prevent particles from leaking out of the card area */
}

/* --- STARS EFFECT V2 (Particle Engine) --- */
.v-effect-stars {
    background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(218, 165, 32, 0.1) 100%);
}

.v-particle-star {
    position: absolute;
    font-size: 14px;
    color: #ffd700;
    /* Golden stars as suggested */
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 0 15px rgba(255, 255, 255, 0.4);
    animation: twinkleParticle 3s infinite ease-in-out;
}

@keyframes twinkleParticle {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* --- ROMANCE EFFECT V2 (Particle Engine) --- */
.v-effect-romance {
    background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(255, 105, 180, 0.1) 100%);
}

.v-particle-romance {
    position: absolute;
    font-size: 18px;
    opacity: 0.7;
    animation: floatingParticle 5s infinite ease-in-out;
}

@keyframes floatingParticle {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.4;
    }

    33% {
        transform: translate(15px, -30px) rotate(10deg);
        opacity: 0.8;
    }

    66% {
        transform: translate(-10px, -50px) rotate(-10deg);
        opacity: 0.6;
    }
}

/* --- HEARTS EFFECT V2 (Particle Engine) --- */
.v-effect-hearts {
    background: transparent;
}

.v-particle-heart {
    position: absolute;
    font-size: 22px;
    color: #ff1a1a;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
    bottom: -10%;
    opacity: 0;
    animation: risingParticle 6s infinite ease-in;
}

@keyframes risingParticle {
    0% {
        bottom: -10%;
        transform: scale(0.5) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 0.9;
    }

    85% {
        opacity: 0.7;
    }

    100% {
        bottom: 110%;
        transform: scale(1.4) rotate(25deg);
        opacity: 0;
    }
}

/* --- FIRE EFFECT V2 --- */
.v-effect-fire {
    background: radial-gradient(circle at 50% 100%, rgba(255, 69, 0, 0.4) 0%, transparent 60%);
}

.v-particle-fire {
    position: absolute;
    font-size: 24px;
    bottom: -10%;
    animation: fireParticle 3s infinite ease-in;
    filter: drop-shadow(0 0 8px rgba(255, 69, 0, 0.8));
}

@keyframes fireParticle {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 0.9;
    }

    80% {
        opacity: 0.7;
    }

    100% {
        transform: translateY(-300px) scale(1.5);
        opacity: 0;
    }
}

/* --- MONEY EFFECT V2 --- */
.v-effect-money {
    background: radial-gradient(circle at 50% 0%, rgba(0, 255, 0, 0.1) 0%, transparent 60%);
}

.v-particle-money {
    position: absolute;
    font-size: 20px;
    top: -10%;
    animation: rainMoney 5s infinite linear;
    filter: drop-shadow(0 0 5px rgba(0, 255, 0, 0.5));
}

@keyframes rainMoney {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(700px) rotate(360deg);
        opacity: 0;
    }
}

/* --- SNOW EFFECT V2 --- */
.v-effect-snow {
    background: radial-gradient(circle at 50% 50%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
}

.v-particle-snow {
    position: absolute;
    font-size: 16px;
    color: #fff;
    top: -10%;
    animation: snowFall 7s infinite linear;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes snowFall {
    0% {
        transform: translateY(-10px) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.7;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(700px) translateX(50px);
        opacity: 0;
    }
}

/* --- PARTY EFFECT V2 --- */
.v-effect-party {
    background: transparent;
}

.v-particle-party {
    position: absolute;
    font-size: 22px;
    top: 50%;
    left: 50%;
    animation: popParty 4s infinite ease-out;
}

@keyframes popParty {
    0% {
        transform: scale(0) rotate(0deg) translate(0, 0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 0.8;
    }

    100% {
        transform: scale(0.5) rotate(90deg) translate(200px, -200px);
        opacity: 0;
    }
}

.studio-editor-container {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .studio-editor-container {
        grid-template-columns: 1fr;
    }
}

.studio-preview-box {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    max-height: 50vh;
}

.studio-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.filter-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 11px;
    transition: all 0.2s;
}

.filter-option.active {
    border-color: #ff8c00;
    background: rgba(255, 140, 0, 0.1);
}

.filter-option img {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 5px;
}

.studio-text-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    padding: 10px;
    outline: none;
}

/* --- App Header --- */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 55px;
    background: rgba(6, 5, 6, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 140, 0, 0.2);
    transition: opacity 0.3s ease;
}

@media screen and (max-width: 768px) {
    .app-header {
        background: transparent !important;
        backdrop-filter: none !important;
        border-bottom: none !important;
    }
}

.header-logo {
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 1000;
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

.lang-selector {
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 32px;
}

.lang-selector select {
    background: transparent;
    color: white;
    border: none;
    outline: none;
    font-size: 13px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    text-align: center;
    text-align-last: center;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    display: block;
}

.header-user {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    margin-right: 17px;
    /* Aumentado de 15px a 17px para añadir 2px de espacio con Iniciar Sesión */
}

.header-search-btn {
    background: transparent !important;
    border: none !important;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.header-search-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ff8c00;
}

.header-search-btn i {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 768px) {
    .header-actions {
        margin-right: 4px;
        /* Aumentado de 2px a 4px (añade 2px extra de espacio respecto al login button) */
        gap: 8px;
    }

    .header-search-btn {
        font-size: 1rem;
        width: 30px;
        height: 30px;
    }
}

/* --- Search Overlay --- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.search-overlay.hidden {
    display: none;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-inner {
    position: absolute;
    left: 15px;
    color: #888;
}

#searchInput {
    width: 100%;
    background: #222;
    border: 1px solid #444;
    border-radius: 25px;
    padding: 12px 45px;
    color: white;
    font-size: 16px;
    outline: none;
}

#searchInput:focus {
    border-color: #ff8c00;
    background: #2a2a2a;
}

.clear-search {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.close-search {
    background: none;
    border: none;
    color: #ff8c00;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 50px;
}

.search-section {
    margin-bottom: 30px;
}

.search-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #888;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* User Results */
.user-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-result-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #444;
}

.user-result-info {
    flex: 1;
}

.user-result-username {
    font-weight: 700;
    color: #fff;
    font-size: 15px;
}

.user-result-meta {
    font-size: 12px;
    color: #888;
}

/* Video Grid in Search */
.video-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.video-search-item {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 9/16;
    background: #111;
    cursor: pointer;
    position: relative;
}

.video-search-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-search-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.video-search-title {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.search-empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
}

.search-empty-state p {
    font-size: 16px;
}

@media screen and (max-width: 768px) {
    .header-search-btn {
        color: white;
    }

    .search-container {
        padding: 15px;
    }
}

.login-btn {
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s;
}

.login-btn:hover {
    transform: scale(1.05);
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px;
    border-radius: 25px;
    transition: background 0.2s;
}

.user-avatar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff8c00;
}

.online-avatar {
    border-color: #22c55e !important;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.header-username {
    font-size: 14px;
    font-weight: 500;
    color: #eee;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu {
    position: absolute;
    top: 50px;
    right: 10px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 5px;
    min-width: 120px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.user-menu.hidden {
    display: none;
}

.user-menu button {
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    color: #eee;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-menu button:hover {
    background: rgba(255, 140, 0, 0.2);
}

/* v6.5.0: Switching to Row-based Grid to avoid gaps and uneven bottoms */
.columns-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    /* Increased slightly for desktop breathing space */
    width: 100%;
    position: relative;
    padding: 8px;
    margin-top: -62px;
}

/* Legacy Masonry columns (Keeping for easy revert if requested)
.columns-container {
    display: flex;
    gap: 5px;
    width: 100%;
    position: relative;
    padding: 5px;
    margin-top: -62px;
}
.column {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}
*/

@media screen and (max-width: 768px) {
    .columns-container {
        grid-template-columns: repeat(2, 1fr);
        /* Force 2 columns on mobile */
        gap: 5px;
        padding: 5px;
        margin-top: -55px;
        /* Adjust header offset for mobile */
    }
}

body.is-video-open .columns-container {
    display: none !important;
    /* Hide background grid to prevent leakage */
}

.video-card {
    width: 100%;
    /* Fill the grid cell */
    aspect-ratio: 9/16;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    /* transition: transform 0.2s, box-shadow 0.2s; */
}

/* Video Card Styles */
.video-card {
    position: relative;
    width: 100%;
    padding-top: 177.77%;
    height: 0;
    border-radius: 8px;
    /* overflow: hidden; */
    /* Allow share menu to overflow */
    background: #111;
    margin-bottom: 0px;
    cursor: pointer;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    isolation: isolate;
    /* Create new stacking context */
}

/* Ensure children are rounded since card is no longer overflow:hidden */
.video-card .poster,
.video-card .video-container,
.video-card video {
    border-radius: 8px;
    overflow: hidden;
}

/* Fix share menu overlap with header */
.video-card.menu-open {
    z-index: 110 !important;
}


@media (hover: hover) {
    .video-card:hover {
        transform: scale(1.02);
        z-index: 2;
        box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
        transition: transform 0.2s;
    }
}

.video-card video,
.video-card .poster {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    background: #000;
}

/* Processing Label Layer */
.processing-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #ff8c00;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 800;
    z-index: 100;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 140, 0, 0.5);
    pointer-events: none;
    box-shadow: 0 0 30px rgba(255, 140, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.processing-label i {
    font-size: 18px;
}

/* v.6.6.10: Efecto Premium para estado de procesamiento */
.video-card.processing .poster {
    filter: blur(15px) brightness(0.6);
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a, #1a1a1a);
    background-size: 200% 200%;
    animation: placeholderGradient 3s ease infinite;
}

.video-card.processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 140, 0, 0.1) 0%, transparent 70%);
}

@keyframes placeholderGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


/* Play Button Overlay (Manual Play Strategy) */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    pointer-events: none;
    /* Let clicks pass to the card */
    transition: opacity 0.3s, transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
}

.play-overlay i {
    color: white;
    font-size: 24px;
    margin-left: 4px;
    /* Adjust triangle centering */
}

.video-card.playing .play-overlay {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
    pointer-events: none;
}

/* Hover effect for the button */
.video-card:hover .play-overlay {
    background: rgba(255, 140, 0, 0.8);
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.actions-container {
    position: absolute;
    bottom: 100px;
    /* Adjusted for 2-column view */
    right: 5px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    pointer-events: auto;
}

/* Base button style (TikTok-like, optimized for 2 columns) */
.like-btn,
.comments-btn,
.fav-btn,
.share-btn {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    cursor: pointer;
    width: 45px;
    height: 45px;
    position: relative;
    /* For absolute children like share-menu */
}

.like-btn i,
.comments-btn i,
.fav-btn i,
.share-btn i {
    font-size: 26px !important;
    /* Scaled for 2 columns */
    margin-bottom: 2px;
}

.like-count,
.comments-count,
.fav-count {
    font-size: 11px;
    font-weight: 700;
}


/* --- Like Button --- */
.like-btn i {
    font-size: 28px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-count {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

/* --- Comments Button --- */
.comments-btn i {
    font-size: 26px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.comments-count {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

/* --- Favorite Button --- */
.fav-btn i {
    font-size: 26px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Share Button --- */
.share-btn i {
    font-size: 24px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Active States (Global) --- */
.like-btn.liked i {
    color: #ff0050 !important;
}

.fav-btn.favorited i {
    color: #ffb700 !important;
}

.comments-btn.commented i {
    color: #a855f7 !important;
}

/* Comments Panel (Slide Up Animation) */
.comments-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70vh;
    background: #1a1a1a;
    border-radius: 20px 20px 0 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    /* v5.6.8: Remove shadow/border that might peek through at bottom */
    box-shadow: none;
    border-top: none;
}

.comments-panel.open {
    transform: translateY(0);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
}

.comments-title {
    font-size: 14px;
    font-weight: 700;
}

.close-comments {
    background: none;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item {
    display: flex;
    gap: 12px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    font-size: 13px;
}

.comment-user {
    font-weight: 600;
    color: #ccc;
    margin-bottom: 2px;
}

.comment-text {
    color: white;
    line-height: 1.4;
}

.comment-meta {
    margin-top: 5px;
    font-size: 11px;
    color: #888;
    display: flex;
    gap: 10px;
}

.comment-action {
    cursor: pointer;
    font-weight: 600;
}

.comment-like-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #888;
    margin-left: 5px;
    cursor: pointer;
}

.comment-like-container.liked i {
    color: #ff6b6b;
}

.comment-like-count {
    font-size: 10px;
}

/* Reply Input Area */
.comments-input-area {
    padding: 15px;
    border-top: 1px solid #333;
    background: #1a1a1a;
    display: flex;
    gap: 10px;
    align-items: center;
}

.comments-input-area input {
    flex: 1;
    background: #333;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    color: white;
    font-size: 16px;
    /* Aumentado a 16px para evitar auto-zoom en iOS */
}

.comments-input-area input:focus {
    outline: none;
    background: #444;
}

.send-comment-btn {
    background: none;
    border: none;
    color: #ff8c00;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.send-comment-btn:disabled {
    color: #555;
    cursor: not-allowed;
}

.reply-badge {
    font-size: 10px;
    background: #333;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 5px;
    display: inline-block;
    color: #aaa;
}

.replies-list {
    margin-left: 44px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 2px solid #333;
    padding-left: 10px;
}


.video-card .poster {
    z-index: 10;
    transition: opacity 0.5s ease;
    background: #111;
    pointer-events: none;
    /* Let clicks pass to the video/card */
}

.video-card video {
    z-index: 5;
}

.video-card.playing .poster {
    opacity: 0;
    pointer-events: none !important;
}


/* Old individual button styles removed - now in actions-container */

/* Share Menu */
.share-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    border-radius: 10px;
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 0px;
    min-width: 150px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    backdrop-filter: blur(15px);
    margin-bottom: 5px;
    z-index: 9999;
    /* v.6.6.10: Máxima prioridad para evitar ser tapado por el video superior */
}

/* Modifier to open downwards instead of upwards */
.share-menu.share-menu-down {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 5px;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-menu.show {
    display: flex;
    animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 5px;
    color: white;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.share-option:hover {
    background: rgba(255, 140, 0, 0.2);
}

.share-option i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.share-option.whatsapp i {
    color: #25D366;
}

.share-option.twitter i {
    color: #1DA1F2;
}

.share-option.facebook i {
    color: #4267B2;
}

.share-option.telegram i {
    color: #0088cc;
}

.share-option.instagram i {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.share-option.copy i {
    color: #ff8c00;
}

.share-option.copied {
    background: rgba(50, 255, 50, 0.2);
}

.share-option.copied i {
    color: #6bff6b;
}

/* --- Delete Button (only for owner) --- */
.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 70;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 50, 50, 0.85);
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
    backdrop-filter: blur(4px);
}

.video-card:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #ff0000;
    transform: scale(1.15);
}

/* --- Upload Button --- */
.upload-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 30;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
    transition: transform 0.2s;
}

.upload-btn:hover {
    transform: scale(1.1) rotate(90deg);
}

/* --- Modal Base --- */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal:not(.hidden) {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    /* Cambiado de center a flex-start */
    padding: 20px;
    overflow-y: auto;
    /* Asegurar scroll en el overlay */
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
    cursor: pointer;
    transition: background 0.3s ease;
}

.modal-content {
    background-color: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    border: 1px solid rgba(255, 140, 0, 0.3);
    position: relative;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #262626;
    border: 1px solid rgba(255, 140, 0, 0.4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.modal-close-btn:hover {
    background: #ff8c00;
    color: #000;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.4);
}

.modal-close-btn i {
    font-size: 18px;
}

@media (max-width: 480px) {
    .modal-close-btn {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
    }
}

/* --- Auth & Private Access Modal Styles --- */
.auth-modal-content {
    padding-top: 3.5rem !important;
}

.auth-header {
    margin-bottom: 25px;
}

.auth-header h2 {
    margin-top: 5px !important;
    font-size: 1.5rem;
    color: #fff;
}

.auth-input-group {
    position: relative;
    margin-bottom: 12px;
    width: 100%;
}

.auth-input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #DAA520;
    font-size: 1.1rem;
    z-index: 2;
}

.auth-input-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: white !important;
    font-size: 1rem !important;
    transition: all 0.3s ease;
    box-sizing: border-box;
    display: block;
}

.auth-input-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #DAA520 !important;
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.3) !important;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    margin-top: 15px;
    background: linear-gradient(135deg, #ff8c00, #DAA520) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #000 !important;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(218, 165, 32, 0.4);
    filter: brightness(1.1);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-error-msg {
    margin-top: 15px;
    background: rgba(255, 68, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
    font-size: 0.9rem;
}

.close-modal:hover {
    color: #fff;
}

/* Mandatory Auth State */
.auth-mandatory .close-modal {
    display: none !important;
}

.auth-required-blur #columnsContainer,
.auth-required-blur #appHeader,
.auth-required-blur .upload-btn {
    filter: blur(15px) grayscale(0.5);
    /* Desactivado pointer-events: none para permitir scroll */
    user-select: none;
    transition: filter 0.5s ease;
}

/* --- Profile Modal Styles --- */
.profile-modal {
    max-width: 380px;
    padding-bottom: 20px;
}

.profile-modal h2 {
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
}

.profile-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    border: 3px solid #ff8c00;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-avatar-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.5);
}

#profileAvatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
    max-height: none;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
    font-size: 12px;
}

.avatar-overlay i {
    font-size: 24px;
    margin-bottom: 5px;
}

.profile-avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.profile-username {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #eee;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-item i {
    font-size: 24px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 12px;
    color: #888;
}

.top-video-section {
    border-top: 1px solid #333;
    padding-top: 20px;
}

.top-video-section h3 {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.top-video-preview {
    position: relative;
    width: 120px;
    height: 200px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
}

.top-video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-video-likes {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #ff6b6b;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* Global Top Video Creator Info */
.global-top {
    border-top: 1px solid gold;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
}

.global-top-creator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.global-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid gold;
}

#globalCreatorName {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* --- Auth Modal Styles --- */
.auth-modal {
    max-width: 360px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 25px;
    background: #222;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    color: #888;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
}

.auth-tab.active {
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    color: white;
}

.auth-form {
    text-align: left;
}

.auth-form.hidden {
    display: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #aaa;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #222;
    color: white;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #ff8c00;
}

/* Password field with toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #ff8c00;
}

.auth-submit {
    width: 100%;
    margin-top: 10px;
}

.auth-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.auth-message:empty {
    display: none;
}

.auth-message.error {
    background: rgba(255, 50, 50, 0.2);
    color: #ff6b6b;
}

.auth-message.success {
    background: rgba(50, 255, 50, 0.2);
    color: #6bff6b;
}

/* Avatar Upload */
.avatar-upload {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff8c00;
}

.avatar-preview.hidden {
    display: none;
}

.avatar-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.avatar-hint {
    color: #666;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Forgot Password Link */
.forgot-password-link {
    display: block;
    text-align: right;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: #ff8c00;
}

/* --- Submit Button --- */
.submit-btn {
    margin-top: 1rem;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* --- Footer --- */
footer {
    position: relative;
    width: 100%;
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    z-index: 10;
    pointer-events: none;
    margin-top: auto;
}

/* --- Fullscreen Video Modal (Zoom Effect) --- */
.modal-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
    background: #000 !important;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-fullscreen:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.video-container-fullscreen {
    width: 100%;
    /* Take maximum space */
    height: 100%;
    /* Take maximum space */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.video-container-fullscreen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media screen and (max-width: 768px) {
    .modal-fullscreen {
        background: #000 !important;
        position: fixed;
        top: 0 !important;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100dvh !important;
        z-index: 100001;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .video-container-fullscreen {
        width: 100vw !important;
        height: 100% !important;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #000;
    }

    .video-container-fullscreen video {
        object-fit: contain !important;
        width: 100vw !important;
        height: 100% !important;
        max-height: none !important;
    }

    /* Keep close button in safe area */
    .close-modal {
        top: env(safe-area-inset-top, 20px) !important;
        right: 20px !important;
        z-index: 100002;
    }
}

/* Modal Play Overlay */
.modal-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 30px;
    z-index: 110;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.2s;
    cursor: pointer;
}

.modal-play-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-play-overlay i {
    margin-left: 5px;
}

.modal-play-overlay:active {
    transform: translate(-50%, -50%) scale(0.9);
}

.video-container-fullscreen video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    /* No black bars, show transparent overlay */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}

.close-video {
    position: absolute;
    top: max(20px, env(safe-area-inset-top));
    right: max(20px, env(safe-area-inset-right));
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 45px;
    text-align: center;
    cursor: pointer;
    z-index: 101;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
}

.close-video:hover {
    background: white;
    color: black;
    transform: scale(1.1);
}

/* --- Upload List Styles --- */
.upload-list {
    margin-top: 20px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
}

.upload-item {
    background: #222;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #eee;
}

.item-progress-bar {
    width: 100%;
    height: 6px;
    background: #444;
    border-radius: 3px;
    overflow: hidden;
}

.item-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff8c00, #ffdb58);
    transition: width 0.2s linear;
}

.item-status {
    font-size: 11px;
    color: #aaa;
    text-align: right;
}

/* --- Desktop Zoom Modal --- */
.desktop-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.desktop-zoom-modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.desktop-zoom-modal.hidden {
    display: none !important;
}

.desktop-zoom-content {
    position: relative;
    height: 90vh;
    max-width: 90vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.desktop-zoom-video-container {
    height: 100%;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.desktop-zoom-video-container video {
    height: 100%;
    width: auto;
    border-radius: 12px;
    object-fit: contain;
}

/* v5.8: Let landscape videos span the whole width to match aspect ratio safely */
.desktop-zoom-video-container video.is-landscape {
    width: 100%;
    max-width: 100%;
}

.desktop-zoom-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: white;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100001;
    transition: all 0.2s;
}

.desktop-zoom-close:hover {
    background: rgba(255, 140, 0, 0.8);
    border-color: #fff;
    transform: scale(1.1);
}

/* --- Preview Container --- */
#preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    background: #222;
    border: 2px solid #444;
}

.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 50, 50, 0.9);
    border: none;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.15s, background 0.15s;
}

.preview-item .remove-btn:hover {
    transform: scale(1.15);
    background: #ff0000;
}

.preview-item .preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px;
    font-size: 9px;
    text-align: center;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- File Drop Area --- */
.file-drop-area {
    position: relative;
    padding: 25px 15px;
    border: 2px dashed #666;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
    cursor: pointer;
    text-align: center;
}

.file-drop-area:hover {
    border-color: #ff8c00;
    background: rgba(255, 140, 0, 0.1);
}

.file-drop-area.drag-over {
    border-color: #ffdb58;
    background: rgba(255, 140, 0, 0.2);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.3);
}

.file-drop-area .file-msg {
    display: block;
    color: #aaa;
    font-size: 14px;
    pointer-events: none;
}

.file-drop-area .file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* --- Splash Screen --- */
.splash-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #060506;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    transition: opacity 0.5s, visibility 0.5s;
}

.splash-container.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.logo-text {
    font-family: 'Nunito', sans-serif;
    font-size: 3rem;
    font-weight: 1000;
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
}

.circle-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle {
    fill: none;
    stroke: #ff8c00;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 251;
    stroke-dashoffset: 251;
    animation: draw-circle 2s ease-out forwards;
}

@keyframes draw-circle {
    to {
        stroke-dashoffset: 0;
    }
}

/* --- Mobile Responsive --- */
@media (max-width: 480px) {
    .header-username {
        display: none;
    }

    .video-user-info {
        bottom: 8px;
        left: 6px;
        gap: 6px;
    }

    .video-avatar {
        width: 26px;
        height: 26px;
    }

    .video-username {
        font-size: 11px;
    }

    .like-btn {
        bottom: 8px;
        right: 6px;
    }

    .like-btn i {
        font-size: 20px;
    }

    .like-count {
        font-size: 10px;
        margin-top: 2px;
        /* Reduced from 4px */
    }

    .comments-count,
    .fav-count {
        margin-top: 2px;
        /* Reduced from 4px */
    }

    /* Force tight spacing on mobile actions */
    .actions-container {
        gap: 2px !important;
        bottom: 90px;
        right: 2px;
    }

    /* Override fixed size from main CSS */
    .like-btn,
    .comments-btn,
    .fav-btn,
    .share-btn {
        width: 35px !important;
        height: auto !important;
        min-height: 40px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .like-btn i,
    .comments-btn i,
    .fav-btn i,
    .share-btn i {
        font-size: 22px !important;
        margin-bottom: 0 !important;
        /* Restore original color */
        color: white !important;
        /* Fix alignment: ensure icon takes full width and centers */
        width: 100%;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    /* Specific adjustment for heart icon as requested */
    .like-btn i {
        margin-left: 10px !important;
        width: auto !important;
    }

    /* Also shift the counter */
    .like-count {
        margin-left: 10px !important;
        margin-top: 2px !important;
    }
}

/* --- Unified Overlay (Moved to End) --- */
.overlay-bottom-left {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 10px 12px 10px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

.video-user-info {
    position: relative;
    bottom: auto;
    left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    pointer-events: auto;
    /* Restore clicks */
}

.video-metadata {
    position: relative;
    bottom: auto;
    left: auto;
    max-width: 90%;
    text-align: left;
    margin-bottom: 4px;
    z-index: 50;
    pointer-events: auto;
    /* Restore text selection/clicks */
}

.video-metadata h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 2px 0;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
}

.video-metadata p {
    font-size: 0.9rem;
    color: #eee;
    margin: 0;
    line-height: 1.3;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    /* 1-line truncation */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.description-more-link {
    display: inline-block;
    color: #ff8c00;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    transition: opacity 0.2s;
}

.description-more-link:hover {
    opacity: 0.8;
}

/* Glassmorphism Full Overlay for Description */
.video-description-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 3rem 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: pointer;
    /* Click to close */
    overflow-y: auto;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.video-description-overlay::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.video-description-overlay.show {
    opacity: 1;
    visibility: visible;
}

.description-full-text {
    color: white;
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: left;
    font-weight: 400;
    max-width: 100%;
    margin-bottom: 40px;
    animation: fadeInUp 0.4s ease;
    white-space: pre-wrap;
    /* Mantiene los saltos de línea de Pages/Word */
}

/* Links within description */
.video-description-link {
    color: #ff8c00;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 140, 0, 0.3);
    transition: all 0.2s;
}

.video-description-link:hover {
    border-bottom-color: #ff8c00;
    background: rgba(255, 140, 0, 0.1);
}

.close-overlay-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}


.video-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
    background: #333;
}

.video-username {
    font-size: 13px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Follow System (TikTok Style) --- */
.avatar-container-feed {
    position: relative;
    width: 45px;
    height: 45px;
    margin-bottom: 15px;
}

.avatar-container-feed .video-avatar {
    width: 100%;
    height: 100%;
    border: 2px solid white;
}

.follow-plus-btn {
    position: absolute;
    bottom: -5px;
    right: -8px;
    /* Move to bottom right of avatar */
    left: auto;
    transform: none;
    width: 20px;
    height: 20px;
    background: #ff0050;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.follow-plus-btn.following {
    background: #00f2ea;
    /* TikTok-style cyan for following */
    color: #000;
}

.follow-plus-btn i {
    font-size: 10px;
}

/* --- Profile Styles --- */
.profile-modal-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #121212;
    position: relative;
    width: 95%;
    max-width: 480px;
    /* Aumentado de 420px Original */
    border-radius: 20px;
    margin: 20px auto;
}

/* Woowia Key Display */
.woowia-key-display {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    border: 1px dashed rgba(218, 165, 32, 0.4);
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.woowia-key-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.woowia-key-value-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.woowia-key-value {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: #DAA520;
    letter-spacing: 2px;
}

.regenerate-key-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #aaa !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0 !important;
    margin: 0 !important;
}

.regenerate-key-btn:hover {
    background: rgba(218, 165, 32, 0.2) !important;
    color: #DAA520 !important;
    transform: rotate(180deg);
}

.regenerate-key-btn i {
    font-size: 14px !important;
}

.profile-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: white;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100001;
    transition: all 0.2s;
}

.profile-close-btn:hover {
    background: rgba(255, 140, 0, 0.8);
    border-color: #fff;
    transform: scale(1.1);
}


.profile-header {
    padding: 20px 20px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-avatar-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.profile-username {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

/* --- Profile Locked Screen --- */
.profile-locked-container {
    padding: 60px 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    margin: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.locked-icon {
    font-size: 50px;
    color: #ff8c00;
    margin-bottom: 20px;
}

.profile-locked-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.profile-locked-desc {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 30px;
}

.access-key-form {
    max-width: 250px;
    margin: 0 auto;
}

.access-key-input-group input {
    width: 100%;
    padding: 12px 15px;
    background: #222;
    border: 1px solid #444;
    border-radius: 10px;
    color: #fff;
    text-align: center;
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.unlock-btn {
    width: 100%;
    padding: 12px;
    background: #ff8c00;
    color: #000;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.unlock-btn:hover {
    transform: scale(1.05);
}

.profile-tabs {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #333;
    margin-bottom: 15px;
}

.profile-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    color: #888;
    cursor: pointer;
    font-size: 20px;
    border-bottom: 2px solid transparent;
}

.profile-tab.active {
    color: white;
    border-bottom-color: white;
}

.profile-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

@media (min-width: 768px) {
    .profile-modal-content {
        max-width: 85%;
        margin-top: 40px;
    }

    .profile-video-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 10px;
    }
}

.profile-video-item {
    position: relative;
    aspect-ratio: 9/16;
    background: #222;
    cursor: pointer;
    overflow: hidden;
}

.profile-video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-video-stats {
    position: absolute;
    bottom: 5px;
    left: 5px;
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Comments Panel Fix --- */
.comments-panel {
    z-index: 3000 !important;
    /* Higher than modal */
}

/* --- Follow Back Label --- */
.follow-back-label {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

/* --- Age Gate (Muro de Edad) --- */
.age-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* v5.7.6: 50% opacity to show background feed */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    /* Por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
}

.age-gate-overlay.hidden {
    display: none;
}

.age-gate-content {
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    /* Prevent overflow on small screens */
    overflow-y: auto;
    /* Enable internal scrolling */
    background: rgba(17, 17, 17, 0.85);
    /* v5.7.5: Opacity as requested */
    backdrop-filter: blur(10px);
    padding: 25px;
    /* Reduced padding for mobile */
    border-radius: 20px;
    border: 1px solid rgba(255, 140, 0, 0.3);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 140, 0, 0.1);
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #ff8c00 #111;
    /* Firefox */
}

/* Webkit Scrollbar for Age Gate */
.age-gate-content::-webkit-scrollbar {
    width: 6px;
}

.age-gate-content::-webkit-scrollbar-track {
    background: #111;
}

.age-gate-content::-webkit-scrollbar-thumb {
    background-color: #ff8c00;
    border-radius: 10px;
}

.age-gate-logo {
    font-family: 'Nunito', sans-serif;
    font-size: 2.5rem;
    font-weight: 1000;
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.age-gate-content h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #fff;
}

.age-gate-content p {
    font-size: 15px;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 10px;
}

.age-gate-question {
    font-size: 18px !important;
    font-weight: 700;
    color: #fff !important;
    margin: 20px 0 !important;
}

.age-gate-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.age-gate-btn {
    padding: 15px;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
}

.age-gate-btn.yes {
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    color: #fff;
}

.age-gate-btn.no {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

.age-gate-btn:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.privacy-disclaimer {
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
}

.privacy-disclaimer p {
    font-size: 12px;
    margin-bottom: 8px;
    color: #eee;
}

.privacy-disclaimer ul {
    list-style: none;
    padding: 0;
}

.privacy-disclaimer li {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
}

.privacy-disclaimer li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ff8c00;
}

/* --- iOS Auto-Zoom Fix --- */
@media screen and (max-width: 768px) {

    input,
    textarea,
    /* Prevención Zoom iOS en inputs/selects */
    input,
    select,
    textarea,
    .galleries-input,
    .paywall-input {
        font-size: 16px !important;
    }

    /* Age Gate Mobile Refinements */
    .age-gate-logo {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .age-gate-content {
        padding: 20px;
        width: 90%;
        /* v5.7.5: Exact 90% */
        margin: 0 auto;
    }

    .age-gate-overlay {
        padding: 0;
        /* v5.7.5: Remove padding to allow 90% math to work simply */
    }

    .age-gate-content h2 {
        font-size: 18px;
    }

    .age-gate-content p {
        font-size: 14px;
    }

    .age-gate-question {
        font-size: 16px !important;
        margin: 15px 0 !important;
    }

    .age-gate-btn {
        padding: 12px;
        font-size: 14px;
    }

    /* =========================================
       Mobile In-Page Takeover modifications
       ========================================= */

    /* Hide everything except the video modal */
    body.mobile-takeover-active .app-header,
    body.mobile-takeover-active .columns-container,
    body.mobile-takeover-active .upload-btn,
    body.mobile-takeover-active footer,
    body.mobile-takeover-active #authModal,
    body.mobile-takeover-active #uploadModal,
    body.mobile-takeover-active #profileModal,
    body.mobile-takeover-active .splash-container,
    body.mobile-takeover-active #commentsPanel,
    body.mobile-takeover-active #ageGate,
    body.mobile-takeover-active #desktopZoomModal,
    body.mobile-takeover-active #searchOverlay {
        display: none !important;
    }

    /* Modal: absolute at document top — anchored to top AND scrollable */
    body.mobile-takeover-active .modal-fullscreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        /* v6.7: Normalizado a 100dvh — sin desbordamiento */
        min-height: 100vh !important;
        z-index: 99999 !important;
        background-color: #000 !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        /* v6.7: Centrado vertical para experiencia estándar */
        justify-content: center !important;
        touch-action: none !important;
        /* v6.7: Bloquear scroll táctil */
        overscroll-behavior: none !important;
    }

    body.mobile-takeover-active .video-container-fullscreen {
        position: relative !important;
        height: 100% !important;
        width: 100vw !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        /* v6.7: Centrado vertical del video */
        justify-content: center !important;
    }

    body.mobile-takeover-active .video-container-fullscreen video {
        object-fit: contain !important;
        /* v6.7: contain muestra el video completo sin recortar */
        width: 100% !important;
        height: 100% !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        /* v6.7: Sin escalado — video al 100% natural */
    }

    /* v5.8: Exception for landscape videos to prevent cropping */
    body.mobile-takeover-active .video-container-fullscreen video.is-landscape {
        object-fit: contain !important;
        transform: none !important;
    }

    body.mobile-takeover-active .close-video {
        position: fixed !important;
        top: calc(env(safe-area-inset-top, 0px) + 0px) !important;
        right: 0px !important;
        z-index: 100000 !important;
        background: rgba(255, 140, 0, 0.8) !important;
        border-radius: 50% !important;
        width: 60px !important;
        /* Gemelo del PLAY del feed */
        height: 60px !important;
        /* Gemelo del PLAY del feed */
        border: 1px solid rgba(255, 255, 255, 0.8) !important;
        /* Borde unificado de 1px */
        display: grid !important;
        place-items: center !important;
        padding: 0 !important;
        padding-bottom: 4px !important;
        /* Ajuste visual para subir la X un poco */
        font-size: 36px !important;
        /* X más grande e imponente */
        color: white !important;
        line-height: 1 !important;
        /* Volvemos a 1 para mejor control con padding */
    }
}

/* === Custom Video Controls (TikTok-style) === */
.custom-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.custom-video-controls.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Soporte para pantalla completa nativa del contenedor */
:fullscreen .custom-video-controls {
    bottom: 20px;
    /* Un poco de margen en pantalla completa */
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

/* Dark mode: when video background is bright/white */
.custom-video-controls.cvc-dark .cvc-btn,
.custom-video-controls.cvc-dark .cvc-time {
    color: rgba(0, 0, 0, 0.85);
}

.custom-video-controls.cvc-dark .cvc-progress-bar {
    background: rgba(0, 0, 0, 0.2);
}

.custom-video-controls.cvc-dark .cvc-progress-filled {
    background: #333;
}

.cvc-progress-wrap {
    width: 100%;
    padding: 8px 12px 0;
    cursor: pointer;
}

.cvc-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    transition: height 0.15s;
}

.cvc-progress-wrap:hover .cvc-progress-bar {
    height: 6px;
}

.cvc-progress-filled {
    height: 100%;
    background: #ff8c00;
    border-radius: 2px;
    width: 0%;
    transition: width 0.15s linear;
}

.cvc-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 10px;
}

.cvc-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    /* Aumentado de 4 a 8 para móviles */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.2s;
}

@media (max-width: 768px) {
    .cvc-btn {
        font-size: 20px;
        /* Iconos un poco más grandes en móvil */
        padding: 12px;
        /* Área de toque mucho mayor */
    }
}

.cvc-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.cvc-time {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    flex: 1;
    user-select: none;
}

.cvc-mute-btn {
    margin-left: auto;
}

/* Ensure controls container is relative for positioning */
.video-container-fullscreen,
.desktop-zoom-video-container {
    position: relative;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .custom-video-controls {
        bottom: 25px;
        /* v6.7: Ajustado para 100dvh (era 88px para 115vh) */
    }

    .cvc-bottom {
        padding: 6px 10px 14px;
    }

    .cvc-progress-wrap {
        padding: 8px 10px 0;
    }

    .cvc-btn {
        font-size: 18px;
        padding: 6px;
    }

    .cvc-time {
        font-size: 11px;
    }
}

/* --- Privacy & Visibility --- */
.privacy-settings-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.privacy-settings-title {
    font-size: 14px;
    font-weight: 700;
    color: #ff8c00;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-control-group {
    margin-bottom: 15px;
}

.privacy-toggle-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.privacy-toggle-label {
    font-size: 14px;
    color: #eee;
}

/* Custom Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #ff8c00;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.privacy-input-wrapper {
    margin-top: 10px;
}

.privacy-input-wrapper input {
    width: 100%;
    background: #222;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px 12px;
    color: white;
    font-size: 14px;
    outline: none;
}

.privacy-input-wrapper input:focus {
    border-color: #ff8c00;
}

/* Visibility Toggle on Profile Grid */
.visibility-toggle-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.visibility-toggle-btn:hover {
    background: rgba(255, 140, 0, 0.8);
    transform: scale(1.1);
}

.visibility-toggle-btn.hidden-mode {
    color: #ff4d4d;
    border-color: #ff4d4d;
}

.profile-video-item {
    position: relative;
}

.profile-video-item.video-hidden img,
.profile-video-item.video-hidden video {
    opacity: 0.5;
    filter: grayscale(0.8);
}

/* Profile Locked Overlay */
.profile-locked-container {
    padding: 50px 20px;
    text-align: center;
}

.locked-icon {
    font-size: 4rem;
    color: #ff8c00;
    margin-bottom: 20px;
    animation: lockShake 0.5s ease;
}

@keyframes lockShake {

    0%,
    100% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.profile-locked-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #fff;
}

.profile-locked-desc {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.access-key-form {
    max-width: 300px;
    margin: 0 auto;
}

.access-key-input-group {
    position: relative;
    margin-bottom: 20px;
}

.access-key-input-group input {
    width: 100%;
    background: #111;
    border: 2px solid #333;
    border-radius: 30px;
    padding: 14px 20px;
    color: white;
    font-size: 16px;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

.access-key-input-group input:focus {
    border-color: #ff8c00;
}

.unlock-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff8c00, #ffdb58);
    border: none;
    border-radius: 30px;
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.2s;
}

.unlock-btn:active {
    transform: scale(0.98);
}

/* Woowia Studio v1.2 - Global View Consistency */
#desktopZoomContainer,
#fullscreenVideoContainer {
    position: relative !important;
    overflow: hidden;
    background: #000;
}

#desktopZoomContainer video,
#fullscreenVideoContainer video {
    z-index: 1;
}

.studio-debug-badge {
    position: absolute;
    top: 35px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: #ff8c00;
    border: 1px solid #ff8c00;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 100;
    pointer-events: none;
}

/* Ensure Video is always below effects in the grid */
.video-card video {
    z-index: 1;
}

/* v.6.6.10: Forzar visibilidad cuando el menú de compartir está abierto */
.video-card.menu-open {
    z-index: 1000 !important;
    overflow: visible !important;
}

.video-card.menu-open .actions-container {
    z-index: 1001 !important;
}