/* --- Resets & Basic Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Header (Chung cho mọi trang) --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a4a4a;
}

.nav-links a.dropdown span {
    font-size: 0.7rem;
    margin-left: 4px;
}

.nav-links-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links-center a {
    font-size: 1.2rem; /* Làm cho nó to hơn một chút */
    font-weight: 700;
    color: #111; /* Làm cho nó đậm hơn */
    text-transform: uppercase; /* Viết hoa (tùy chọn) */
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-links-center a:hover {
    background-color: #f5f5f5;
}

.search-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    position: relative;
}

.search-bar input {
    width: 250px;
    padding: 10px 15px 10px 40px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background-color: #f0f2f5;
    border: none;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.user-icon i {
    font-size: 1.5rem;
    color: #555;
}

/* --- Movie Card (Chung cho index.html và phim.html) --- */
.movie-card {
    min-width: 190px;
    width: 190px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    /* Dùng để snap slider */
    scroll-snap-align: start; 
}

.movie-card:hover {
    transform: translateY(-5px);
}

.poster-img {
    position: relative;
}

.poster-img img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    display: block;
}

.tag-soon {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #cd151c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.rating {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #4CAF50;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.movie-info {
    padding: 12px;
}

.movie-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-info .release-date {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.buy-ticket-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #e00b0f;
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.buy-ticket-btn:hover {
    background-color: #b8090d;
}

/* --- Styles for Placeholder Pages (Chung) --- */
.placeholder-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60vh;
    flex-direction: column;
}

.placeholder-page h1 {
    font-size: 2rem;
    color: #555;
}

.placeholder-page p {
    font-size: 1.1rem;
    color: #777;
    margin-top: 10px;
}

/* === CSS CHO MODAL RẠP === */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Class để ẩn modal */
.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background-color: white;
    width: 800px;
    max-width: 90%;
    height: 70vh;
    max-height: 600px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.9);
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2.5rem;
    font-weight: 300;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.modal-header {
    display: flex;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.modal-search-bar {
    flex: 1;
    position: relative;
}

.modal-search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.modal-search-bar input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.modal-location-filter input {
    width: 200px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 25px;
}

.cinema-list-modal {
    list-style: none;
}

.cinema-list-modal li {
    display: flex;
    gap: 15px;
    padding: 20px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.cinema-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.cinema-details h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 5px;
}

.map-link {
    font-size: 0.8rem;
    font-weight: normal;
    color: #007bff;
    border: 1px solid #007bff;
    border-radius: 4px;
    padding: 2px 5px;
    margin-left: 10px;
    text-decoration: none;
}
.map-link:hover {
    background-color: #f0f8ff;
}

.address {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

/* --- STYLE CHO MODAL RẠP (MỚI) --- */

/* 1. Ô tìm kiếm trong Modal */
.modal-search-box {
    position: relative;
    margin-bottom: 20px;
}

.modal-search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px; /* Padding phải chừa chỗ cho icon */
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #f9f9f9;
    transition: border 0.3s;
    box-sizing: border-box; /* Quan trọng để không vỡ layout */
}

.modal-search-box input:focus {
    border-color: #fca311;
    background: #fff;
}

.modal-search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* 2. Danh sách Rạp */
.cinema-list-modal {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px; /* Giới hạn chiều cao */
    overflow-y: auto;  /* Cho phép cuộn dọc */
}

/* Scrollbar đẹp cho danh sách */
.cinema-list-modal::-webkit-scrollbar {
    width: 6px;
}
.cinema-list-modal::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.cinema-modal-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.cinema-modal-item:last-child {
    border-bottom: none;
}

/* 3. Logo Rạp */
.cinema-logo-wrapper {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.cinema-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Giúp logo không bị méo */
}

/* 4. Thông tin Rạp */
.cinema-info {
    flex: 1;
}

.cinema-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.cinema-info p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.view-schedule-link {
    font-size: 12px;
    color: #fca311;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
}

.view-schedule-link:hover {
    text-decoration: underline;
}
body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../image/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}