@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&display=swap');
/* =========================================
   RAINY PSYCHOLOGY
   Rainy Editorial — Modern Botanical
   ========================================= */

/* 1. BẢNG MÀU */
:root {
    --rainy-blue: #779BB8;
    --deep-blue: #294967;
    --dusty-blue: #DCE7F1;
    --cream: #F8F6F0;
    --sage: #A9BBA8;
    --lavender: #DCD7E9;
    --soft-pink: #EAD4D0;
    --text-color: #40536A;
    --white: #FFFFFF;
    --border: #E7E5E0;
    --shadow: 0 12px 35px rgba(49, 68, 89, 0.08);
}

/* 2. CÀI ĐẶT CHUNG */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(ellipse at 5% 15%,
        rgba(220, 215, 233, 0.28), transparent 35%),
        radial-gradient(ellipse at 95% 65%,
        rgba(169, 187, 168, 0.20), transparent 35%),
        var(--cream);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
}

button {
    font-family: inherit;
}

/* 3. HEADER */
header {
    background: rgba(248, 246, 240, 0.94);
    color: var(--deep-blue);
    padding: 23px 8%;
    border-bottom: 1px solid rgba(41, 73, 103, 0.08);
    position: relative;
}

header h1 {
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.8px;
}

header p {
    color: #77889A;
    font-size: 14px;
    margin-top: 2px;
}

/* 4. KHU VỰC CHÍNH */
main {
    max-width: 1100px;
    margin: auto;
    padding: 65px 24px 45px;
}

/* 5. HERO / TRANG CHÀO */
.welcome {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 8% 90%,
        rgba(169, 187, 168, 0.45), transparent 32%),
        radial-gradient(ellipse at 95% 5%,
        rgba(220, 215, 233, 0.85), transparent 38%),
        linear-gradient(135deg, #E8EDF3, #F5EFE9);
    border-radius: 30px;
    padding: 75px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.7);
}

.welcome::before,
.welcome::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
}

.welcome::before {
    width: 210px;
    height: 210px;
    background: rgba(169, 187, 168, 0.18);
    top: -115px;
    left: -65px;
}

.welcome::after {
    width: 180px;
    height: 180px;
    background: rgba(234, 212, 208, 0.30);
    bottom: -110px;
    right: -45px;
}

.welcome h2 {
    position: relative;
    z-index: 1;
    color: var(--deep-blue);
    font-family: Georgia, serif;
    font-size: clamp(30px, 4vw, 43px);
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 18px;
}

.welcome p {
    position: relative;
    z-index: 1;
    font-size: 17px;
    color: #65778B;
    margin-bottom: 28px;
}

/* 6. NÚT */
button {
    background: var(--rainy-blue);
    color: white;
    border: none;
    padding: 14px 29px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
}

button:hover {
    background: var(--deep-blue);
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(41, 73, 103, 0.16);
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-button {
    background: #E9E6EF;
    color: var(--deep-blue);
}

.secondary-button:hover {
    background: var(--lavender);
}

/* 7. FOOTER */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #8995A0;
    font-size: 13px;
}

/* 8. ẨN HIỆN */
.hidden {
    display: none !important;
}

/* 9. KHUNG BÀI TEST VÀ KẾT QUẢ */
.quiz,
.result {
    max-width: 760px;
    margin: 0 auto;
    background: rgba(255,255,255,0.94);
    padding: 42px;
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: var(--shadow);
}

.quiz-category {
    color: #A68C65;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 12px;
    margin-bottom: 16px;
}

.quiz h2,
.result h2 {
    color: var(--deep-blue);
    font-family: Georgia, serif;
    font-size: 29px;
    line-height: 1.35;
    margin-bottom: 26px;
}

/* 10. TIẾN ĐỘ */
.progress-info {
    display: flex;
    justify-content: space-between;
    color: #8592A0;
    font-size: 13px;
    margin-bottom: 9px;
}

.progress-bar {
    height: 8px;
    background: #EBEDF0;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 36px;
}

#progressFill {
    height: 100%;
    width: 8.33%;
    background: linear-gradient(
        90deg,
        var(--rainy-blue),
        #9FB6C8
    );
    border-radius: 20px;
    transition: width 0.3s;
}

/* 11. CÂU HỎI */
#questionText {
    color: var(--deep-blue);
    font-size: 21px;
    font-weight: 650;
    line-height: 1.55;
    margin-bottom: 25px;
}

/* 12. CÁC PHƯƠNG ÁN */
.answer-options {
    display: grid;
    gap: 12px;
}

.answer-option {
    width: 100%;
    background: #FFFFFF;
    color: var(--text-color);
    border: 1px solid #E5E7E9;
    border-radius: 14px;
    padding: 16px 19px;
    text-align: left;
    font-size: 15px;
    font-weight: 450;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-option:hover {
    background: #F1F4F8;
    border-color: var(--rainy-blue);
    transform: translateX(3px);
    box-shadow: none;
}

.answer-option.selected {
    background: #E7EFF6;
    border: 2px solid var(--rainy-blue);
    color: var(--deep-blue);
    font-weight: 650;
}

/* 13. ĐIỀU HƯỚNG */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 32px;
}

.quiz-navigation button {
    flex: 1;
}

/* 14. TRANG KẾT QUẢ */
.result {
    text-align: center;
}

.result p {
    margin-bottom: 20px;
}

.result-content {
    text-align: left;
    margin: 26px 0;
}

