/* ==========================================================================
   MARCY KIDS - REELS CSS STYLE SHEET
   Estilos premium para el reproductor interactivo estilo TikTok
   ========================================================================== */

:root {
    --magic-red: #FF6B6B;
    --enchanted-teal: #4ECDC4;
    --accent-yellow: #FFE66D;
    --sky-blue: #4D96FF;
    --forest-green: #6BCB77;
    --royal-purple: #A29BFE;
    --dark: #2D3436;
    --light: #F9F9F9;
    --tiktok-black: #010101;
    --tiktok-red: #FE2C55;
    --tiktok-cyan: #25F4EE;
    --glass-white: rgba(255, 255, 255, 0.85);
    --soft-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    --phone-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    --font-hand: 'Patrick Hand', cursive;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.reels-page {
    font-family: var(--font-body);
    background: radial-gradient(circle at 10% 20%, rgba(255, 248, 245, 1) 0%, rgba(232, 247, 252, 1) 90%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    padding: 20px;
    position: relative;
}

/* Fondo Mágico de Burbujas */
.magic-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.magic-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: blobFloat 25s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--magic-red);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--sky-blue);
    bottom: -15%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: var(--accent-yellow);
    top: 40%;
    left: 70%;
    animation-delay: -10s;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(100px, 80px) scale(1.3) rotate(360deg); }
}

/* Cabecera / Botón de Regreso */
.reels-header {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    background: white;
    color: var(--dark);
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--soft-shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.back-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.2);
    color: var(--magic-red);
}

/* ==========================================================================
   CONTENEDOR DEL CELULAR (TIPO TIKTOK)
   ========================================================================== */
.phone-wrapper {
    position: relative;
    z-index: 5;
    margin: 40px auto;
    perspective: 1000px;
}

.phone-device {
    width: 390px;
    height: 780px;
    background: #1e1e1e;
    border: 12px solid #000;
    border-radius: 50px;
    box-shadow: var(--phone-shadow);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

/* Muesca (Notch) del Celular */
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 25px;
    background: #000;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    z-index: 100;
}

/* Brillo del cristal del celular */
.phone-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
    z-index: 99;
}

/* Pantalla del Reproductor */
.reel-screen {
    width: 100%;
    height: 100%;
    background: var(--tiktok-black);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   ESCENARIO DE LA ANIMACIÓN (EL "VIDEO" DEL REEL)
   ========================================================================== */
.video-stage {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #121212 0%, #1c1c1c 100%);
    transition: background 1.5s ease;
    user-select: none;
}

/* Fondo Dinámico del Video (Gradientes del Reel) */
.stage-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.95;
    transition: background 1.2s ease-in-out;
}

