/* ============================================================
   STAGE SYNC — REELS & VERTICAL MULTIMEDIA FEED (FASE 2)
   Estilos inspirados en TikTok / Reels para Músicos
   ============================================================ */

/* ─── Pestañas superiores de Comunidad ─── */
.community-view-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.75rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(18, 15, 29, 0.75);
    backdrop-filter: blur(16px);
}

.community-segmented-tabs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 3px;
    gap: 4px;
    margin: 0 auto;
}

.community-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.community-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.community-tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(139, 92, 246, 0.35));
    border-color: rgba(236, 72, 153, 0.45);
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.25);
}

.community-tab-btn.active i {
    color: #ec4899;
}

.btn-create-reel {
    margin-left: auto;
    background: linear-gradient(135deg, #ec4899, #8b5cf6) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.45rem 1rem !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
    cursor: pointer;
    transition: 0.2s;
}

.btn-create-reel:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

/* ─── Contenedor de Subvistas ─── */
.community-subview {
    display: none;
    width: 100%;
}

.community-subview.active {
    display: block;
}

/* ─── Viewport Vertical de Reels ─── */
.reels-viewport {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    height: calc(100vh - 200px);
    min-height: 520px;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    border-radius: 20px;
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
    position: relative;
}

/* Ocultar scrollbar pero mantener scroll */
.reels-viewport::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}
.reels-viewport {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ─── Cada tarjeta de Reel ─── */
.reel-item {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #050508;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-media-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    cursor: pointer;
}

.reel-image-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradiente inferior para legibilidad de textos */
.reel-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        transparent 35%,
        transparent 60%,
        rgba(0, 0, 0, 0.85) 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* Indicador de play/pausa flotante */
.reel-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    z-index: 8;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reel-play-indicator.visible {
    transform: translate(-50%, -50%) scale(1);
}

/* Botón flotante de Mute/Unmute superior */
.reel-sound-toggle-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 10;
    cursor: pointer;
    transition: 0.2s;
}

.reel-sound-toggle-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.8);
}

/* ─── Floating Action Sidebar (Derecha) ─── */
.reel-actions-sidebar {
    position: absolute;
    right: 12px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

/* Avatar del Creador */
.reel-creator-avatar-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 0.35rem;
}

.reel-creator-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #22d3ee;
    object-fit: cover;
    background: #1a1728;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.reel-creator-avatar.collab {
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.reel-follow-plus-btn {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #ec4899;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    border: 2px solid #000;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reel-follow-plus-btn:hover {
    transform: translateX(-50%) scale(1.18);
}

.reel-follow-plus-btn.following {
    background: #10b981;
}

/* Botones de Acción Circular */
.reel-action-btn {
    background: rgba(18, 18, 24, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reel-action-btn:hover {
    transform: scale(1.14);
    background: rgba(18, 18, 24, 0.85);
}

.reel-action-btn i {
    font-size: 1.15rem;
}

.reel-action-btn.liked {
    background: rgba(236, 72, 153, 0.2);
    border-color: rgba(236, 72, 153, 0.5);
}

.reel-action-btn.liked i {
    color: #ec4899;
    animation: heartBeat 0.35s ease-out;
}

.reel-action-count {
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 3px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* ─── Floating Info Overlay (Izquierda Inferior) ─── */
.reel-info-overlay {
    position: absolute;
    left: 16px;
    bottom: 24px;
    right: 76px;
    z-index: 10;
    text-align: left;
    color: #fff;
    pointer-events: none;
}

.reel-info-overlay * {
    pointer-events: auto;
}

.reel-author-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: color 0.15s;
    flex-wrap: wrap;
}

.reel-author-name {
    font-weight: 800;
    letter-spacing: -0.2px;
}

.reel-author-tag:hover .reel-author-name {
    color: #22d3ee;
}

.reel-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 800;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.reel-badge-pill.superadmin {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.reel-badge-pill.creator {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
}

.reel-badge-pill.director {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
}

.reel-badge-pill.artist {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.reel-caption-text {
    font-size: 0.88rem;
    line-height: 1.35;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    word-break: break-word;
}

.reel-music-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: #e2e8f0;
    margin-top: 8px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.45);
    padding: 3px 10px 3px 4px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 90%;
}

.reel-music-disc {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #120f1d;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.reel-music-disc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-music-disc.spinning {
    animation: spinDisc 4s linear infinite;
}

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

.reel-music-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.reel-music-meta i {
    animation: musicPulse 1.8s infinite ease-in-out;
}

/* ─── Animación de Doble Tap (Corazón) ─── */
@keyframes heartPulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    45% {
        transform: translate(-50%, -50%) scale(1.35);
        opacity: 1;
    }
    75% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 1; }
}

