/* ============================================
   GSFilms - Responsive Styles
   ============================================ */

/* ===== TABLET LANDSCAPE (1024px) ===== */
@media (max-width: 1024px) {
    .navbar { padding: 0 24px; }
    .container, .container-wide { padding: 0 24px; }

    .hero { height: 80vh; min-height: 550px; padding-bottom: 80px; }
    .hero-title { font-size: 2.8rem; }
    .hero-description { font-size: 0.95rem; }

    .section-header { padding: 0 24px; }
    .content-row { padding: 0 24px; }
    .genre-pills { padding: 16px 24px; }
    .banner-slider { margin: 0 24px; }

    .detail-content { flex-direction: column; align-items: center; text-align: center; gap: 24px; }
    .detail-poster { flex: 0 0 240px; }
    .detail-info h1 { font-size: 2.2rem; }
    .detail-meta { justify-content: center; }
    .detail-genres { justify-content: center; }
    .detail-description { text-align: center; margin-left: auto; margin-right: auto; }
    .detail-actions { justify-content: center; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

    .admin-sidebar { width: 220px; }
    .admin-content { margin-left: 220px; padding: 24px; }

    .profile-select-page h1 { font-size: 1.6rem; }
}

/* ===== TABLET PORTRAIT (768px) ===== */
@media (max-width: 768px) {
    .navbar { padding: 0 16px; height: 56px; }
    .nav-links { display: none; }
    .nav-brand h1 { font-size: 1.3rem; }

    .container, .container-wide { padding: 0 16px; }

    /* Hero */
    .hero { height: 65vh; min-height: 400px; padding-bottom: 60px; }
    .hero-title { font-size: 2rem; line-height: 1.15; }
    .hero-meta { flex-wrap: wrap; gap: 8px; font-size: 0.85rem; }
    .hero-description { font-size: 0.9rem; -webkit-line-clamp: 2; margin-bottom: 20px; }
    .hero-actions { gap: 8px; }
    .hero-actions .btn-play { padding: 10px 22px; font-size: 0.9rem; }
    .hero-actions .btn-info { padding: 10px 18px; font-size: 0.9rem; }

    /* Sections */
    .section-header { padding: 0 16px; }
    .section-title { font-size: 1.1rem; }
    .content-row { padding: 0 16px; }
    .genre-pills { padding: 12px 16px; }
    .genre-pill { padding: 6px 16px; font-size: 0.8rem; }

    /* Movie cards */
    .movie-card { width: 150px; }
    .movie-card-title { font-size: 0.8rem; }
    .movie-card-meta { font-size: 0.7rem; }
    .slider-btn { width: 36px; height: 36px; font-size: 1rem; }
    .slider-btn.prev { left: 8px; }
    .slider-btn.next { right: 8px; }

    /* Banners */
    .banner-slider { margin: 0 16px; }
    .banner-slide img { height: 160px; }

    /* Detail */
    .detail-hero { height: 50vh; min-height: 400px; padding-bottom: 40px; }
    .detail-content { gap: 16px; }
    .detail-poster { flex: 0 0 180px; }
    .detail-info h1 { font-size: 1.6rem; }
    .detail-meta { gap: 10px; font-size: 0.85rem; }
    .detail-description { font-size: 0.9rem; -webkit-line-clamp: 4; }
    .detail-actions { flex-wrap: wrap; }
    .detail-actions .btn { font-size: 0.85rem; padding: 10px 18px; }

    /* Profiles */
    .profile-select-page { padding: 20px; }
    .profile-select-page h1 { font-size: 1.4rem; margin-bottom: 32px; }
    .profile-grid { gap: 20px; }
    .profile-card { width: 130px; }
    .profile-avatar { width: 120px; height: 120px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .site-footer { padding: 32px 16px 24px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

    /* CTA */
    .cta-card { padding: 40px 24px; }
    .cta-card h2 { font-size: 1.6rem; }

    /* Admin */
    .admin-sidebar { display: none; }
    .admin-content { margin-left: 0; padding: 16px; }
    .admin-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 10px 8px; }
    .form-row { grid-template-columns: 1fr; }
    .form-card { padding: 20px; }

    /* Account */
    .account-grid { grid-template-columns: 1fr; }

    /* Player */
    .player-top-bar { padding: 12px 16px; }
}

/* ===== MOBILE (480px) ===== */
@media (max-width: 480px) {
    .navbar { padding: 0 12px; height: 50px; }
    .nav-brand h1 { font-size: 1.1rem; }
    .nav-actions { gap: 8px; }

    .container, .container-wide { padding: 0 12px; }

    /* Hero */
    .hero { height: 55vh; min-height: 350px; padding-bottom: 40px; }
    .hero-title { font-size: 1.5rem; }
    .hero-tag { font-size: 0.65rem; padding: 3px 8px; }
    .hero-meta { gap: 6px; font-size: 0.8rem; }
    .hero-description { font-size: 0.85rem; -webkit-line-clamp: 2; margin-bottom: 16px; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn-play,
    .hero-actions .btn-info { width: 100%; justify-content: center; padding: 12px; font-size: 0.9rem; }

    /* Cards */
    .movie-card { width: 120px; }
    .movie-card-badge { font-size: 0.55rem; padding: 2px 5px; }
    .movie-card-overlay .play-btn { width: 30px; height: 30px; font-size: 0.7rem; }
    .movie-card-title { font-size: 0.75rem; }
    .movie-card-meta { font-size: 0.65rem; }
    .row-slider { gap: 6px; }

    /* Banners */
    .banner-slide img { height: 120px; }
    .banner-dot { width: 6px; height: 6px; }
    .banner-dot.active { width: 20px; }

    /* Sections */
    .section-header { padding: 0 12px; }
    .section-title { font-size: 1rem; }
    .content-row { padding: 0 12px; }
    .genre-pills { padding: 10px 12px; gap: 6px; }
    .genre-pill { padding: 5px 12px; font-size: 0.75rem; border-radius: 16px; }

    /* Detail */
    .detail-hero { height: 45vh; min-height: 320px; padding-bottom: 30px; }
    .detail-poster { flex: 0 0 140px; }
    .detail-poster img { border-radius: var(--radius); }
    .detail-info h1 { font-size: 1.3rem; margin-bottom: 8px; }
    .detail-meta { gap: 8px; font-size: 0.8rem; }
    .detail-genres { gap: 4px; }
    .genre-tag { font-size: 0.7rem; padding: 3px 8px; }
    .detail-description { font-size: 0.85rem; -webkit-line-clamp: 3; }
    .detail-actions { flex-direction: column; }
    .detail-actions .btn { width: 100%; justify-content: center; }

    /* Profiles */
    .profile-grid { gap: 12px; }
    .profile-card { width: 100px; }
    .profile-avatar { width: 90px; height: 90px; border-radius: var(--radius); }
    .profile-name { font-size: 0.8rem; }

    /* Buttons */
    .btn { padding: 8px 16px; font-size: 0.85rem; }
    .btn-lg { padding: 10px 24px; font-size: 0.9rem; }
    .btn-sm { padding: 5px 10px; font-size: 0.75rem; }

    /* Forms */
    .form-group input, .form-group select, .form-group textarea {
        padding: 10px 12px; font-size: 0.9rem;
    }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }

    /* Player */
    .ad-timer { font-size: 0.75rem; padding: 4px 10px; }
    .ad-label { font-size: 0.6rem; }

    /* CTA */
    .cta-card { padding: 32px 16px; }
    .cta-card h2 { font-size: 1.3rem; }
    .cta-card p { font-size: 0.9rem; }

    /* Empty state */
    .empty-state { padding: 40px 16px; }
    .empty-state-icon { font-size: 3rem; }
    .empty-state h3 { font-size: 1.1rem; }

    /* Slider buttons hidden on very small screens */
    .slider-btn { display: none; }

    /* Footer */
    .site-footer { padding: 24px 12px 16px; }
    .footer-brand h2 { font-size: 1.2rem; }
    .footer-col h3 { font-size: 0.75rem; }
    .footer-col a { font-size: 0.8rem; }
}

/* ===== EXTRA SMALL (360px) ===== */
@media (max-width: 360px) {
    .hero { height: 50vh; min-height: 300px; }
    .hero-title { font-size: 1.3rem; }
    .movie-card { width: 105px; }
    .detail-poster { flex: 0 0 120px; }
    .detail-info h1 { font-size: 1.15rem; }
    .profile-card { width: 85px; }
    .profile-avatar { width: 78px; height: 78px; }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { height: 100vh; min-height: auto; padding-bottom: 20px; }
    .hero-content { max-width: 50%; }
    .hero-title { font-size: 1.8rem; }
    .hero-description { display: none; }
    .detail-hero { height: 100vh; min-height: auto; }
    .detail-content { flex-direction: row; align-items: flex-start; }
    .detail-poster { flex: 0 0 160px; }
}

/* ===== TOUCH DEVICE HOVER FIX ===== */
@media (hover: none) {
    .movie-card:hover { transform: none; }
    .movie-card:hover .movie-card-overlay { opacity: 0; }
    .movie-card:active { transform: scale(1.03); }
    .movie-card:active .movie-card-overlay { opacity: 1; }

    .btn-accent:hover { transform: none; box-shadow: none; }
    .btn-accent:active { transform: scale(0.97); }

    .slider-btn { display: none; }
}

/* ===== SAFE AREA (Notch) ===== */
@supports (padding: max(0px)) {
    .navbar { padding-left: max(48px, env(safe-area-inset-left)); padding-right: max(48px, env(safe-area-inset-right)); }
    .site-footer { padding-left: max(48px, env(safe-area-inset-left)); padding-right: max(48px, env(safe-area-inset-right)); }
    .hero-content { padding-left: max(0px, env(safe-area-inset-left)); }

    @media (max-width: 768px) {
        .navbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
        .site-footer { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
    }
}

/* ===== PRINT ===== */
@media print {
    .navbar, .site-footer, .admin-sidebar, .slider-btn, .hero-actions { display: none !important; }
    .hero { height: auto; min-height: auto; padding: 20px; background: #fff !important; }
    .hero-title, .hero-description, .hero-meta { color: #000 !important; }
    body { background: #fff !important; color: #000 !important; }
}
