/* Responsive Design - Enhanced Mobile First */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .movie-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .container {
        max-width: 1600px;
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .movie-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Tablet Landscape (992px - 1199px) */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .ott-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding: 0 25px;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(15, 15, 15, 0.98);
        flex-direction: column;
        padding: 30px;
        gap: 10px;
        transition: left 0.3s;
        backdrop-filter: blur(10px);
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 15px 20px;
        font-size: 1.1rem;
        justify-content: flex-start;
    }
    
    .mobile-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
    }
    
    .search-box input {
        width: 180px;
    }
    
    .search-box input:focus {
        width: 200px;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 70vh !important;
        padding: 60px 0 !important;
    }
    
    .hero-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 25px !important;
    }
    
    .hero-poster {
        width: 250px !important;
        height: 375px !important;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
    }
    
    .hero-buttons {
        justify-content: center !important;
        flex-wrap: wrap;
    }
    
    /* Sections */
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .genre-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Container */
    .container {
        padding: 0 20px;
    }
}

/* Mobile (576px - 767px) */
@media (max-width: 767px) {
    /* Navigation */
    .navbar {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .search-box {
        display: none;
    }
    
    .mobile-toggle {
        font-size: 1.3rem;
        padding: 8px;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 100vh !important;
        margin-top: 60px !important;
        padding: 40px 0 !important;
    }
    
    .hero-slide {
        min-height: 100vh !important;
        padding: 40px 0 !important;
    }
    
    .hero-content {
        padding: 20px !important;
        gap: 20px !important;
    }
    
    .hero-poster-container {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .hero-poster {
        width: 220px !important;
        height: 330px !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
    }
    
    .hero-info {
        width: 100%;
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 15px !important;
    }
    
    .hero-meta {
        flex-direction: row !important;
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 10px !important;
    }
    
    .meta-badge {
        font-size: 0.85rem !important;
        padding: 6px 12px !important;
    }
    
    .hero-description {
        font-size: 0.95rem !important;
        line-height: 1.5;
        margin-bottom: 20px !important;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .hero-buttons {
        flex-direction: row !important;
        gap: 10px;
        width: 100%;
    }
    
    .hero-nav-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }
    
    .hero-nav {
        padding: 0 10px !important;
    }
    
    .dot {
        height: 10px !important;
        width: 10px !important;
        margin: 0 4px !important;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        flex: 1;
        justify-content: center;
        min-width: auto;
    }
    
    .btn i {
        font-size: 0.9rem;
    }
    
    /* Sections */
    .section {
        padding: 40px 0;
    }
    
    .section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .view-all-link {
        font-size: 0.9rem;
    }
    
    /* Movie Grid */
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .movie-card {
        border-radius: 12px;
    }
    
    .movie-poster {
        height: 280px;
    }
    
    .movie-info {
        padding: 12px;
    }
    
    .movie-title {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .movie-meta {
        font-size: 0.8rem;
        gap: 8px;
    }
    
    .movie-actions {
        gap: 8px;
    }
    
    .movie-actions .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    /* OTT Platform Grid */
    .ott-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ott-card {
        padding: 25px 20px;
    }
    
    .ott-logo {
        height: 80px !important;
        min-height: 80px !important;
    }
    
    /* Genre Grid */
    .genre-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .genre-card {
        padding: 30px 20px;
    }
    
    /* Stats Section */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
}

/* Small Mobile (375px - 575px) */
@media (max-width: 575px) {
    /* Container */
    .container {
        padding: 0 12px;
    }
    
    /* Navigation */
    .navbar {
        padding: 10px 0;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .logo i {
        font-size: 1.3rem;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 100vh !important;
    }
    
    .hero-poster {
        width: 180px !important;
        height: 270px !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
        margin-bottom: 12px !important;
    }
    
    .hero-meta {
        gap: 8px !important;
    }
    
    .meta-badge {
        font-size: 0.75rem !important;
        padding: 5px 10px !important;
    }
    
    .hero-description {
        font-size: 0.9rem !important;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .hero-nav-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 0.9rem !important;
    }
    
    /* Sections */
    .section {
        padding: 35px 0;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .view-all-link {
        font-size: 0.85rem;
    }
    
    /* Movie Grid */
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .movie-card {
        border-radius: 10px;
    }
    
    .movie-poster {
        height: 240px;
        border-radius: 10px 10px 0 0;
    }
    
    .movie-info {
        padding: 10px;
    }
    
    .movie-title {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .movie-meta {
        font-size: 0.75rem;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .movie-rating {
        font-size: 0.8rem;
    }
    
    .movie-actions {
        margin-top: 8px;
        gap: 6px;
    }
    
    .movie-actions .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    /* OTT Cards */
    .ott-card {
        padding: 20px 15px;
    }
    
    .ott-logo {
        height: 70px !important;
        min-height: 70px !important;
    }
    
    .ott-name {
        font-size: 1.1rem;
    }
    
    .ott-count {
        font-size: 0.85rem;
    }
    
    /* Genre Cards */
    .genre-card {
        padding: 25px 15px;
    }
    
    .genre-icon {
        font-size: 2rem;
    }
    
    .genre-name {
        font-size: 1.1rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-section {
        margin-bottom: 25px;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .footer-links li {
        margin-bottom: 8px;
    }
    
    .footer-links a {
        font-size: 0.9rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .footer-bottom {
        padding-top: 20px;
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile (< 375px) */
@media (max-width: 374px) {
    /* Container */
    .container {
        padding: 0 10px;
    }
    
    /* Hero Section */
    .hero-poster {
        width: 160px !important;
        height: 240px !important;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .hero-meta {
        flex-direction: column !important;
        align-items: center;
    }
    
    .meta-badge {
        font-size: 0.7rem !important;
        width: 100%;
        text-align: center;
    }
    
    .hero-description {
        font-size: 0.85rem !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 0.85rem;
    }
    
    /* Movie Grid */
    .movie-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .movie-poster {
        height: 350px;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.2rem;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh !important;
        height: auto !important;
    }
    
    .hero-slide {
        min-height: 100vh !important;
    }
    
    .hero-content {
        flex-direction: row !important;
        padding: 30px 10px !important;
        gap: 20px !important;
    }
    
    .hero-poster {
        width: 150px !important;
        height: 225px !important;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
    }
    
    .hero-description {
        display: none !important;
    }
    
    .hero-meta {
        margin-bottom: 15px !important;
    }
    
    .hero-buttons {
        flex-direction: row !important;
        gap: 10px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .section {
        padding: 30px 0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
    }
    
    .movie-card {
        cursor: pointer;
    }
    
    /* Remove hover effects on touch devices */
    .movie-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Add active states instead */
    .btn:active {
        transform: scale(0.95);
    }
    
    .movie-card:active {
        transform: scale(0.98);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .hero-buttons,
    .hero-nav,
    .hero-dots,
    .mobile-toggle,
    .btn {
        display: none !important;
    }
    
    .hero-section {
        height: auto !important;
        min-height: auto !important;
        margin-top: 0 !important;
        page-break-after: always;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero-content {
        flex-direction: row !important;
    }
    
    .movie-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}


/* Print Styles */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .hero-buttons,
    .btn {
        display: none;
    }
    
    .hero-section {
        height: auto;
        margin-top: 0;
    }
    
    body {
        background: white;
        color: black;
    }
}
