/* ==========================================
   1. CẤU HÌNH GỐC (CƠ BẢN)
========================================== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    margin-bottom: 0;
    padding-top: 0; /* Đẩy nội dung xuống dưới navbar */
    font-family: 'Be Vietnam Pro', Arial, sans-serif;
    /* Flexbox layout */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8fafc;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

main {
    flex: 1;
}

/* Animations */
@keyframes czFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cz-animate-fade {
    animation: czFadeInUp 0.5s ease forwards;
}

/* ==========================================
   2. NAVBAR & HEADER
========================================== */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .navbar-brand img {
        height: 40px;
    }

    .navbar-brand i, .navbar-brand:hover, .nav-link:hover {
        color: #dc3545 !important;
    }

/* ==========================================
   3. NÚT BẤM (BUTTONS) & FORMS
========================================== */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.btn-primary {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border: none;
    transition: all 0.25s ease;
}

    .btn-primary:hover {
        background: linear-gradient(90deg, #1d4ed8, #2563eb);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(37,99,235,0.35);
    }

form.bg-white {
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
}

.flag-icon {
    font-size: 1.2rem;
}

/* ==========================================
   4. FOOTER
========================================== */
footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.footer-cinezone {
    background: linear-gradient(90deg, #CBE7E3, #3b82f6);
}

.footer-logo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
}

.footer-title {
    font-weight: 700;
    margin-bottom: 14px;
    font-size: 17px;
}

.footer-link {
    color: black;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: 0.3s;
}

    .footer-link:hover {
        color: #ffd54f;
        transform: translateX(3px);
    }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    text-align: center;
    font-size: 14px;
}
footer a {
    color: black !important;
    text-decoration: none;
}

footer a:hover {
    color: #ffd700 !important;
    text-decoration: underline;
}

footer .btn {
    border-radius: 8px;
    transition: all 0.3s ease;
}

    footer .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
    }

/* ==========================================
   5. POPUP QUẢNG CÁO & MODAL
========================================== */
.promo-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.promo-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 420px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: #ff3b3b;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

    .close-popup:hover {
        background: #c60000;
    }

.popup-btn {
    border-radius: 30px;
    transition: all 0.3s ease;
}

    .popup-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }

.modal.fade .modal-dialog {
    transform: scale(0.9);
    transition: all .3s ease;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* ==========================================
   6. NÚT CHAT BONG BÓNG & CHATBOX
========================================== */
#chat-toggle {
    background-color: #ace0f9;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

    #chat-toggle:hover {
        background-color: cornflowerblue;
        transform: scale(1.1) translateY(-3px);
    }

#chatbox {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 340px;
    height: 500px;
    background: #fff;
    border-radius: 20px;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 9999;
}

#chat-header {
    background: linear-gradient(135deg, #198754, #28a745);
    color: white;
    padding: 12px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

#chat-body {
    height: 380px;
    overflow-y: auto;
    padding: 12px;
    background: #f5f6f7;
}

.message {
    display: flex;
    margin-bottom: 10px;
}

    .message.bot {
        align-items: flex-start;
    }

    .message.user {
        justify-content: flex-end;
    }

.avatar {
    margin-right: 8px;
}

.bubble {
    padding: 10px 14px;
    border-radius: 16px;
    max-width: 70%;
    white-space: pre-line;
}

.bot .bubble {
    background: #e4e6eb;
}

.user .bubble {
    background: #198754;
    color: white;
}

#typing .bubble {
    font-style: italic;
    opacity: 0.7;
}

.chat-input {
    display: flex;
    border-top: 1px solid #ddd;
}

    .chat-input input {
        flex: 1;
        border: none;
        padding: 12px;
        outline: none;
    }

    .chat-input button {
        background: #198754;
        color: white;
        border: none;
        padding: 12px;
        cursor: pointer;
    }

.suggestions button {
    border: none;
    background: white;
    border-radius: 20px;
    padding: 6px 12px;
    margin: 3px;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
}

    .suggestions button:hover {
        background: #198754;
        color: white;
    }
/* Nút Back To Top */
#btnBackToTop {
    position: fixed;
    bottom: 90px; /* Đặt cao hơn nút Chatbox một chút */
    right: 20px;
    display: none; /* Ẩn mặc định */
    z-index: 999;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #dc3545, #b02a37);
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.4);
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
}

/* Hiệu ứng mượt mà khi hiện lên */
#btnBackToTop.show {
    opacity: 1;
    visibility: visible;
}

#btnBackToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.6);
    background: linear-gradient(135deg, #b02a37, #842029);
}