/* Fondos por escena */
.bg-scene-1 { background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%); }
.bg-scene-2 { background: linear-gradient(135deg, #4ECDC4 0%, #2D3436 100%); }
.bg-scene-3 { background: linear-gradient(135deg, #6BCB77 0%, #FFE66D 100%); }
.bg-scene-4 { background: linear-gradient(135deg, #4D96FF 0%, #A29BFE 100%); }
.bg-scene-5 { background: linear-gradient(135deg, #FF6B6B 0%, #A29BFE 100%); }

/* Partículas del escenario (Polvo de estrellas / burbujas) */
.stage-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    animation: particleUp 8s infinite linear;
}

@keyframes particleUp {
    0% { transform: translateY(110%) scale(0.5); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-10%) scale(1.2) translateX(40px); opacity: 0; }
}

/* Personajes en Escena */
.characters-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 3;
    pointer-events: none;
}

/* Tito la tortuga */
.tito-character {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 190px;
    height: auto;
    filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.25));
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom center;
    opacity: 0;
}

/* Animaciones específicas de Tito */
.tito-idle {
    animation: titoFloat 3s infinite ease-in-out;
}

.tito-walk {
    animation: titoWalk 1.5s infinite linear;
}

.tito-happy {
    animation: titoBounce 0.6s infinite alternate cubic-bezier(0.25, 0.8, 0.25, 1);
}

.tito-puzzled {
    animation: titoWobble 2s infinite ease-in-out;
}

@keyframes titoFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes titoWalk {
    0% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-48%) rotate(3deg) translateY(-4px); }
    50% { transform: translateX(-50%) rotate(0deg); }
    75% { transform: translateX(-52%) rotate(-3deg) translateY(-4px); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

@keyframes titoBounce {
    0% { transform: translateX(-50%) translateY(0) scaleY(1); }
    100% { transform: translateX(-50%) translateY(-25px) scaleY(0.95) scaleX(1.05); }
}

@keyframes titoWobble {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-52%) rotate(-5deg); }
    75% { transform: translateX(-48%) rotate(5deg); }
}

/* Elementos del Entorno (Naturaleza) */
.decor-element {
    position: absolute;
    z-index: 2;
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: scale(0);
}

.decor-element.active {
    opacity: 1;
    transform: scale(1);
}

.flower-left {
    bottom: 90px;
    left: 20px;
    font-size: 2.2rem;
    animation: spinSlow 12s infinite linear;
}

.flower-right {
    bottom: 100px;
    right: 25px;
    font-size: 2.5rem;
    animation: spinSlow 15s infinite linear reverse;
}

.plant-center {
    bottom: 95px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    font-size: 3.5rem;
    transform-origin: bottom center;
}

.plant-center.active {
    transform: translateX(-50%) scale(1);
    animation: sway 4s infinite ease-in-out;
}

.butterfly {
    top: 150px;
    font-size: 2rem;
    animation: flutter 4s infinite linear;
}

.butterfly-1 { left: 40px; }
.butterfly-2 { right: 40px; animation-delay: -2s; }

@keyframes spinSlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes sway {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(5deg); }
}

@keyframes flutter {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg) scaleX(0.8); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* ==========================================================================
   SUBTÍTULOS DINÁMICOS ESTILO TIKTOK
   ========================================================================== */