/* 15. XU HƯỚNG NỔI BẬT */
.result-intro {
    background:
        linear-gradient(130deg, #E8EFF6, #F0EEF5);
    padding: 24px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.9);
}

.result-intro h3 {
    color: var(--deep-blue);
    font-size: 20px;
    margin-bottom: 10px;
}

.result-intro p {
    color: #536A80;
    line-height: 1.8;
    margin-bottom: 0;
}

/* 16. BIỂU ĐỒ ĐIỂM */
.score-item {
    margin-bottom: 22px;
}

.score-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 650;
    color: var(--deep-blue);
}

.score-track {
    height: 11px;
    background: #EBEEF1;
    border-radius: 20px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease;
}

.score-note {
    color: #8794A0;
    font-size: 12px;
    margin-top: 6px;
}

/* 17. PHÂN TÍCH CHI TIẾT */
.detail-heading {
    color: var(--deep-blue);
    font-family: Georgia, serif;
    margin: 34px 0 20px;
    font-size: 23px;
}

.attachment-detail {
    position: relative;
    overflow: hidden;
    background: #FCFBF8;
    border: 1px solid #E9E6E0;
    border-radius: 20px;
    padding: 25px;
    margin: 19px 0;
    text-align: left;
}

.attachment-detail:nth-of-type(odd) {
    background: #F4F5F1;
}

.attachment-detail h3 {
    color: var(--deep-blue);
    font-family: Georgia, serif;
    font-size: 21px;
    margin-bottom: 13px;
}

.attachment-detail p {
    color: #53677D;
    line-height: 1.8;
    margin-bottom: 16px;
}

.attachment-detail h4 {
    color: #6386A5;
    font-size: 15px;
    margin: 18px 0 8px;
}

.attachment-detail ul {
    padding-left: 22px;
    color: #526579;
    line-height: 1.9;
}

.attachment-detail li {
    padding-left: 3px;
    margin-bottom: 5px;
}

/* 18. BÀI TẬP THỰC HÀNH */
.result-exercise {
    background: #E9EFF3;
    border-left: 4px solid var(--rainy-blue);
    padding: 18px;
    border-radius: 6px 14px 14px 6px;
    margin-top: 21px;
    line-height: 1.8;
}

.result-exercise strong {
    color: var(--deep-blue);
}

.result-exercise p {
    color: #53677D;
    margin: 8px 0 0;
}

/* 19. GỢI Ý VÀ LƯU Ý */
.result-advice {
    background: #F1F0E9;
    padding: 22px;
    border-radius: 18px;
    margin: 22px 0;
    line-height: 1.8;
}

.result-disclaimer {
    font-size: 12px;
    color: #87919A;
    margin: 22px 0;
    line-height: 1.7;
}

/* 20. RESPONSIVE - TABLET */
@media (max-width: 800px) {
    main {
        padding: 45px 20px;
    }

    .welcome {
        padding: 60px 28px;
    }
}

/* 21. RESPONSIVE - ĐIỆN THOẠI */
@media (max-width: 600px) {
    header {
        padding: 19px 22px;
    }

    header h1 {
        font-size: 22px;
    }

    main {
        padding: 28px 15px;
    }

    .welcome {
        padding: 48px 20px;
        border-radius: 23px;
    }

    .welcome h2 {
        font-size: 29px;
    }

    .welcome p {
        font-size: 15px;
    }

    .quiz,
    .result {
        padding: 26px 19px;
        border-radius: 21px;
    }

    .quiz h2,
    .result h2 {
        font-size: 24px;
    }

    #questionText {
        font-size: 18px;
    }

    .answer-option {
        padding: 15px;
        font-size: 14px;
    }

    .quiz-navigation {
        gap: 10px;
    }

    .quiz-navigation button {
        padding: 13px 12px;
        font-size: 13px;
    }

    .result-intro {
        padding: 19px;
    }

    .attachment-detail {
        padding: 20px 17px;
    }

    .attachment-detail h3 {
        font-size: 19px;
    }

    .score-label {
        font-size: 12px;
    }

    .detail-heading {
        font-size: 21px;
    }

    footer {
        padding: 24px 15px;
    }
}

/* FIX FONT TIẾNG VIỆT */
body,
body * {
    font-family: Arial, "Segoe UI", sans-serif !important;
    letter-spacing: normal;
    font-kerning: normal;
    word-spacing: normal;
}

/* Giữ chữ tiêu đề rõ ràng */
h1, h2, h3, h4 {
    letter-spacing: normal !important;
    word-spacing: normal !important;
}

/* Hình Rainy chìm dưới lớp nền trang chủ */

/* RAINY E-MB - BACKGROUND TOÀN WEBSITE */

body {
    position: relative;
    isolation: isolate;
    background-color: #F8F6EF;
}

/* Hình nền phủ toàn bộ màn hình */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background-image: url("images/hero-botanical.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    opacity: 0.35;
}

/* Nội dung nằm phía trên hình nền */
header,
main,
footer {
    position: relative;
    z-index: 1;
}

/* Khung nội dung trong suốt hơn */
.welcome {
    background: linear-gradient(
        135deg,
        rgba(220, 234, 245, 0.82),
        rgba(248, 246, 239, 0.82)
    );
}
/* Rainy - Belflower Script */
@font-face {
    font-family: 'Belflower';
    src: url('./Fonts/Belflower%20Script.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.brand-script {
    font-family: 'Belflower', cursive !important;
    font-size: 52px;
    font-weight: normal;
    color: #477DA8;
    display: inline-block;
    margin-right: 5px;
    line-height: 1;
}
