/* ========================================
   MOBILE RESPONSIVE STYLES
   Enhanced support for low-resolution mobile devices
   ======================================== */

/* === Small Mobile Devices (320px - 480px) === */
@media (max-width: 480px) {
    /* Base adjustments */
    html {
        font-size: 14px;
    }
    
    body {
        overflow-x: hidden;
    }
    
    /* Navbar */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-container {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .navbar-right {
        gap: 0.3rem;
    }
    
    .search-container {
        display: none; /* Hide on very small screens */
    }
    
    .btn-icon {
        width: 36px;
        height: 36px;
        padding: 0.4rem;
    }
    
    .btn-icon svg {
        width: 18px;
        height: 18px;
    }
    
    /* Hero section */
    .hero {
        height: 50vh;
        min-height: 300px;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .hero-tags {
        flex-wrap: wrap;
        gap: 0.3rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        max-width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        justify-content: center;
    }
    
    /* Content sections */
    .content-section {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    /* Cards grid */
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .series-card {
        border-radius: 8px;
    }
    
    .series-card-title {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .series-card-meta {
        font-size: 0.7rem;
        padding: 0 0.5rem 0.5rem;
        gap: 0.3rem;
    }
    
    .series-card-meta svg {
        width: 12px;
        height: 12px;
    }
    
    /* Episode cards */
    .episode-card {
        flex-direction: column;
        padding: 1rem;
        gap: 0.8rem;
    }
    
    .episode-number {
        position: static;
        width: 100%;
        height: auto;
        font-size: 1.5rem;
        padding: 0.5rem;
        text-align: center;
        background: linear-gradient(135deg, var(--accent-teal), var(--accent-violet));
        border-radius: 8px;
    }
    
    .episode-info {
        padding: 0;
    }
    
    .episode-title {
        font-size: 1rem;
    }
    
    .episode-meta {
        font-size: 0.75rem;
    }
    
    .episode-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .episode-play-btn {
        width: 100%;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Watch page */
    .watch-container {
        padding: 1rem;
    }
    
    .video-player-wrapper {
        border-radius: 8px;
        margin-bottom: 1rem;
    }
    
    .watch-info {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .watch-title {
        font-size: 1.3rem;
    }
    
    .watch-meta {
        font-size: 0.8rem;
    }
    
    .watch-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .like-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .like-icon {
        width: 18px;
        height: 18px;
    }
    
    /* Video controls */
    .custom-controls {
        padding: 1rem;
    }
    
    .controls-bottom {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .controls-left,
    .controls-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        padding: 0.4rem;
    }
    
    .control-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .time-display {
        font-size: 0.8rem;
    }
    
    .volume-slider {
        display: none; /* Hide on mobile */
    }
    
    .progress-bar {
        height: 8px;
        margin-bottom: 0.8rem;
    }
    
    .progress-handle {
        width: 16px;
        height: 16px;
    }
    
    /* Footer */
    .footer {
        padding: 1.5rem 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .footer-text {
        font-size: 0.8rem;
    }
}

/* === Extra Small Mobile Devices (< 360px) === */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .hero-title {
        font-size: 1.3rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .episode-card {
        padding: 0.8rem;
    }
    
    .watch-title {
        font-size: 1.1rem;
    }
}

/* === Landscape orientation on mobile === */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 80vh;
    }
    
    .video-player-wrapper {
        max-height: 90vh;
    }
    
    .custom-controls {
        padding: 0.5rem 1rem;
    }
    
    .controls-bottom {
        flex-direction: row;
    }
}

/* === Touch-friendly adjustments === */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets */
    .btn,
    .control-btn,
    .episode-play-btn,
    .like-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .series-card {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(139, 92, 246, 0.2);
    }
    
    /* Disable hover effects on touch devices */
    .series-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Show controls on touch */
    .custom-controls {
        opacity: 1;
    }
}