.subtitle-container {
    position: absolute;
    bottom: 230px;
    left: 20px;
    right: 20px;
    z-index: 4;
    text-align: center;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.tiktok-subtitle {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    line-height: 1.3;
    color: white;
    text-transform: uppercase;
    text-shadow: 
        3px 3px 0px #000,
        -3px -3px 0px #000,
        3px -3px 0px #000,
        -3px 3px 0px #000,
        0px 3px 0px #000,
        0px -3px 0px #000,
        3px 0px 0px #000,
        -3px 0px 0px #000,
        4px 4px 10px rgba(0,0,0,0.6);
    letter-spacing: 0.5px;
    word-wrap: break-word;
    max-width: 100%;
    animation: subtitlePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tiktok-subtitle span {
    display: inline-block;
    margin: 0 4px;
    transition: all 0.15s ease;
}

.tiktok-subtitle span.word-highlight {
    color: var(--accent-yellow);
    transform: scale(1.15) rotate(-2deg);
    text-shadow: 
        3px 3px 0px #000,
        -3px -3px 0px #000,
        3px -3px 0px #000,
        -3px 3px 0px #000,
        0px 3px 0px #000,
        0px -3px 0px #000,
        3px 0px 0px #000,
        -3px 0px 0px #000,
        0 0 15px rgba(255, 230, 109, 0.8);
}

@keyframes subtitlePop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   INFORMACIÓN DEL CREADOR (PARTE INFERIOR)
   ========================================================================== */
.video-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 70px 25px 15px; /* Dejar espacio para la barra lateral */
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
    color: white;
    z-index: 5;
    pointer-events: none;
}

.creator-info {
    pointer-events: auto;
}

.creator-handle {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.creator-handle i {
    color: var(--tiktok-cyan);
    font-size: 0.8rem;
}

.video-description {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 8px;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.video-tags {
    color: #4ECDC4;
    font-weight: 700;
}

.music-tag {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.85;
    width: 80%;
    white-space: nowrap;
    overflow: hidden;
}

.music-tag i {
    animation: pulse 1.5s infinite;
}

.music-text-scroll {
    display: inline-block;
    animation: scrollText 12s infinite linear;
}

@keyframes scrollText {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

/* ==========================================================================
   BARRA LATERAL DE ACCIONES (ESTILO TIKTOK)
   ========================================================================== */
.sidebar-actions {
    position: absolute;
    right: 8px;
    bottom: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.action-btn-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    cursor: pointer;
    position: relative;
}

/* Foto Perfil */
.action-profile {
    margin-bottom: 5px;
}

.profile-avatar-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid white;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.profile-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.follow-plus {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: var(--tiktok-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    border: 1px solid white;
    color: white;
    transition: all 0.2s ease;
}

.action-profile:hover .follow-plus {
    transform: translateX(-50%) scale(1.2);
    background: var(--enchanted-teal);
}

.action-profile.followed .follow-plus {
    transform: translateX(-50%) scale(0);
    opacity: 0;
}

/* Botones de acción ordinarios */
.action-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.action-btn-wrap:hover .action-icon {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.7);
}

.action-label {
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Efectos especiales para el Corazón (Me Gusta) */
.heart-active {
    color: var(--tiktok-red);
    animation: heartBeat 0.4s ease-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Disco de música giratorio */
.music-disc {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, #2d2d2d 30%, #000 70%);
    border: 8px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: spin 3s infinite linear;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    animation-play-state: paused; /* Se activa en reproducción */
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   CONTROLES DE REPRODUCCIÓN INTERACTIVOS
   ========================================================================== */
/* Botón Play/Pause Gigante en Pantalla */
.center-play-trigger {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8;
    cursor: pointer;
}

.center-play-icon {
    font-size: 4rem;
    color: white;
    opacity: 0;
    transform: scale(1.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 15px rgba(0,0,0,0.4));
    pointer-events: none;
}

.center-play-icon.visible {
    opacity: 0.8;
    transform: scale(1);
}

/* Barra de progreso inferior */
.progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
    cursor: pointer;
    transition: height 0.15s ease;
}

.progress-bar-container:hover {
    height: 8px;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--magic-red);
    position: relative;
    transition: width 0.1s linear;
}

.progress-handle {
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    transition: transform 0.15s ease;
}

.progress-bar-container:hover .progress-handle {
    transform: translateY(-50%) scale(1.2);
}

/* Indicador de Volumen / Voz */
.audio-status-indicator {
    position: absolute;
    top: 40px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 20;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.audio-status-indicator:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.05);
}

.audio-status-indicator i {
    font-size: 0.9rem;
    color: var(--accent-yellow);
}

/* ==========================================================================
   PANEL DE COMENTARIOS (SLIDE UP ESTILO TIKTOK)
   ========================================================================== */
.comments-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
}

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

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

.comments-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dark);
    text-align: center;
    width: 100%;
}

.comments-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.comments-close:hover {
    color: var(--dark);
}

/* Lista de Comentarios */
.comments-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.comment-item {
    display: flex;
    gap: 12px;
    animation: commentFadeIn 0.3s ease-out;
}

@keyframes commentFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.comment-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
}

.comment-user {
    font-weight: 700;
    font-size: 0.8rem;
    color: #666;
}

.comment-text {
    font-size: 0.85rem;
    color: var(--dark);
    line-height: 1.4;
}

.comment-meta {
    font-size: 0.75rem;
    color: #999;
    display: flex;
    gap: 12px;
    margin-top: 3px;
}

.comment-like-icon {
    margin-left: auto;
    color: #ccc;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-like-icon.active {
    color: var(--tiktok-red);
}

/* Formulario de comentarios */
.comment-input-area {
    padding: 12px 15px 25px; /* Padding extra abajo para móviles */
    border-top: 1px solid #EAEAEA;
    background: white;
    display: flex;
    gap: 10px;
    align-items: center;
}