.reel-heart-anim {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 5rem;
    color: #ec4899;
    z-index: 25;
    pointer-events: none;
    animation: heartPulse 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    filter: drop-shadow(0 0 16px rgba(236, 72, 153, 0.8));
}

/* ─── Drawer de Comentarios Deslizable ─── */
.reels-comments-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.reels-comments-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.reels-comments-drawer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 480px;
    height: 70vh;
    max-height: 580px;
    background: #0f0d18;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px 20px 0 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.85);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.reels-comments-drawer.open {
    transform: translate(-50%, 0);
}

.reels-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reels-comments-title {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reels-comments-close {
    background: transparent;
    border: none;
    color: var(--text-muted, #94a3b8);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: 0.15s;
}

.reels-comments-close:hover {
    color: #fff;
}

.reels-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.reel-comment-item {
    display: flex;
    gap: 0.75rem;
    text-align: left;
}

.reel-comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #1e1a30;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.reel-comment-body {
    flex: 1;
}

.reel-comment-user {
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.reel-comment-text {
    font-size: 0.85rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 2px;
}

.reel-comment-meta {
    font-size: 0.7rem;
    color: var(--text-muted, #64748b);
    margin-top: 4px;
}

.reels-comments-form {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: rgba(18, 15, 29, 0.85);
}

.reels-comments-form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 0.55rem 1rem;
    color: #fff;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}

.reels-comments-form input:focus {
    border-color: #ec4899;
}

.reels-comment-send-btn {
    background: #ec4899;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.reels-comment-send-btn:hover {
    transform: scale(1.08);
    background: #f43f5e;
}

/* ─── Modal de Creación de Reel ─── */
.reel-dropzone {
    cursor: pointer;
}

/* ─── MODAL PERFIL DE CREADOR / CANAL (FASE 2 & FASE 3) ─── */
.profile-modal-dialog {
    max-width: 620px;
    width: 95%;
    max-height: 90vh;
    background: #120f1d;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
}

.profile-modal-banner {
    width: 100%;
    height: 135px;
    background: linear-gradient(135deg, #3b0764, #1e1b4b 60%, #0f172a);
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
}

.profile-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 10;
    transition: all 0.2s;
}

.profile-modal-close:hover {
    background: rgba(239, 68, 68, 0.85);
    transform: scale(1.05);
}

.profile-modal-scrollable {
    overflow-y: auto;
    flex: 1;
    padding: 0 1.25rem 1.5rem;
}

.profile-modal-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: -46px;
    margin-bottom: 0.75rem;
    position: relative;
}

.profile-avatar-large {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 4px solid #120f1d;
    background: #1f1b2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    object-fit: cover;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.profile-avatar-large.collab {
    border-color: #f59e0b;
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.5);
}

.profile-action-btn-main {
    padding: 0.55rem 1.35rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.profile-action-btn-main.follow {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
}

.profile-action-btn-main.following {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-action-btn-main.self {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-collab-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.profile-stats-grid {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    margin: 1rem 0;
}

.profile-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.profile-stat-number {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.profile-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.profile-tabs-bar {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1rem;
    gap: 1rem;
}

.profile-subtab {
    padding: 0.65rem 0.75rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted, #94a3b8);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s;
}

.profile-subtab.active {
    color: #fff;
    border-color: #ec4899;
}

.profile-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.profile-reel-card {
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s;
}

.profile-reel-card:hover {
    transform: scale(1.02);
}

.profile-reel-card video,
.profile-reel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-reel-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 0.5rem;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.35rem;
}

/* ─── Responsive para Móviles ─── */
@media (max-width: 768px) {
    .profile-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tab-label-extra {
        display: none !important;
    }

    .community-view-tabs {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        padding: 5px 8px;
        margin-bottom: 0.5rem;
        overflow-x: hidden;
        flex-wrap: nowrap;
        width: 100%;
        box-sizing: border-box;
        border-radius: 12px;
    }

    .community-view-tabs::-webkit-scrollbar {
        display: none;
    }

    .community-segmented-tabs {
        display: flex;
        flex: 1;
        min-width: 0;
        padding: 2px;
        gap: 3px;
        justify-content: space-between;
        margin: 0;
        background: rgba(0, 0, 0, 0.45);
        border-radius: 10px;
    }

    .community-tab-btn {
        flex: 1;
        min-width: 0;
        padding: 6px 4px;
        font-size: 0.72rem;
        justify-content: center;
        gap: 4px;
        white-space: nowrap;
        border-radius: 8px;
    }

    .community-tab-btn i {
        font-size: 0.78rem;
    }

    .btn-create-reel {
        flex-shrink: 0;
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
        margin-left: 4px;
        white-space: nowrap;
        border-radius: 9px !important;
    }

    .btn-create-reel span {
        display: inline !important;
    }

    .reels-viewport {
        max-width: 100%;
        border-radius: 16px;
        /* Viewport calculada para encajar entre tabs superiores y bottom nav inferior sin colisionar */
        height: calc(100dvh - 56px - 44px - 65px - 22px - env(safe-area-inset-bottom, 0px));
        min-height: 420px;
        box-shadow: none;
        margin-bottom: 0;
    }

    .reel-info-overlay {
        left: 12px;
        bottom: 18px;
        right: 68px;
        padding-right: 0;
    }

    .reel-author-tag {
        font-size: 0.92rem;
    }

    .reel-caption-text {
        font-size: 0.82rem;
        line-height: 1.3;
        margin-top: 4px;
        max-height: 60px;
        overflow-y: auto;
    }

    .reel-music-tag {
        font-size: 0.74rem;
        margin-top: 5px;
    }

    .reel-actions-sidebar {
        right: 8px;
        bottom: 24px;
        gap: 0.75rem;
    }

    .reel-creator-avatar-wrap {
        width: 42px;
        height: 42px;
    }

    .reel-action-btn {
        width: 38px;
        height: 38px;
    }

    .reel-action-btn i {
        font-size: 1rem;
    }

    .reel-action-count {
        font-size: 0.68rem;
    }

    .reels-comments-drawer {
        max-width: 100%;
        height: 75vh;
        border-radius: 20px 20px 0 0;
    }
}

/* ─── Sound Selector Modal & Creation UI ─── */
.reel-sound-picker-field {
    display: flex;
    flex-direction: column;
}

.reel-sound-selected-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.reel-sound-box-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1;
}

.reel-sound-box-disc {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.reel-sound-box-disc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-sound-box-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reel-sound-box-artist {
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-clear-sound {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #ef4444;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-clear-sound:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

.sound-filter-chip {
    padding: 0.35rem 0.8rem;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sound-filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sound-filter-chip.active {
    background: rgba(236, 72, 153, 0.2);
    border-color: #ec4899;
    color: #fff;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.25);
}

.sound-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: all 0.2s ease;
}

.sound-item-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
}

.sound-item-art {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: #1e1b2e;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sound-item-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.sound-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sound-item-sub {
    font-size: 0.73rem;
    color: var(--text-muted, #94a3b8);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 2px;
}

.sound-item-source-badge {
    font-size: 0.64rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    letter-spacing: 0.2px;
}

.sound-item-source-badge.itunes {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.sound-preview-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

.sound-preview-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.08);
}

.sound-preview-btn.playing {
    background: #ec4899;
    border-color: #ec4899;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.55);
}

.sound-select-btn {
    padding: 0.38rem 0.85rem;
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #fff;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

.sound-select-btn:hover {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
}

/* ─── Pestañas superiores: etiqueta extra en desktop ─── */
.tab-label-extra {
    display: inline;
}

/* ============================================================
   CREATOR STUDIO (FASE 3): MODAL 2 COLUMNAS ESTILO TIKTOK / REELS
   ============================================================ */

.creator-studio-badge-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(236, 72, 153, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Dropzone Inicial */
.creator-dropzone {
    width: 100%;
    height: 380px;
    border: 2px dashed rgba(236, 72, 153, 0.35);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(236, 72, 153, 0.03);
    cursor: pointer;
    transition: all 0.25s ease;
}

.creator-dropzone:hover {
    border-color: rgba(236, 72, 153, 0.7);
    background: rgba(236, 72, 153, 0.08);
    transform: scale(1.01);
}

.creator-dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    gap: 0.35rem;
}

.creator-dropzone-icon-pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(139, 92, 246, 0.25));
    border: 1px solid rgba(236, 72, 153, 0.4);
    color: #ec4899;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    animation: studioPulse 2s infinite ease-in-out;
}

@keyframes studioPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4); }
    50% { transform: scale(1.06); box-shadow: 0 0 20px 4px rgba(236, 72, 153, 0.25); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

.creator-dropzone-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.creator-dropzone-sub {
    color: var(--text-muted, #94a3b8);
    font-size: 0.74rem;
}

.creator-dropzone-tag {
    color: #a855f7;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 2px;
}

/* Phone Simulator Frame */
.phone-simulator-frame {
    width: 220px;
    aspect-ratio: 9 / 16;
    max-height: 430px;
    border-radius: 28px;
    border: 4px solid #2d2644;
    background: #000;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.phone-speaker-notch {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    z-index: 20;
}

.phone-screen-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #0b0914;
}

#reel-preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    background: #000;
}

.phone-mockup-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, transparent 20%, transparent 55%, rgba(0, 0, 0, 0.8) 100%);
}

