:root {
    --bg-main: #f2f2f7; 
    --glass-bg: rgba(255, 255, 255, 0.75); 
    --glass-border: rgba(0, 0, 0, 0.05); 
    --glass-border-light: rgba(255, 255, 255, 0.5);
    
    --accent-color: #ffb340; 
    --accent-hover: #ff9f0a; 
    --accent-gradient: linear-gradient(135deg, #ffca66, #ff9f0a);
    
    --text-main: #1c1c1e; 
    --text-muted: #8e8e93; 
    
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 20px 40px rgba(255, 159, 10, 0.2);
    --bezier-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }

/* Đảm bảo body không bao giờ bị tràn ngang */
body { background-color: var(--bg-main); color: var(--text-main); overflow-x: hidden; position: relative; display: flex; flex-direction: column; min-height: 100vh; width: 100%; max-width: 100vw; }
body::before { content: ''; position: fixed; top: -20%; left: -10%; width: 70%; height: 70%; background: radial-gradient(circle, rgba(255, 179, 64, 0.15) 0%, transparent 60%); z-index: -1; pointer-events: none; }
body::after { content: ''; position: fixed; bottom: -20%; right: -10%; width: 70%; height: 70%; background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 60%); z-index: -1; pointer-events: none; }

header { position: fixed; top: 0; left: 0; width: 100%; height: 75px; background-color: var(--glass-bg); backdrop-filter: blur(25px) saturate(180%); -webkit-backdrop-filter: blur(25px) saturate(180%); display: flex; justify-content: space-between; align-items: center; padding: 0 24px; z-index: 1000; border-bottom: 1px solid var(--glass-border); box-shadow: var(--shadow-soft); }
.logo-container { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.logo-container img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 15px rgba(255, 179, 64, 0.4); transition: transform 0.4s var(--bezier-smooth); }
.logo-container:hover img { transform: scale(1.1) rotate(5deg); }
.logo-container h1 { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; background: var(--accent-gradient); -webkit-background-clip: text; color: transparent; white-space: nowrap; }
.right-actions { display: flex; align-items: center; gap: 25px; }
.action-icon { font-size: 22px; color: var(--text-main); cursor: pointer; transition: color 0.3s, transform 0.3s var(--bezier-smooth); }
.action-icon:hover { color: var(--accent-color); transform: scale(1.15); }

.side-menu { position: fixed; top: 0; right: -320px; width: 300px; height: 100vh; background-color: rgba(255,255,255,0.85); backdrop-filter: blur(30px) saturate(200%); border-left: 1px solid var(--glass-border); z-index: 1002; transition: right 0.5s var(--bezier-smooth); display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,0.05); }
.side-menu.active { right: 0; }
.side-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 24px; border-bottom: 1px solid var(--glass-border); }
.side-menu-header h2 { color: var(--text-main); font-size: 20px; font-weight: 700; }
.close-menu-icon { font-size: 24px; color: var(--text-muted); cursor: pointer; transition: 0.3s; }
.close-menu-icon:hover { color: var(--accent-color); transform: rotate(90deg); }
.side-menu-links { display: flex; flex-direction: column; padding: 15px; gap: 10px; }
.side-menu-links a { color: var(--text-main); text-decoration: none; padding: 16px 20px; font-size: 16px; font-weight: 600; border-radius: 16px; transition: all 0.3s ease; display: flex; align-items: center; }
.side-menu-links a:hover, .side-menu-links a.active-link { background: #fff; color: var(--accent-hover); box-shadow: var(--shadow-soft); transform: translateX(5px); }
.side-menu-links i { width: 35px; font-size: 20px; color: var(--text-muted); transition: 0.3s; }
.side-menu-links a:hover i, .side-menu-links a.active-link i { color: var(--accent-hover); }

.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: rgba(0, 0, 0, 0.4); backdrop-filter: blur(3px); z-index: 1001; opacity: 0; visibility: hidden; transition: all 0.4s ease; }
.overlay.active { opacity: 1; visibility: visible; }

