/* --- 1. THIẾT LẬP NỀN CÓ BLUR (FIX LỖI TRÔI NỘI DUNG) --- */
body {
    margin: 0;
    padding: 0; 
    display: flex;
    justify-content: center; 
    /* Chuyển từ center sang flex-start để form nở xuống dưới khi chọn dịch vụ */
    align-items: flex-start; 
    min-height: 100vh;       
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow-x: hidden;
    /* Thêm padding để form không dính sát mép trên/dưới */
    padding: 40px 0; 
}

/* Lớp giả chứa hình nền */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('picture/bg4.jpg'); 
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    
    /* --- ĐỘ MỜ TẠI ĐÂY --- */
    filter: blur(5px); 
    
    transform: scale(1.05); 
    z-index: -1;
}

/* --- 2. THIẾT KẾ BOX NỘI DUNG --- */
#booking-form {
    width: 90%;
    max-width: 500px;
    background-color: rgba(0, 0, 0, 0.9); 
    padding: 50px 35px;
    border-radius: 45px;       
    box-shadow: 0 25px 50px rgba(0,0,0,0.6); 
    color: white;
    box-sizing: border-box; 
    position: relative;
    /* Đảm bảo form luôn có khoảng cách dưới khi dài ra */
    margin-bottom: 20px; 
}

/* Hiệu ứng trượt xuống mượt mà khi các ô Tarot hiện ra */
.form-group {
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 3. CÁC ĐẦU MỤC --- */
.header {
    text-align: center;
    margin-bottom: 35px;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #f8c8dc; 
    letter-spacing: -1px;
    margin: 0;
    text-transform: lowercase; 
}

.header h2 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 8px;
    color: #f8c8dc; 
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group, .choose-topic {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    font-weight: 600;
    font-size: 14px;
    color: #f8c8dc; 
    margin-left: 15px; 
}

input[type="text"], 
input[type="date"],
select, 
textarea {
    width: 100%;
    padding: 16px 25px; 
    background-color: #1e1e1e; 
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 50px; 
    color: white;
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.3s ease;
    outline: none;
}

textarea {
    border-radius: 25px; 
    resize: none;
}

input:focus, select:focus, textarea:focus {
    border-color: #f8c8dc;
    background-color: #262626;
}

/* Mũi tên Select */
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f8c8dc' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
}

.note-box {
    background-color: #1a1a1a;
    border-left: 4px solid #f8c8dc;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 13px;
    line-height: 1.6;
    color: #ccc;
}

.section-title {
    text-align: center;
    font-weight: bold;
    color: #f8c8dc;
    margin: 35px 0 15px 0;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.7;
}

.btn-submit {
    width: 100%;
    padding: 18px;
    background-color: #f8c8dc; 
    color: #000;              
    border: none;
    border-radius: 50px; 
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    background-color: #fbd7e6;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(248, 200, 220, 0.2);
}

/* Lỗi và Hidden */
input.error, select.error, textarea.error {
    border: 1px solid #ff4d4d !important;
    background-color: #2d1a1a;
}

.hidden {
    display: none !important;
}

.opt-header { font-weight: bold; background-color: #eee; color: #333; }

/* --- NÚT HOMEPAGE GÓC TRÁI (FIXED) --- */
.home-button {
    position: fixed; /* Luôn cố định ở góc màn hình */
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1); /* Nền mờ trắng */
    backdrop-filter: blur(10px); /* Hiệu ứng kính mờ */
    -webkit-backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
    font-weight: 600;
    z-index: 10001; /* Đặt cao hơn cả overlay thanh toán để có thể thoát ra */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.home-button i {
    font-size: 18px;
}

.home-button:hover {
    background: #f8c8dc; /* Đổi sang màu hồng pastel */
    color: #000;
    transform: translateX(5px);
    border-color: #f8c8dc;
}

/* --- RESPONSIVE --- */
@media (max-width: 480px) {
    #booking-form {
        padding: 40px 20px;
        border-radius: 35px;
    }
    body::before {
        filter: blur(3px); 
    }
    body {
        padding: 20px 0;
    }
    .home-button span {
        display: none; /* Ẩn chữ trên mobile cho đỡ vướng */
    }
    .home-button {
        padding: 12px;
        border-radius: 50%;
    }
}