/* Mobile Player - Design Profissional */

/* Esconde controles desktop em mobile */
@media (max-width: 768px) {
    
    /* Esconde controles desktop */
    .video-player .content {
        display: none !important;
    }
    
    /* Mostra controles mobile */
    .mobile-controls {
        display: flex !important;
    }
    
    /* Container de controles mobile */
    .mobile-controls {
        position: absolute;
        inset: 0;
        z-index: 30;
        display: none;
        flex-direction: column;
        justify-content: space-between;
        background: linear-gradient(
            to bottom,
            rgba(0,0,0,0.7) 0%,
            transparent 20%,
            transparent 80%,
            rgba(0,0,0,0.8) 100%
        );
        opacity: 1;
        transition: opacity 0.3s ease;
        pointer-events: auto;
    }
    
    .mobile-controls.hidden {
        opacity: 0;
        pointer-events: none;
    }
    
    /* Header Mobile */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        padding-top: calc(16px + env(safe-area-inset-top));
    }
    
    .mobile-title {
        flex: 1;
        text-align: center;
        font-size: 14px;
        font-weight: 600;
        color: white;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 10px;
    }
    
    .mobile-back-btn,
    .mobile-close-btn {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Centro - Controles principais */
    .mobile-center-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 60px;
        flex: 1;
    }
    
    /* Botões de skip */
    .mobile-skip-btn {
        width: 60px;
        height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: white;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-skip-btn i {
        font-size: 36px;
        opacity: 0.9;
    }
    
    .mobile-skip-btn span {
        font-size: 11px;
        margin-top: 4px;
        opacity: 0.7;
    }
    
    /* Botão Play/Pause central */
    .mobile-play-btn {
        width: 80px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.15);
        border: 3px solid rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        color: white;
        cursor: pointer;
        transition: transform 0.15s ease, background 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-play-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.25);
    }
    
    .mobile-play-btn i {
        font-size: 42px;
        margin-left: 4px;
    }
    
    .mobile-play-btn i.paused {
        margin-left: 0;
    }
    
    /* Footer Mobile */
    .mobile-footer {
        padding: 12px 20px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
    
    /* Progress bar mobile */
    .mobile-progress-container {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .mobile-time {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.8);
        min-width: 45px;
    }
    
    .mobile-time.current {
        text-align: right;
    }
    
    .mobile-time.duration {
        text-align: left;
    }
    
    .mobile-progress {
        flex: 1;
        height: 5px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
        overflow: visible;
        position: relative;
    }
    
    .mobile-progress-bar {
        height: 100%;
        background: #ef4444;
        border-radius: 3px;
        position: relative;
    }
    
    .mobile-progress-bar::after {
        content: '';
        position: absolute;
        right: -6px;
        top: 50%;
        transform: translateY(-50%);
        width: 14px;
        height: 14px;
        background: #ef4444;
        border-radius: 50%;
        box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
    }
    
    /* Botões inferiores */
    .mobile-bottom-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 20px;
    }
    
    .mobile-action-btn {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: white;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-action-btn i {
        font-size: 26px;
        opacity: 0.9;
    }
    
    .mobile-action-btn:active i {
        opacity: 1;
    }
    
    /* Double-tap zones */
    .tap-zone {
        position: absolute;
        top: 80px;
        bottom: 80px;
        width: 30%;
        z-index: 25;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .tap-zone.left {
        left: 0;
    }
    
    .tap-zone.right {
        right: 0;
    }
    
    .tap-feedback {
        width: 100px;
        height: 100px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transform: scale(0.5);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    
    .tap-feedback.show {
        opacity: 1;
        transform: scale(1);
    }
    
    .tap-feedback i {
        font-size: 36px;
        color: white;
    }
    
    .tap-feedback span {
        font-size: 12px;
        color: white;
        margin-top: 4px;
    }
    
    /* Loading state */
    .mobile-controls.loading .mobile-play-btn {
        display: none;
    }
    
    /* Episódios button */
    .mobile-episodes-btn {
        display: none;
    }
    
    .mobile-episodes-btn.has-episodes {
        display: flex;
    }
    
    /* Cast button connected state */
    .mobile-action-btn.casting i {
        color: #ef4444;
    }
    
    /* Próximo episódio mobile */
    #nextEpisodeBtnCorner {
        bottom: 80px !important;
        right: 10px !important;
        padding: 8px 16px !important;
        font-size: 14px !important;
    }
    
    #nextEpisodeBtnCorner svg {
        width: 18px !important;
        height: 18px !important;
        margin-right: 8px !important;
    }
}

/* Desktop - esconde controles mobile */
@media (min-width: 769px) {
    .mobile-controls {
        display: none !important;
    }
    
    .tap-zone {
        display: none !important;
    }
}