/* ==========================================
   7. LỊCH CHIẾU PHIM (SCHEDULE) & BỘ LỌC
========================================== */
/* Custom Date Tab Card Styling */
.date-tab {
    display: inline-flex;
    flex-direction: column;
    width: 82px;
    height: 82px;
    border-radius: 14px;
    border: 1.5px solid #e0e2e5;
    overflow: hidden;
    background: #ffffff;
    text-decoration: none !important;
    flex-shrink: 0;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.date-tab:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.06);
    border-color: #c3c6cb;
}

.date-tab-header {
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #2b303a;
    background: #ffffff;
    border-bottom: 1.5px solid #f1f3f5;
}

.date-tab-footer {
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #7d8590;
    background: #f6f8fa;
    transition: all 0.2s ease;
}

/* Weekend style */
.date-tab-weekend .date-tab-footer {
    color: #e91e63;
}

/* Active State style */
.date-tab-active {
    border-color: #e91e63 !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.25) !important;
}

.date-tab-active .date-tab-header {
    color: #e91e63 !important;
    background: #ffffff !important;
}

.date-tab-active .date-tab-footer {
    background: #e91e63 !important;
    color: #ffffff !important;
}

/* Scroll Arrows for Calendar */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #dee2e5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    color: #7d8590;
    transition: all 0.2s ease-in-out;
}

.scroll-arrow:hover {
    background-color: #e91e63;
    border-color: #e91e63;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.35);
}

.scroll-arrow-left {
    left: -10px;
}

.scroll-arrow-right {
    right: -10px;
}

/* Hide scrollbar for horizontal scrolling list */
.d-flex[style*="overflow-x: auto"]::-webkit-scrollbar {
    display: none !important;
}

/* Time Filter Buttons */
.btn-pink-active {
    background-color: #e91e63 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3) !important;
}

.btn-light-grey {
    background-color: #f1f3f5 !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
    transition: all 0.2s ease-in-out;
}

.btn-light-grey:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
    transform: translateY(-1px);
}

