:root {
    --cgv-red: #e71a0f;
    --dark: #121212;
    --bg-cgv: #fdfcf0;
    --gold: #ffc107;
}

body {
    margin: 0;
    background: var(--bg-cgv);
    font-family: 'Roboto', sans-serif;
    color: #333;
}

header {
    background: #000;
    padding: 15px 0;
    text-align: center;
    border-bottom: 4px solid var(--cgv-red);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.logo { font-family: 'Oswald', sans-serif; font-size: 35px; color: #fff; letter-spacing: 2px; }
.logo span { color: var(--cgv-red); }

.container { width: 90%; max-width: 1100px; margin: 40px auto; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.6s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.title-main { font-family: 'Oswald', sans-serif; border-bottom: 2px solid #333; padding-bottom: 5px; margin: 40px 0; }

/* Movie Grid */
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 40px; }
.movie-card { background: #fff; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: 0.3s; border: 1px solid #eee; }
.movie-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(231, 26, 15, 0.2); }
.movie-card img { width: 100%; height: 400px; object-fit: cover; }
.movie-info { padding: 20px; text-align: center; }

/* NÚT MUA VÉ KHỔNG LỒ */
.btn-buy-huge {
    background: var(--cgv-red);
    color: #fff;
    border: none;
    width: 100%;
    padding: 18px 0;
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 6px 0 #b3120a;
    transition: 0.2s;
}
.btn-buy-huge:active { transform: translateY(4px); box-shadow: 0 2px 0 #b3120a; }

/* Suất chiếu & Ngày */
.showtime-container { background: #fff; padding: 30px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.date-picker { display: flex; gap: 10px; margin-bottom: 25px; }
.date-item { padding: 10px 20px; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; text-align: center; min-width: 70px; }
.date-item.active { background: #333; color: #fff; border-color: #333; }
.date-item strong { display: block; font-size: 18px; font-family: 'Oswald', sans-serif; }

.time-grid { display: flex; gap: 15px; flex-wrap: wrap; }
.time-item { padding: 12px 30px; border: 2px solid #333; background: #fff; font-family: 'Oswald', sans-serif; font-size: 18px; cursor: pointer; border-radius: 6px; transition: 0.3s; }
.time-item.selected-time { background: var(--cgv-red); color: #fff; border-color: var(--cgv-red); }

/* Rạp & Ghế */
.theater-box { background: var(--dark); padding: 50px 20px; border-radius: 20px; color: #fff; text-align: center; }
.screen { width: 70%; height: 6px; background: #fff; margin: 0 auto 50px; box-shadow: 0 5px 20px #fff; border-radius: 10px; }
.seat-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; width: fit-content; margin: 0 auto; }
.seat { width: 30px; height: 26px; background: #444; border-radius: 5px 5px 0 0; cursor: pointer; transition: 0.2s; }
.seat.selected { background: var(--cgv-red) !important; box-shadow: 0 0 10px var(--cgv-red); }

.legend { display: flex; justify-content: center; gap: 20px; margin: 30px 0; font-size: 13px; }
.s-demo { display: inline-block; width: 18px; height: 16px; background: #444; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
.s-demo.s-selected { background: var(--cgv-red); }

.booking-summary { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #333; padding-top: 25px; max-width: 500px; margin: 0 auto; }
#total { color: var(--gold); font-size: 24px; font-weight: bold; }
.btn-checkout { background: var(--gold); border: none; padding: 15px 40px; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 16px; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: #fff; padding: 40px; border-radius: 20px; width: 360px; text-align: center; position: relative; border-top: 10px solid var(--cgv-red); }
.btn-close { position: absolute; right: -10px; top: -15px; background: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 30px; line-height: 40px; cursor: pointer; box-shadow: 0 5px 10px rgba(0,0,0,0.2); }

.pay-item { display: flex; align-items: center; padding: 15px; border: 2px solid #eee; border-radius: 10px; margin-bottom: 10px; cursor: pointer; }
.pay-item input { margin-right: 15px; }
.pay-item img { width: 30px; margin-right: 10px; }
.pay-item:has(input:checked) { border-color: var(--cgv-red); background: #fff5f5; }

.price-box { margin: 20px 0; font-size: 18px; }
.price-box strong { font-size: 26px; color: var(--cgv-red); }
.btn-confirm-final { background: var(--cgv-red); color: #fff; border: none; width: 100%; padding: 15px; border-radius: 10px; font-weight: bold; cursor: pointer; font-size: 16px; }

/* Success */
.success-card { border-top-color: #28a745; }
.check-icon { font-size: 60px; color: #28a745; margin-bottom: 10px; }
.ticket-info { background: #f9f9f9; padding: 15px; border: 1px dashed #ccc; margin: 20px 0; }
.qr { width: 120px; margin-bottom: 15px; }

/* HEADER: Dùng Flexbox để dàn hàng ngang tự động */
header {
    background: #000;
    padding: 15px 5%; /* Thu nhỏ padding 2 bên một chút */
    display: flex;
    justify-content: space-between; /* Đẩy Logo sang trái, Nút sang phải */
    align-items: center; /* Căn giữa tất cả theo chiều dọc */
    border-bottom: 4px solid var(--cgv-red);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: sticky; /* Giữ header luôn ở trên cùng khi cuộn */
    top: 0;
    z-index: 100;
}

/* LOGO: Bỏ margin tự do */
.logo {
    font-family: 'Oswald', sans-serif;
    font-size: 30px;
    color: #fff;
    letter-spacing: 2px;
    margin: 0; 
}

/* NÚT ĐĂNG NHẬP/ĐĂNG KÝ: Không dùng absolute nữa */
.user-actions {
    display: flex;
    gap: 10px; /* Khoảng cách giữa 2 nút */
}

.btn-member {
    background: transparent;
    color: #fff;
    border: 1px solid #ff0000; /* Viền đỏ mảnh */
    padding: 8px 15px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
    white-space: nowrap; /* Không cho chữ bị xuống dòng */
}

.btn-member:hover {
    background: var(--cgv-red);
    color: #fff;
}
/* Tăng kích thước tổng thể của khung Modal */
.auth-card {
    background: #1a1a1a !important;
    color: #fff !important;
    width: 450px !important; /* Tăng chiều rộng khung từ 360px lên 450px */
    padding: 60px 45px !important; /* Tăng khoảng trống bên trong */
    border-radius: 25px !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8) !important;
}

/* KHUNG NHẬP LIỆU TO VÀ RÕ */
.auth-input {
    background: #262626;
    border: 2px solid #333; /* Viền dày hơn một chút */
    padding: 18px 20px; /* Tăng độ cao (padding dọc từ 12px lên 18px) */
    color: #fff;
    border-radius: 12px; /* Bo góc mượt hơn */
    font-size: 17px; /* Tăng cỡ chữ bên trong từ 14px lên 17px */
    transition: all 0.3s ease;
    width: 100%; /* Đảm bảo chiếm hết chiều ngang */
    box-sizing: border-box; /* Tránh việc padding làm tràn khung */
}

/* Hiệu ứng khi nhấn vào khung (Focus) */
.auth-input:focus {
    border-color: var(--cgv-red);
    background: #333;
    box-shadow: 0 0 15px rgba(231, 26, 15, 0.4);
    outline: none;
    transform: scale(1.02); /* Nhích nhẹ lên tạo cảm giác tương tác */
}

/* Điều chỉnh nút bấm cho cân xứng với khung nhập to */
.auth-form .btn-confirm-final {
    height: 65px; /* Tăng chiều cao nút */
    font-size: 20px; /* Chữ nút to hơn */
    margin-top: 15px;
    border-radius: 12px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

/* Khoảng cách giữa các ô nhập liệu */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Tăng khoảng cách giữa các ô từ 15px lên 25px */
}
.date-item {
    user-select: none; /* Ngăn việc bôi đen chữ khi bấm nhanh */
    transition: transform 0.1s active;
}
.date-item:active {
    transform: scale(0.95); /* Hiệu ứng lún xuống khi nhấn */
}
/* Badge hiển thị tên phương thức đã chọn */
.method-badge {
    background: #eee;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 15px;
    display: inline-block;
}

/* Hiệu ứng khi chọn phương thức */
.pay-item:active {
    transform: scale(0.95);
    background: #fff5f5;
}

/* Hiệu ứng chuyển cảnh */
.fade-in {
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}