.phone-preview-sound-btn {
    pointer-events: auto;
    align-self: flex-end;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: 0.2s;
}

.phone-preview-sound-btn:hover {
    background: rgba(236, 72, 153, 0.5);
    transform: scale(1.1);
}

.phone-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    pointer-events: none;
}

.phone-mockup-actions {
    position: absolute;
    right: 8px;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.phone-mockup-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ec4899;
    overflow: hidden;
    background: #231b38;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
    font-weight: 700;
}

.phone-mockup-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-mockup-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-size: 0.8rem;
    opacity: 0.9;
}

.phone-mockup-action-btn span {
    font-size: 0.58rem;
    font-weight: 700;
    margin-top: 1px;
}

.phone-mockup-info {
    position: absolute;
    left: 8px;
    bottom: 8px;
    right: 44px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.phone-mockup-author {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #fff;
}

.phone-mockup-caption {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.25;
    max-height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phone-mockup-caption .mockup-hashtag {
    color: #38bdf8;
    font-weight: 600;
}

.phone-mockup-music {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.64rem;
    color: #f472b6;
    font-weight: 600;
}

.phone-mockup-music .reel-music-disc {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1e1b2e;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    color: #ec4899;
}

.phone-mockup-music .reel-music-disc.spinning {
    animation: studioSpinDisc 4s linear infinite;
}

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

.btn-change-video-pill {
    pointer-events: auto;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(8px);
    z-index: 25;
    transition: 0.2s;
    white-space: nowrap;
}

.btn-change-video-pill:hover {
    background: rgba(236, 72, 153, 0.7);
    border-color: #ec4899;
}

/* Columna Derecha Controles */
.studio-section-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 0.85rem 1rem;
}

.studio-section-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-studio-action {
    background: rgba(236, 72, 153, 0.12);
    border: 1px solid rgba(236, 72, 153, 0.25);
    color: #f472b6;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-studio-action:hover {
    background: rgba(236, 72, 153, 0.25);
    color: #fff;
}

.studio-sound-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    padding: 0.55rem 0.85rem;
}

