@media (max-width: 1280px) {
    .watch-layout {
        grid-template-columns: 1fr 280px;
    }

    .profile-layout {
        grid-template-columns: 300px 1fr;
    }
}

@media (max-width: 1024px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .movie-detail__layout {
        grid-template-columns: 200px 1fr;
        gap: 2rem;
    }

    .watch-layout {
        grid-template-columns: 1fr;
    }

    .watch-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .hero-slide__title {
        font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
    }

    .hero-slide__desc {
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 768px) {
    :root {
        --header-h: 60px;
        --container-pad: 1rem;
    }

    .nav { display: none; }
    .header__menu-btn { display: flex; }
    .header__search-shortcut { display: none; }

    .hero {
        height: clamp(420px, 70vh, 560px);
    }

    .hero-slide__content {
        padding-bottom: 4rem;
    }

    .hero-slide__title {
        font-size: clamp(var(--text-2xl), 6vw, var(--text-4xl));
        max-width: 100%;
    }

    .hero-slide__desc {
        display: none;
    }

    .hero-slide__actions .btn--glass {
        display: none;
    }

    .hero__controls {
        bottom: 1rem;
    }

    .movie-detail__layout {
        grid-template-columns: 160px 1fr;
        gap: 1.25rem;
        margin-top: -60px;
    }

    .movie-detail__title {
        font-size: var(--text-2xl);
    }

    .movie-detail__meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .cast-card__photo-wrap {
        width: 60px;
        height: 60px;
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .profile-stats { justify-content: center; }

    .footer__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__links { justify-content: center; flex-wrap: wrap; }
    .footer__bottom { justify-content: center; }

    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 5rem;
    }

    .toast { max-width: 100%; }

    .bottom-nav { display: block; }

    .main { padding-bottom: 80px; }

    .section__title { font-size: var(--text-xl); }

    .slider__btn { display: none; }

    .watch-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        height: clamp(380px, 65vh, 500px);
    }

    .hero-slide__meta { gap: 0.5rem; }
    .hero-slide__genres { display: none; }

    .movie-detail__layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .movie-detail__poster {
        max-width: 180px;
        margin: 0 auto;
    }

    .movie-detail__body { padding-top: 0; }

    .movie-detail__backdrop { height: 280px; }

    .favorites-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }

    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    }

    .episodes__list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .header__logo-text { display: none; }

    .search-overlay {
        padding: calc(var(--header-h) + 0.75rem) 0.875rem 1.5rem;
    }

    .movie-detail__actions {
        flex-direction: column;
    }

    .movie-detail__actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .favorites-grid { grid-template-columns: repeat(2, 1fr); }
    .card__meta { padding: 0.5rem 0.625rem 0.625rem; }
}

@media (min-width: 1441px) {
    .hero-slide__content {
        left: 50%;
        transform: translateX(-50%);
        max-width: var(--container-max);
    }

    .card {
        flex: 0 0 200px;
    }
}

@media (min-width: 1920px) {
    :root {
        --container-pad: 4rem;
    }

    .hero {
        height: 840px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .card__fav-btn {
        opacity: 1;
        transform: translateY(0);
    }

    .card__overlay {
        opacity: 1;
        background: rgba(6, 6, 14, 0.35);
    }

    .slider__btn { display: none; }
}
