/* ========================================
   RESPONSIVE — NEXT Online Cinema
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
  .hero {
    height: 75vh;
    min-height: 500px;
  }

  .hero__title {
    font-size: clamp(2rem, 5vw, var(--font-size-5xl));
    max-width: 600px;
  }

  .hero__description {
    font-size: var(--font-size-base);
    max-width: 450px;
  }

  /* News */
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Feedback */
  .feedback__row {
    grid-template-columns: 1fr;
  }

  /* Community */
  .community__stats {
    gap: var(--space-2xl);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
}

/* Mobile large */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --space-4xl: 4rem;
    --space-5xl: 6rem;
  }

  .container,
  .footer__inner {
    padding: 0 var(--space-lg);
  }

  .section-title {
    font-size: var(--font-size-xl);
  }

  /* Mobile drawer */
  .mobile-drawer {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 999;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-base), opacity var(--transition-base);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-drawer.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
  }

  .mobile-drawer__inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: calc(var(--header-height) + var(--space-lg)) var(--space-xl) var(--space-xl);
  }

  .header__nav {
    display: none;
  }

  .header__toggle {
    display: flex;
  }

  .mobile-overlay {
    display: block;
  }

  .header__avatar {
    width: 32px;
    height: 32px;
  }

  .header__search {
    display: none;
  }

  .header__auth-link,
  .header__auth-register {
    display: none;
  }

  /* Mobile drawer: search */
  .mobile-drawer__search {
    margin-bottom: var(--space-xl);
  }

  .mobile-drawer__search-input-wrap {
    position: relative;
    width: 100%;
  }

  .mobile-drawer__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
  }

  .mobile-drawer__search-input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: 500;
    outline: none;
    transition: border-color var(--transition-fast);
  }

  .mobile-drawer__search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
  }

  .mobile-drawer__search-input:focus {
    border-color: var(--accent);
    background: rgba(229, 62, 62, 0.05);
  }

  .mobile-drawer__search-content {
    margin-top: var(--space-sm);
    width: 100%;
  }

  .mobile-drawer__search-content .search-section {
    margin-bottom: var(--space-md);
  }

  .mobile-drawer__search-content .search-section__title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
  }

  .mobile-drawer__search-content .search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .mobile-drawer__search-content .tag {
    height: 26px;
    padding: 0 10px;
    font-size: 9px;
    cursor: pointer;
    transition: all var(--transition-fast);
  }

  .mobile-drawer__search-content .tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
  }

  .mobile-drawer__search-content .search-result-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }

  .mobile-drawer__search-content .search-result-card:last-child {
    border-bottom: none;
  }

  .mobile-drawer__search-content .search-result-card__poster {
    width: 32px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-card);
  }

  .mobile-drawer__search-content .search-result-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-drawer__search-content .search-result-card__info {
    flex: 1;
    min-width: 0;
  }

  .mobile-drawer__search-content .search-result-card__title {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
  }

  .mobile-drawer__search-content .search-result-card__meta {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
  }

  .mobile-drawer__search-content .search-result-card__rating {
    color: var(--accent-gold);
    font-weight: 600;
  }

  .mobile-drawer__search-content .search__empty {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    padding: var(--space-md) 0;
    text-align: center;
  }

  /* Mobile drawer: nav links */
  .mobile-drawer__nav {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--space-xl);
  }

  .mobile-drawer__link {
    display: flex;
    align-items: center;
    padding: var(--space-md) 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: color var(--transition-fast);
  }

  .mobile-drawer__link.is-active {
    color: var(--text-primary);
  }

  .mobile-drawer__link:last-child {
    border-bottom: none;
  }

  /* Mobile drawer: footer */
  .mobile-drawer__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding-top: var(--space-lg);
    padding-bottom: var(--space-xl);
  }

  .mobile-drawer__auth {
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }

  .mobile-drawer__auth-link {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1;
    transition: color var(--transition-fast);
  }

  .mobile-drawer__auth-link:hover {
    color: var(--text-primary);
  }

  .mobile-drawer__auth-register {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    background: var(--accent);
    padding: 10px 22px;
    border-radius: 6px;
    line-height: 1;
    transition: background var(--transition-fast);
  }

  .mobile-drawer__auth-register:hover {
    background: var(--accent-hover);
  }

  .mobile-drawer__social {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }

  .mobile-drawer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-full);
    color: var(--text-muted);
    transition: color var(--transition-fast), background var(--transition-fast);
  }

  .mobile-drawer__social-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
  }

  .mobile-drawer__social-link svg {
    width: 18px;
    height: 18px;
  }

  /* Hero */
  .hero {
    height: 80vh;
    min-height: 480px;
    max-height: none;
  }

  .hero__content {
    margin-top: 0;
  }

  .hero__title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    max-width: 100%;
  }

  .hero__description {
    font-size: var(--font-size-sm);
    max-width: 100%;
    margin-bottom: var(--space-xl);
  }

  .hero__meta {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .hero__badge {
    padding: 6px 16px;
    height: 32px;
    font-size: 10px;
  }

  .btn {
    padding: 12px 24px;
    font-size: var(--font-size-sm);
  }

  /* Cards */
  .card {
    width: 170px;
  }

  .card__poster {
    border-radius: var(--border-radius-md);
    margin-bottom: var(--space-sm);
  }

  .continue-card {
    width: 170px;
  }

  .cards-section {
    padding: var(--space-3xl) 0;
  }

  .continue-section {
    padding: var(--space-2xl) 0;
  }

  /* News */
  .news-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Feedback */
  .feedback-section {
    padding: var(--space-3xl) 0;
  }

  .feedback__title {
    font-size: var(--font-size-2xl);
  }

  .feedback__subtitle {
    font-size: var(--font-size-sm);
  }

  /* Community */
  .community-section {
    padding: var(--space-4xl) 0;
  }

  .community__stats {
    flex-wrap: wrap;
    gap: var(--space-xl);
  }

  .community__stat-value {
    font-size: var(--font-size-xl);
  }

  .community__title {
    font-size: 1.75rem;
  }

  .community__text {
    font-size: var(--font-size-base);
  }

  /* Footer */
  .footer {
    padding: var(--space-3xl) 0 var(--space-lg);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

  .footer__bottom-links {
    justify-content: center;
  }
}

/* Mobile small */
@media (max-width: 480px) {
  :root {
    --header-height: 56px;
  }

  .container,
  .footer__inner {
    padding: 0 var(--space-md);
  }

  .hero {
    height: 85vh;
    min-height: 400px;
  }

  .hero__title {
    font-size: 1.5rem;
  }

  .hero__badge {
    font-size: 9px;
    padding: 4px 14px;
    height: 28px;
    margin-bottom: var(--space-lg);
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .card {
    width: 150px;
  }

  .continue-card {
    width: 150px;
  }

  .card__title {
    font-size: var(--font-size-xs);
  }

  .card__meta {
    font-size: 11px;
  }

  .section-header {
    margin-bottom: var(--space-lg);
  }

  .feedback__submit {
    width: 100%;
    justify-content: center;
  }

  .community__actions {
    flex-direction: column;
    width: 100%;
  }

  .community__btn {
    width: 100%;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer__bottom-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ============================================
   MOVIE PAGE RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .movie-hero {
    min-height: 70vh;
  }

  .movie-hero__poster {
    width: 220px;
    margin-bottom: -60px;
  }

  .movie-hero__inner {
    gap: var(--space-2xl);
    padding-bottom: var(--space-3xl);
  }

  .movie-hero__title {
    font-size: clamp(1.75rem, 3.5vw, var(--font-size-4xl));
  }

  .movie-info__grid {
    gap: var(--space-2xl);
  }

}

@media (max-width: 768px) {
  /* Movie Hero */
  .movie-hero {
    min-height: auto;
    padding-top: var(--header-height);
  }

  .movie-hero__inner {
    flex-direction: column;
    align-items: center;
    padding: var(--space-2xl) var(--space-xl) var(--space-2xl);
    gap: var(--space-lg);
  }

  .movie-hero__poster {
    width: 160px;
    margin-bottom: 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  }

  .movie-hero__content {
    text-align: center;
    padding-bottom: 0;
  }

  .movie-hero__badges {
    justify-content: center;
  }

  .movie-hero__meta {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .movie-hero__genres {
    justify-content: center;
  }

  .movie-hero__desc {
    max-width: 100%;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
  }

  .movie-hero__actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .movie-hero__title {
    font-size: clamp(1.5rem, 5vw, 1.75rem);
  }

  .movie-hero__original {
    font-size: var(--font-size-base);
  }

  .movie-hero__overlay {
    background: linear-gradient(180deg, rgba(8, 8, 12, 0.85) 0%, rgba(8, 8, 12, 0.6) 40%, rgba(8, 8, 12, 0.7) 70%, rgba(8, 8, 12, 0.95) 100%);
  }

  .movie-hero__overlay::after {
    height: 120px;
  }

  /* Movie Info */
  .movie-info__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .movie-info__row {
    gap: var(--space-lg);
  }

  /* Player */
  .player__play {
    width: 64px;
    height: 64px;
  }

  .player__play svg {
    width: 26px;
    height: 26px;
  }

  /* Comments */
  .comments__form {
    flex-direction: column;
  }

  .comments__avatar {
    display: none;
  }

  .comment {
    padding: var(--space-md) 0;
    gap: var(--space-sm);
  }

  .comment__avatar {
    width: 32px;
    height: 32px;
  }

  .comment--reply {
    margin-left: 32px;
  }

  .comment--reply .comment__avatar {
    width: 24px;
    height: 24px;
  }

  .comment__header {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .comment__text {
    font-size: var(--font-size-xs);
  }

  .comments__inner {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .movie-hero__inner {
    padding: var(--space-xl) var(--space-md) var(--space-xl);
    gap: var(--space-md);
  }

  .movie-hero__poster {
    width: 120px;
  }

  .movie-hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .movie-hero__title {
    font-size: 1.35rem;
  }

  .movie-hero__meta-item,
  .movie-hero__rating {
    font-size: var(--font-size-xs);
  }

  .movie-info__row {
    flex-direction: column;
    gap: var(--space-2xs);
  }

  .movie-info__label {
    min-width: auto;
  }

  .player__play {
    width: 56px;
    height: 56px;
  }

  .player__play svg {
    width: 22px;
    height: 22px;
  }

  .comment--reply {
    margin-left: 20px;
  }

  .comment__avatar {
    width: 28px;
    height: 28px;
  }

  .comment--reply .comment__avatar {
    width: 22px;
    height: 22px;
  }

  .comments__submit {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   SEARCH OVERLAY RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .search-overlay {
    padding: var(--space-4xl) var(--space-lg) var(--space-2xl);
  }

  .search-overlay__inner,
  .search-overlay__content {
    max-width: 100%;
  }

  .search-overlay__input {
    padding: 16px 50px 16px 18px;
    font-size: var(--font-size-lg);
  }

  .search-overlay__close {
    right: 18px;
    width: 36px;
    height: 36px;
  }

  .search-overlay__content {
    max-height: calc(100vh - 220px);
    margin-top: var(--space-xl);
  }

  .search-result-card__poster {
    width: 36px;
    height: 54px;
  }

  .search-result-card__title {
    font-size: var(--font-size-xs);
  }

  .search-result-card__meta {
    font-size: 11px;
  }

  .search-section {
    margin-bottom: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .search-overlay {
    padding: var(--space-3xl) var(--space-md) var(--space-2xl);
  }

  .search-overlay__input {
    padding: 14px 44px 14px 16px;
    font-size: var(--font-size-base);
  }

  .search-overlay__content {
    max-height: calc(100vh - 180px);
  }

  .search-result-card__poster {
    width: 32px;
    height: 48px;
  }
}