.studio-sound-cover {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ec4899;
    font-size: 1.15rem;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-sound-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.studio-sound-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.studio-sound-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studio-sound-artist {
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studio-sound-badge {
    font-size: 0.62rem;
    color: #22d3ee;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 1px;
}

.btn-studio-remove-sound {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #94a3b8;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: 0.2s;
}

.btn-studio-remove-sound:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.studio-audio-mixer-row {
    display: flex;
    gap: 1.25rem;
}

.studio-slider-group {
    flex: 1;
}

.studio-range-slider {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.studio-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ec4899;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.8);
}

.studio-textarea-wrapper textarea {
    width: 100%;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.7rem 0.85rem;
    font-size: 0.86rem;
    resize: none;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.studio-textarea-wrapper textarea:focus {
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.2);
}

.studio-emoji-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.88rem;
    padding: 3px 7px;
    cursor: pointer;
    transition: 0.15s;
}

.studio-emoji-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.12);
}

.studio-hashtags-strip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.studio-hashtag-pill {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.15s;
}

.studio-hashtag-pill:hover {
    background: rgba(56, 189, 248, 0.22);
    color: #fff;
    border-color: #38bdf8;
}

.studio-role-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.studio-role-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted, #94a3b8);
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.studio-role-chip:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.studio-role-chip.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
    border-color: rgba(168, 85, 247, 0.6);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.25);
}

.studio-visibility-row {
    display: flex;
    gap: 0.85rem;
}

.studio-vis-radio {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}

.studio-vis-radio.active {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.55);
    box-shadow: 0 2px 12px rgba(168, 85, 247, 0.2);
}

.studio-vis-title {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.studio-vis-sub {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 2px;
}

.studio-upload-progress {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(236, 72, 153, 0.35);
    border-radius: 11px;
    padding: 0.65rem 0.95rem;
}

.studio-progress-track {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.studio-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ec4899, #8b5cf6, #38bdf8);
    transition: width 0.2s ease;
}

/* Responsive Móvil para Creator Studio */
@media (max-width: 768px) {
    .creator-studio-dialog {
        max-height: 94vh !important;
        width: 96% !important;
        margin: auto !important;
    }

    #create-reel-form {
        flex-direction: column !important;
        overflow-y: auto !important;
    }

    .creator-studio-preview-col {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 0.75rem !important;
        max-height: 240px !important;
    }

    .creator-dropzone {
        height: 180px !important;
        border-radius: 16px !important;
    }

    .phone-simulator-frame {
        max-height: 210px !important;
        width: 120px !important;
        border-width: 3px !important;
        border-radius: 18px !important;
    }

    .creator-studio-controls-col {
        padding: 0.85rem !important;
        overflow-y: visible !important;
    }

    .studio-audio-mixer-row {
        flex-direction: column !important;
        gap: 0.65rem !important;
    }

    .studio-visibility-row {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
}