.text-gradient {
    background: linear-gradient(45deg, #0d6efd, #6610f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.movie-card {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.btn-showtime {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 130px;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #0d6efd;
    color: #0d6efd;
    background-color: #ffffff;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-showtime:hover {
    background: linear-gradient(135deg, #0d6efd, #5b9df9);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(13,110,253,0.35);
}

.btn-showtime:hover .text-muted {
    color: #e0e0e0 !important;
}

.theater-block {
    padding: 10px 0;
    border-bottom: 1px dashed #ccc;
}

/* =========================================================================
   7. CHẾ ĐỘ TỐI (DARK MODE) DÀNH CHO KHÁCH HÀNG (HOME, LỊCH CHIẾU,...)
   ========================================================================= */
body.dark-theme {
    background: linear-gradient(-45deg, #0c051c, #0a1128, #030712, #18092d) !important;
    background-size: 400% 400% !important;
    animation: gradientMove 15s ease infinite !important;
    color: #f8fafc !important;
}

body.dark-theme .navbar {
    background-color: rgba(12, 7, 24, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(15px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .navbar-brand,
body.dark-theme .navbar .nav-link {
    color: #f1f5f9 !important;
}

body.dark-theme .navbar-brand:hover,
body.dark-theme .navbar .nav-link:hover {
    color: #dc3545 !important;
}

body.dark-theme .dropdown-menu {
    background-color: rgba(18, 12, 35, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .dropdown-item {
    color: #cbd5e1 !important;
}

body.dark-theme .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

body.dark-theme footer {
    background: #06030c !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #94a3b8 !important;
}

body.dark-theme footer a,
body.dark-theme footer .footer-link {
    color: #cbd5e1 !important;
}

body.dark-theme footer a:hover,
body.dark-theme footer .footer-link:hover {
    color: #ffc107 !important;
}

/* Thẻ phim & Thẻ thông tin Glassmorphic (Movie Card & General Card) */
body.dark-theme .card,
body.dark-theme .movie-card,
body.dark-theme .modal-content,
body.dark-theme #chatbox {
    background: rgba(20, 14, 38, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(12px) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
}

body.dark-theme .movie-card .bg-white,
body.dark-theme .movie-card .card-body {
    background: transparent !important;
}

body.dark-theme .movie-card h5 {
    color: #ffffff !important;
}

/* Lịch chiếu (Schedule) */
body.dark-theme .card h2,
body.dark-theme .card h3,
body.dark-theme .card h4,
body.dark-theme .card h5,
body.dark-theme .card h6 {
    color: #ffffff !important;
}

body.dark-theme .theater-block {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .btn-light-grey {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .btn-light-grey:hover {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

body.dark-theme .btn-showtime {
    background-color: rgba(20, 14, 38, 0.8) !important;
    border: 2px solid #3b82f6 !important;
    color: #3b82f6 !important;
}

body.dark-theme .btn-showtime:hover {
    background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
    color: #ffffff !important;
}

body.dark-theme .form-control,
body.dark-theme .form-select {
    background-color: rgba(20, 14, 38, 0.8) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
    background-color: rgba(30, 22, 58, 0.9) !important;
    color: #ffffff !important;
}

body.dark-theme select option {
    background-color: #0c071d !important;
    color: #ffffff !important;
}

/* Ghế ngồi và thanh toán */
body.dark-theme .seat {
    border-radius: 4px;
}

body.dark-theme .seat.available {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .seat.selected {
    background-color: #22c55e !important;
}

body.dark-theme .seat.occupied {
    background-color: #ef4444 !important;
}

/* Modals */
body.dark-theme .modal-header,
body.dark-theme .modal-footer {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Ghi đè nền và chữ */
body.dark-theme .text-dark {
    color: #cbd5e1 !important;
}

body.dark-theme .text-muted {
    color: #94a3b8 !important;
}

body.dark-theme .bg-white,
body.dark-theme .bg-light {
    background: transparent !important;
}

/* Chatbox */
body.dark-theme #chat-body {
    background-color: rgba(12, 7, 24, 0.9) !important;
}

body.dark-theme .bubble {
    color: #ffffff !important;
}

body.dark-theme .message.bot .bubble {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .message.user .bubble {
    background-color: #4f46e5 !important;
}

/* Nút Back To Top */
#btnBackToTop {
    position: fixed;
    bottom: 90px; /* Đặt cao hơn nút Chatbox một chút */
    right: 20px;
    display: none; /* Ẩn mặc định */
    z-index: 999;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #dc3545, #b02a37);
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.4);
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
}

#btnBackToTop.show {
    opacity: 1;
    visibility: visible;
}

#btnBackToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.6);
    background: linear-gradient(135deg, #b02a37, #842029);
}

/* ==========================================
   FOOTER TEAL CUSTOM (LAYOUT GLOBAL FOOTER)
   ========================================== */
.footer-teal-custom {
    background: linear-gradient(135deg, #3f0708 0%, #1e0202 100%);
    color: #ffffff !important;
    font-size: 0.92rem;
    line-height: 1.65;
    border-top: 1px solid rgba(239, 68, 68, 0.3);
}
.footer-teal-custom p,
.footer-teal-custom span,
.footer-teal-custom div,
.footer-teal-custom small {
    color: #f1f5f9 !important;
    opacity: 1 !important;
}
.footer-teal-custom a {
    color: #e2e8f0 !important;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
.footer-teal-custom a:hover {
    color: #fbbf24 !important;
    padding-left: 4px;
}
.footer-heading {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.98rem;
    position: relative;
    padding-bottom: 0.6rem;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: #f59e0b;
    border-radius: 2px;
}
.hotline-box {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.social-circle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none !important;
}
.social-circle-btn:hover {
    background: #f59e0b;
    color: #08546c !important;
    transform: translateY(-3px);
}

/* ============================================================
   🎥 CINEZONE GLASSMORPHISM TRANSPARENT OVERLAY HEADER
============================================================ */
.navbar-transparent-overlay {
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    transition: all 0.3s ease-in-out;
}

.navbar-transparent-overlay .navbar-brand {
    color: #ffffff !important;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.navbar-transparent-overlay .nav-link {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    transition: all 0.25s ease;
}

.navbar-transparent-overlay .nav-link:hover {
    color: #ffffff !important;
    opacity: 1;
}

/* Translucent active pill link (e.g. Lịch Chiếu like screenshot) */
.nav-pill-active {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    padding: 0.45rem 1.25rem !important;
    font-weight: 600 !important;
}

.account-btn-red {
    background-color: #e50914 !important;
    color: #ffffff !important;
    border: none;
    transition: all 0.3s ease;
}
.account-btn-red:hover {
    background-color: #b20710 !important;
    color: #ffffff !important;
    transform: scale(1.04);
}

/* User Profile Dropdown Card Matching Reference Mockup */
.user-avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.user-dropdown-link {
    transition: all 0.2s ease;
    font-size: 0.92rem;
}
.user-dropdown-link:hover {
    background-color: #f1f5f9 !important;
    transform: translateX(3px);
}

/* Invisible Hover Bridge & Rock-solid Dropdown Open */
.navbar .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

@media (min-width: 992px) {
    .navbar .dropdown:hover > .dropdown-menu,
    .navbar .dropdown-menu:hover {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-top: 2px !important;
        pointer-events: auto !important;
    }
}