@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background-image: url('https://images.pexels.com/photos/176851/pexels-photo-176851.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2');
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
}

.main-container {
    text-align: center;
    width: 100%;
    max-width: 800px;
}

h1 {
    color: #fca311;
    font-size: 2.5em;
}

/* --- MỚI: Kiểu cho khu vực hiển thị 52 lá bài --- */
#full-deck-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px; /* Tăng khoảng cách giữa các lá bài */
    margin: 40px 0;
    /* Đã xóa dòng filter: brightness(0.7); để ảnh rõ nét */
}

#full-deck-display img {
    width: 65px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    background-color: white; /* Thêm dòng này */
}
/* Mã mới: Thêm hiệu ứng khi di chuột qua lá bài trang trí */
#full-deck-display img:hover {
    transform: translateY(-10px); /* Nhấc lá bài lên một chút */
    z-index: 2; /* Đảm bảo lá bài được chọn nằm trên các lá khác */
}

#draw-button {
    background-color: #fca311;
    color: #1a1a2e;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 20px 0;
    position: relative; /* Để nút nổi lên trên các lá bài */
    z-index: 10;
}

#draw-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(252, 163, 17, 0.4);
}

#card-draw-area {
    display: flex;
    justify-content: center;
    gap: 15px; /* Khoảng cách giữa các lá bài */
    flex-wrap: wrap;
    min-height: 150px; /* Giữ không gian cho lá bài */
    margin: 30px 0;
}

#card-draw-area img {
    width: 100px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    background-color: white; /* Thêm dòng này */
}
#card-draw-area img:hover {
    transform: scale(1.05) translateY(-10px);
}


#results-container {
    background-color: #ffffff;
    color: #1c1c1c;
    padding: 30px;
    border-radius: 10px;
    margin-top: 20px;
    width: 100%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    text-align: left;
    box-sizing: border-box; /* Thêm dòng này để sửa lỗi tràn lề */
}

/* --- MỚI: Kiểu cho khối luận giải tổng hợp --- */
.summary-block {
    background-color: #fff8e1; /* Nền màu kem nhẹ */
    border: 2px solid #fca311;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}
.summary-block h3 {
    text-align: center;
    color: #c77700;
    margin-top: 0;
    font-size: 1.5em;
}
.summary-block p {
    font-size: 1.1em;
    line-height: 1.7;
    text-align: justify;
}


.result-title {
    text-align: center;
    color: #d9534f;
    font-size: 1.8em;
    margin-bottom: 30px;
    font-weight: bold;
}

.interpretation-block {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.interpretation-block:last-child {
    border-bottom: none;
}

.interpretation-block h3 {
    color: #c93756;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.interpretation-block p {
    font-size: 1em;
    line-height: 1.6;
}

.hidden {
    display: none;
}
@media (max-width: 768px) {
    body {
        /* Giảm padding tổng thể của trang trên màn hình nhỏ */
        padding: 10px;
    }

    h1 {
        /* Thu nhỏ tiêu đề chính */
        font-size: 1.8em;
        line-height: 1.2;
    }

    #draw-button {
        /* Thu nhỏ nút bấm một chút */
        font-size: 1em;
        padding: 12px 25px;
    }

    #card-draw-area img {
        /* Giảm kích thước của 4 lá bài kết quả */
        width: 75px;
    }

    #full-deck-display img {
        /* Giảm kích thước các lá bài trang trí */
        width: 35px;
    }

    #results-container {
        /* Đây là phần quan trọng: giảm padding bên trong khung luận giải */
        padding: 20px 15px;
    }
    
    .summary-block h3 {
        /* Thu nhỏ tiêu đề khối luận giải tổng hợp */
        font-size: 1.3em;
    }
    .summary-block p {
        font-size: 1em;
    }

    .result-title {
        /* Thu nhỏ tiêu đề "CHI TIẾT 4 LÁ BÀI" */
        font-size: 1.4em;
    }

    .interpretation-block h3 {
        /* Thu nhỏ tên của từng lá bài */
        font-size: 1.1em;
    }
}