.search-bar-container { position: fixed; top: 75px; left: 0; width: 100%; background-color: var(--glass-bg); backdrop-filter: blur(20px); padding: 15px 20px; display: none; justify-content: center; z-index: 999; border-bottom: 1px solid var(--glass-border); animation: slideDown 0.4s var(--bezier-smooth) forwards; }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.search-bar-container.active { display: flex; }
.search-wrapper { width: 100%; max-width: 800px; display: flex; background: #fff; border-radius: 20px; border: 1px solid var(--glass-border); overflow: hidden; box-shadow: var(--shadow-soft); }
.search-wrapper input { flex: 1; padding: 16px 24px; font-size: 16px; border: none; outline: none; background: transparent; color: var(--text-main); font-weight: 500; }
.search-wrapper input::placeholder { color: var(--text-muted); }
.search-wrapper button { padding: 0 30px; background: var(--accent-gradient); border: none; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.search-wrapper button:hover { opacity: 0.9; }

.chat-bubble { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: var(--accent-gradient); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: #fff; font-size: 26px; cursor: pointer; box-shadow: var(--shadow-hover); z-index: 990; transition: transform 0.4s var(--bezier-smooth); }
.chat-bubble:hover { transform: scale(1.15) translateY(-5px); }

.btn-primary { background: var(--accent-gradient); color: #fff; border: none; padding: 14px 35px; border-radius: 20px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.4s var(--bezier-smooth); box-shadow: 0 8px 20px rgba(255, 159, 10, 0.3); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-hover); }

main { margin-top: 100px; padding: 0 20px 40px 20px; display: flex; flex-direction: column; align-items: center; flex: 1; width: 100%; }
.tab-content { display: none; width: 100%; max-width: 1100px; flex-direction: column; gap: 20px; animation: fadeInScale 0.5s var(--bezier-smooth) forwards; }
.tab-content.active { display: flex; }
@keyframes fadeInScale { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.section-header { width: 100%; display: flex; align-items: center; margin-bottom: 15px; padding-left: 15px; border-left: 6px solid var(--accent-color); border-radius: 3px; }
.section-header h2 { font-size: 24px; color: var(--text-main); font-weight: 800; letter-spacing: 0.5px; }

.movie-grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 25px; width: 100%; }
.movie-card { width: 100%; background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(15px); border-radius: 24px; border: 1px solid var(--glass-border-light); display: flex; flex-direction: column; box-shadow: var(--shadow-soft); transition: all 0.4s var(--bezier-smooth); cursor: pointer; overflow: hidden; position: relative; }
.movie-card:hover { transform: translateY(-12px) scale(1.02); background: #fff; border-color: var(--accent-color); box-shadow: var(--shadow-hover); }
.highlight-card { animation: pulseBorder 1.5s infinite alternate; z-index: 10; }
@keyframes pulseBorder { 0% { box-shadow: 0 0 0 0 rgba(255, 159, 10, 0.4); } 100% { box-shadow: 0 0 0 15px rgba(255, 159, 10, 0); transform: scale(1.05); } }

.movie-thumbnail { width: 100%; aspect-ratio: 9 / 13; position: relative; overflow: hidden; border-radius: 24px 24px 0 0; }
.movie-thumbnail .bg-blur { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; transition: transform 0.6s var(--bezier-smooth); }
.movie-card:hover .bg-blur { transform: scale(1.12); } 
.movie-thumbnail .update-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; width: 85%; text-align: center; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); color: var(--accent-hover); padding: 10px; border-radius: 16px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow-soft); }
.badge-new { position: absolute; top: 12px; left: 12px; z-index: 3; background: var(--accent-gradient); color: white; font-size: 11px; font-weight: 800; padding: 6px 12px; border-radius: 12px; box-shadow: 0 4px 10px rgba(255, 159, 10, 0.4); text-transform: uppercase; letter-spacing: 1px; }
.movie-info { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: flex-start; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff); }
.movie-info h2 { font-size: 16px; font-weight: 700; color: var(--text-main); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }

/* =========================================
   CHI TIẾT PHIM (MOVIE DETAIL MODAL) - CHUẨN IOS
   ========================================= */
.movie-detail-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(20px); z-index: 10005; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.4s var(--bezier-smooth); padding: 20px; }
.movie-detail-modal.active { opacity: 1; visibility: visible; }
.movie-detail-box { position: relative; background: rgba(255, 255, 255, 0.9); border: 1px solid #fff; border-radius: 32px; width: 100%; max-width: 450px; padding: 40px 25px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,0.15); transform: translateY(50px) scale(0.9); transition: all 0.5s var(--bezier-smooth); overflow: hidden; }
.movie-detail-modal.active .movie-detail-box { transform: translateY(0) scale(1); }
.close-detail-btn { position: absolute; top: 20px; right: 20px; width: 35px; height: 35px; border-radius: 50%; background: var(--bg-main); border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; transition: 0.3s; z-index: 10; }
.close-detail-btn:hover { background: #fee2e2; color: #ef4444; transform: rotate(90deg); }
.detail-poster { width: 160px; aspect-ratio: 9 / 13; border-radius: 20px; margin-bottom: 25px; background-size: cover; background-position: center; box-shadow: 0 15px 35px rgba(0,0,0,0.2); }
.detail-title { color: var(--text-main); font-size: 24px; font-weight: 800; margin-bottom: 10px; line-height: 1.3; word-break: break-word; }
.detail-publisher { color: var(--text-muted); font-size: 15px; margin-bottom: 25px; font-weight: 500; }
.detail-publisher i { color: var(--accent-color); margin-right: 5px;}

/* TRÌNH PHÁT AUDIO */
.media-container { width: 100%; margin-top: 10px; }
.custom-audio-player { background: var(--bg-main); border-radius: 24px; padding: 20px; width: 100%; box-shadow: inset 0 2px 10px rgba(0,0,0,0.02); }
.progress-area { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.progress-area span { color: var(--text-muted); font-size: 13px; font-weight: 700; min-width: 45px; }
.progress-area input[type="range"] { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; background: rgba(0,0,0,0.08); border-radius: 5px; outline: none; cursor: pointer; accent-color: var(--accent-color); }
.progress-area input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent-color); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.controls-area { display: flex; justify-content: center; align-items: center; gap: 20px; }
.ctrl-btn { background: transparent; border: none; color: var(--text-main); font-size: 22px; cursor: pointer; transition: 0.3s; width: 45px; height: 45px; border-radius: 50%; }
.ctrl-btn:hover { background: rgba(0,0,0,0.05); color: var(--accent-hover); }
.text-btn { font-size: 16px; font-weight: 800; }
.play-pause-btn { width: 65px; height: 65px; border-radius: 50%; border: none; background: var(--accent-gradient); color: #fff; font-size: 24px; cursor: pointer; box-shadow: 0 8px 20px rgba(255, 159, 10, 0.3); transition: transform 0.2s; }
.play-pause-btn:hover { transform: scale(1.1); box-shadow: var(--shadow-hover); }

/* PHÂN TRANG */
.pagination-container { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 40px; margin-bottom: 20px; flex-wrap: wrap; width: 100%; }
.page-btn { min-width: 44px; height: 44px; border-radius: 14px; background: #fff; border: 1px solid var(--glass-border); color: var(--text-main); font-size: 17px; font-weight: 700; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.3s var(--bezier-smooth); box-shadow: var(--shadow-soft); padding: 0 10px; }
.page-btn:hover:not(.active):not(.dots):not(.disabled) { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.page-btn.active { background: var(--accent-gradient); color: #fff; border: none; box-shadow: 0 8px 20px rgba(255, 159, 10, 0.4); transform: scale(1.05); }
.page-btn.dots { background: transparent; border: none; box-shadow: none; font-size: 20px; color: var(--text-muted); cursor: default;}
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* TRUNG TÂM TRỢ GIÚP */
.contact-page-title { display: flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 800; color: var(--text-main); margin-bottom: 20px; border-left: 5px solid var(--accent-color); padding-left: 15px; width: 100%; max-width: 550px; margin-left: auto; margin-right: auto; }
.contact-container { width: 100%; max-width: 550px; margin: 0 auto; background: #fff; border-radius: 32px; padding: 35px; display: flex; flex-direction: column; gap: 20px; box-shadow: var(--shadow-soft); border: 1px solid var(--glass-border-light); overflow: hidden; }
.form-title { color: var(--text-main); font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.form-title i { color: var(--accent-color); font-size: 20px; }
.form-input { width: 100%; background: var(--bg-main); border: 1px solid transparent; border-radius: 16px; padding: 18px 20px; color: var(--text-main); font-size: 15px; font-weight: 500; outline: none; transition: 0.3s; }
.form-input:focus { background: #fff; border-color: var(--accent-color); box-shadow: 0 0 0 4px rgba(255, 179, 64, 0.1); }
.form-input::placeholder { color: var(--text-muted); }
.upload-btn { width: 100%; border: 2px dashed #007aff; border-radius: 16px; background: rgba(0, 122, 255, 0.05); color: #007aff; padding: 16px; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.upload-btn:hover { background: rgba(0, 122, 255, 0.1); }
.form-textarea { resize: vertical; min-height: 120px; }
.divider { width: 100%; height: 1px; background: var(--glass-border); margin: 10px 0; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.contact-card { padding: 25px 10px; border-radius: 20px; text-decoration: none; font-weight: 700; font-size: 15px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; transition: transform 0.4s var(--bezier-smooth); }
.contact-card:hover { transform: translateY(-5px) scale(1.02); }
.card-tele { background: linear-gradient(135deg, #e0f2fe, #bae6fd); color: #0284c7; }
.card-zalo { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8; }

/* =========================================
   HIỆU ỨNG LOADING MỚI ĐẸP MẮT (AVATAR XOAY)
   ========================================= */
.loader-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: rgba(255, 255, 255, 0.6); backdrop-filter: blur(15px); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.4s ease; }
.loader-overlay.active { opacity: 1; visibility: visible; }

.spinner-container { position: relative; width: 90px; height: 90px; display: flex; justify-content: center; align-items: center; }
.loader-avatar { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; z-index: 2; box-shadow: 0 0 20px rgba(255, 159, 10, 0.3); }
.spinner-ring { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; border: 4px solid transparent; border-top-color: var(--accent-color); border-right-color: rgba(255, 179, 64, 0.4); animation: spinLoader 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite; z-index: 1; }
.spinner-ring::before { content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; background: var(--accent-color); border-radius: 50%; box-shadow: 0 0 15px 5px rgba(255, 159, 10, 0.6); }

@keyframes spinLoader { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* MODAL THÔNG BÁO */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: rgba(0, 0, 0, 0.4); backdrop-filter: blur(10px); z-index: 10000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.4s var(--bezier-smooth); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-box { background: rgba(255, 255, 255, 0.95); border-radius: 32px; padding: 40px 30px; width: 90%; max-width: 400px; text-align: center; box-shadow: 0 25px 50px rgba(0,0,0,0.15); transform: translateY(40px) scale(0.9); transition: all 0.4s var(--bezier-smooth); }
.modal-overlay.active .modal-box { transform: translateY(0) scale(1); }
.modal-box h3 { color: var(--text-main); font-size: 22px; font-weight: 800; margin-bottom: 15px; }
.modal-box p { color: var(--text-muted); font-size: 16px; margin-bottom: 30px; line-height: 1.5; font-weight: 500;}

/* THÔNG BÁO TIẾN ĐỘ QUẢNG CÁO */
.ad-progress-toast { position: fixed; top: -100px; left: 50%; transform: translateX(-50%); background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); border: 2px solid var(--accent-color); border-radius: 30px; padding: 12px 25px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-hover); z-index: 10010; transition: top 0.5s var(--bezier-smooth); font-weight: 700; color: var(--text-main); font-size: 16px; }
.ad-progress-toast.active { top: 30px; }

/* =========================================
   FOOTER (ĐÃ SỬA LỖI TRÀN MÀN HÌNH)
   ========================================= */
footer { width: 100%; background: #fff; border-top: 1px solid var(--glass-border); padding: 50px 20px 20px 20px; color: var(--text-muted); margin-top: auto; overflow: hidden; }
.footer-content { width: 100%; max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-section { flex: 1; min-width: 250px; }
.footer-section.about h3 { color: var(--accent-color); font-size: 20px; margin-bottom: 20px; font-weight: 800; }
.footer-section.about p { font-size: 14px; line-height: 1.7; font-weight: 500; word-break: break-word; }
.footer-links-wrapper { display: flex; gap: 40px; flex: 1; min-width: 250px; flex-wrap: wrap; }
.footer-section.links { flex: 1; min-width: 150px; }
.footer-section.links h3 { color: var(--text-main); font-size: 16px; margin-bottom: 20px; font-weight: 800; }
.footer-section.links ul { list-style: none; }
.footer-section.links ul li { margin-bottom: 12px; }
.footer-section.links ul li a { color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: 0.3s; }
.footer-section.links ul li a:hover { color: var(--accent-hover); padding-left: 5px; }
.footer-bottom { width: 100%; max-width: 1100px; margin: 40px auto 0 auto; padding-top: 20px; border-top: 1px solid var(--glass-border); text-align: center; font-size: 14px; font-weight: 500;}

/* ĐÁP ỨNG DI ĐỘNG (RESPONSIVE) */
@media (max-width: 600px) {
    .movie-grid-container { grid-template-columns: repeat(2, 1fr); gap: 15px; } 
    .movie-info h2 { font-size: 14px; }
    
    .search-wrapper { flex-direction: column; background: transparent; border: none; box-shadow: none; gap: 10px;}
    .search-wrapper input { border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); }
    .search-wrapper button { border-radius: 16px; padding: 16px; }
    
    /* Bẻ gãy các cột Footer xếp dọc cho màn hình nhỏ */
    .footer-content { flex-direction: column; gap: 30px; }
    .footer-section { min-width: 100%; }
    .footer-links-wrapper { flex-direction: column; gap: 20px; min-width: 100%; }
    
    .contact-cards { grid-template-columns: 1fr; } 
    .controls-area { gap: 15px; }
    .play-pause-btn { width: 55px; height: 55px; font-size: 20px; }
}
