:root { 
    --primary-color: #2563eb; 
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc; 
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; overflow-y: scroll;}

/* Header Profile */
.profile-header { 
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%); 
    padding: 50px 20px 40px; 
    text-align: center; 
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 40px; 
}
.profile-avatar { 
    width: 130px; height: 130px; border-radius: 50%; object-fit: cover; 
    border: 4px solid white; box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2); 
    margin-bottom: 20px; transition: transform 0.3s;
}
.profile-avatar:hover { transform: translateY(-5px); }
.profile-name { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: #0f172a;}
.profile-contact { color: var(--text-muted); font-size: 15px; margin-bottom: 10px; }
.profile-contact.desc { max-width: 600px; margin: 0 auto 25px auto; }

/* Nút Liên hệ Header */
.header-actions { display: flex; justify-content: center; gap: 15px; }
.btn-contact { 
    padding: 12px 28px; text-decoration: none; border-radius: 30px; 
    font-weight: 600; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-call { background-color: #10b981; color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.btn-call:hover { background-color: #059669; transform: translateY(-2px); }
.btn-zalo { background-color: #0068ff; color: white; box-shadow: 0 4px 12px rgba(0, 104, 255, 0.3); }
.btn-zalo:hover { background-color: #0056d6; transform: translateY(-2px); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Khu vực Lọc */
.filter-section { 
    display: flex; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; justify-content: center; 
    background: white; padding: 20px; border-radius: var(--border-radius); box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.filter-select { 
    padding: 12px 15px; border-radius: 10px; border: 1px solid #cbd5e1; 
    min-width: 200px; outline: none; font-size: 15px; color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s; background-color: #f8fafc;
}
.filter-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); background-color: white;}

/* Lưới Danh sách Phòng */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; margin-bottom: 60px; }
.room-card { 
    background: var(--card-bg); border-radius: var(--border-radius); overflow: hidden; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); transition: all 0.3s; position: relative; border: 1px solid #f1f5f9;
}
.room-card:hover { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }

/* Tag Trạng thái nổi trên ảnh */
.room-status-badge {
    position: absolute; top: 15px; right: 15px; padding: 6px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 600; color: white; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
}
.badge-available { background-color: rgba(16, 185, 129, 0.9); }
.badge-rented { background-color: rgba(239, 68, 68, 0.9); }

.room-img { width: 100%; height: 220px; object-fit: cover; }
.room-info { padding: 25px; }
.room-price { color: var(--primary-color); font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.room-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; line-height: 1.4; color: #0f172a;}
.room-address { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 5px;}

.room-features { 
    display: flex; gap: 15px; font-size: 14px; color: var(--text-muted); 
    border-top: 1px solid #f1f5f9; padding-top: 20px; margin-bottom: 20px;
}
.feature-item { display: flex; align-items: center; gap: 5px; background: #f1f5f9; padding: 5px 10px; border-radius: 8px; font-size: 13px;}

.btn-detail { 
    display: block; width: 100%; text-align: center; background-color: #eff6ff; color: var(--primary-color); 
    padding: 12px; text-decoration: none; border-radius: 10px; border: none; font-weight: 600; font-size: 15px;
    cursor: pointer; transition: 0.2s; 
}
.btn-detail:hover { background-color: var(--primary-color); color: white; }

/* MODAL */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(5px); z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
.modal-content { background: white; padding: 35px; border-radius: 20px; max-width: 1000px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.2);}
.close-btn { position: absolute; top: 20px; right: 25px; font-size: 32px; cursor: pointer; background: none; border: none; color: #94a3b8; transition: 0.2s;}
.close-btn:hover { color: #ef4444; transform: rotate(90deg);}

.modal-body { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 10px; }
.modal-img-container { flex: 1.2; min-width: 300px; display: flex; flex-direction: column; gap: 15px; }
.gallery-main-img { width: 100%; height: 420px; object-fit: contain; border-radius: 12px; background-color: #f1f5f9; } 
.gallery-thumbnails { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 5px; }
.gallery-thumb { width: 85px; height: 65px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: 0.4; transition: all 0.2s; border: 2px solid transparent; }
.gallery-thumb:hover { opacity: 0.8; }
.gallery-thumb.active { opacity: 1; border-color: var(--primary-color); }

.modal-info-container { flex: 1; min-width: 300px; }
.modal-info-container h2 { color: #0f172a; margin-bottom: 15px; font-size: 26px; line-height: 1.3;}
.modal-price-large { font-size: 32px; color: var(--primary-color); font-weight: 700; margin-bottom: 25px;}
.modal-desc-row { margin-bottom: 15px; font-size: 16px; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; display: flex;}
.modal-desc-row strong { display: inline-block; width: 130px; color: var(--text-muted);}

.contact-box { margin-top: 30px; background: #f8fafc; padding: 25px; border-radius: 12px; border: 1px solid #e2e8f0;}
.contact-box p { margin-bottom: 15px; font-weight: 600; color: #334155;}

/* Nút Zalo Float */
.floating-zalo {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background-color: #fff;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    box-shadow: 0 4px 15px rgba(0, 104, 255, 0.4); z-index: 999; transition: transform 0.3s ease; animation: pulse-zalo 2s infinite;
}
.floating-zalo img { width: 40px; height: 40px; object-fit: contain; }
.floating-zalo:hover { transform: scale(1.1); }
@keyframes pulse-zalo {
    0% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 104, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 104, 255, 0); }
}

/* Go to Admin Link */
.admin-link { text-align: center; margin-bottom: 30px; }
.admin-link a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.admin-link a:hover { color: var(--primary-color); text-decoration: underline; }

@media (max-width: 768px) { 
    .filter-section { flex-direction: column; padding: 15px;}
    .filter-select { width: 100%; } 
    .floating-zalo { bottom: 20px; right: 20px; width: 50px; height: 50px; }
    .floating-zalo img { width: 30px; height: 30px; }
    .profile-header { padding: 30px 15px; }
    .gallery-main-img { height: 250px; }
}
/* --- CSS CHO HIỆU ỨNG LOADING --- */
.loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.9); z-index: 9999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.spinner {
    width: 50px; height: 50px; border: 5px solid #e2e8f0;
    border-top: 5px solid var(--primary-color); border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- CSS CHO MŨI TÊN CHUYỂN ẢNH --- */
.main-img-wrapper { 
    position: relative; 
    width: 100%; 
}
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    z-index: 10;
    backdrop-filter: blur(4px);
}
.nav-arrow:hover { background: var(--primary-color); transform: translateY(-50%) scale(1.1); }
.arrow-prev { left: 10px; }
.arrow-next { right: 10px; }

/* --- ÉP NÚT LIÊN HỆ KHÔNG XUỐNG DÒNG TRÊN ĐIỆN THOẠI --- */
.contact-box .btn-contact {
    white-space: nowrap; /* Không cho rớt chữ xuống dòng */
    padding: 12px 5px;   /* Giảm padding 2 bên một chút để vừa màn hình nhỏ */
    font-size: 14px;
}

/* --- CSS CHO XEM ẢNH PHÓNG TO (LIGHTBOX) --- */
.fullscreen-overlay {
    display: none; /* Mặc định ẩn */
    position: fixed; 
    z-index: 10000; /* Nằm trên cùng mọi thứ */
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(15, 23, 42, 0.95); /* Màu nền đen mờ */
    backdrop-filter: blur(5px);
    justify-content: center; 
    align-items: center;
}

.fullscreen-img {
    max-width: 95%; 
    max-height: 90vh; 
    object-fit: contain; 
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease; /* Hiệu ứng nảy lên */
}

.fullscreen-close {
    position: absolute; 
    top: 20px; 
    right: 30px; 
    color: #cbd5e1; 
    font-size: 45px; 
    font-weight: bold; 
    cursor: pointer;
    transition: 0.2s;
}

.fullscreen-close:hover { color: #ef4444; transform: scale(1.1); }

@keyframes zoomIn { 
    from { transform: scale(0.8); opacity: 0; } 
    to { transform: scale(1); opacity: 1; } 
}

/* Biến con trỏ chuột thành hình kính lúp khi rà lên ảnh chính */
.gallery-main-img {
    cursor: zoom-in; 
}