.comment-form-input {
    flex-grow: 1;
    border: 1px solid #EAEAEA;
    border-radius: 20px;
    padding: 10px 15px;
    font-family: inherit;
    font-size: 0.85rem;
    background: #F5F5F5;
    transition: all 0.2s;
    color: var(--dark);
}

.comment-form-input:focus {
    outline: none;
    border-color: var(--sky-blue);
    background: white;
}

.comment-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--magic-red);
    border: none;
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.comment-send-btn:hover {
    background: var(--enchanted-teal);
    transform: scale(1.05);
}

.comment-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   PARTÍCULAS Y CORAZONES FLOTANTES AL HACER CLICK / TAP
   ========================================================================== */
.floating-heart {
    position: absolute;
    color: var(--tiktok-red);
    font-size: 5rem;
    pointer-events: none;
    z-index: 15;
    animation: heartFlyUp 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    filter: drop-shadow(0 5px 15px rgba(254, 44, 85, 0.4));
}

@keyframes heartFlyUp {
    0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); opacity: 0; }
    15% { transform: translate(-50%, -50%) scale(1.2) rotate(-15deg); opacity: 0.9; }
    30% { transform: translate(-50%, -50%) scale(1) rotate(10deg); opacity: 1; }
    100% { transform: translate(-50%, -150%) scale(0.6) rotate(-25deg); opacity: 0; }
}

/* Corazones pequeños del botón "like" */
.mini-heart {
    position: absolute;
    color: var(--tiktok-red);
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 12;
    animation: miniHeartExplode 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes miniHeartExplode {
    0% { transform: translate(0, 0) scale(0.5); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(1.2); opacity: 0; }
}

/* ==========================================================================
   MODAL DE COMPARTIR (MODERN & PREMIUM)
   ========================================================================== */
.share-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.share-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.share-modal-content {
    background: white;
    width: 320px;
    border-radius: 30px;
    padding: 25px;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.share-modal.open .share-modal-content {
    transform: scale(1);
}

.share-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 20px;
}

.share-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.share-opt-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    color: #555;
    transition: transform 0.2s;
}

.share-opt-btn:hover {
    transform: translateY(-4px);
}

.share-opt-btn span.icon-container {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.share-opt-btn.whatsapp span.icon-container { background: #25D366; }
.share-opt-btn.facebook span.icon-container { background: #1877F2; }
.share-opt-btn.copy span.icon-container { background: #6c757d; }

.share-close-btn {
    background: #F5F5F5;
    color: var(--dark);
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.share-close-btn:hover {
    background: #EAEAEA;
}

/* Alerta rápida flotante (Toast) */
.toast-alert {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-alert.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   ADAPTABILIDAD RESPONSIVE Y MÓVIL
   ========================================================================== */

/* En smartphones, queremos que el simulador ocupe el 100% de la pantalla,
   dando una experiencia exactamente igual a la de la app real de TikTok. */
@media (max-width: 480px) {
    body.reels-page {
        padding: 0;
        background: black;
    }
    
    .reels-header {
        top: 35px;
        left: 15px;
    }
    
    .back-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: 1px solid rgba(255,255,255,0.2);
        backdrop-filter: blur(8px);
    }
    
    .back-btn:hover {
        color: white;
        box-shadow: none;
        transform: none;
    }
    
    .phone-wrapper {
        margin: 0;
        width: 100vw;
        height: 100vh;
    }
    
    .phone-device {
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    
    .phone-notch {
        display: none; /* En vista web móvil pura no se necesita */
    }
    
    .tito-character {
        width: 170px;
        bottom: 110px;
    }
    
    .subtitle-container {
        bottom: 215px;
        left: 15px;
        right: 15px;
    }
    
    .tiktok-subtitle {
        font-size: 1.6rem;
    }
    
    .sidebar-actions {
        right: 12px;
        bottom: 100px;
    }
}
