﻿@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap');

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif !important;
    color: #495057;
    background-color: #FFFBF0;
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    padding-bottom: 70px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.result-page-wrapper {
    width: 100%;
    max-width: 100%;
}

body {
    background-image: url('../image/grid.webp');
    background-repeat: no-repeat; /* Không lặp lại hình ảnh */
    background-position: top right; /* Đặt vị trí ở góc trên cùng bên phải */
}


/* --- Bootstrap Carousel Customization --- */
.image-slider-section {
    padding: 20px 0 45px 0; /* Giảm padding trên, tăng dưới cho dots */
    position: relative;
    max-height: 310px;
}



.slide-label {
    background-color: #6c757d;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 15px;
    display: inline-block;
    white-space: nowrap;
}

.slider-image-content { /* Ảnh */
    width: 100%;
    max-width: 450px;
    max-height: 260px;
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto; /* Đảm bảo căn giữa */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Custom Indicators (Dots) */
.result-carousel-indicators {
    position: absolute;
    bottom: -30px; /* Đặt dưới carousel */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

    .result-carousel-indicators [data-bs-target] {
        box-sizing: content-box;
        flex: 0 1 auto;
        width: 9px;
        height: 9px;
        padding: 0;
        margin: 0 4px;
        cursor: pointer;
        background-color: rgba(255,255,255,0.4);
        background-clip: padding-box;
        border: 0;
        border-top: 10px solid transparent; /* Tạo vùng click lớn hơn */
        border-bottom: 10px solid transparent;
        opacity: 0.7;
        transition: opacity .6s ease, background-color 0.3s ease, transform 0.3s ease;
        border-radius: 50%;
    }

    .result-carousel-indicators .active {
        opacity: 1;
        background-color: #f5c85f;
        transform: scale(1.2);
    }

/* Ẩn controls mặc định nếu không dùng */
/* .carousel-control-prev, .carousel-control-next { display: none; } */


/* Phần content, chart, buttons giữ nguyên */
.result-content-section {
    background-color: #FFFBF0;
    padding-top: 35px;
    padding-bottom: 50px;
}

.pagination-placeholder-mobile {
    display: none !important;
}

.result-text-content {
}

    .result-text-content h1 {
        font-weight: 700;
        font-size: 2rem;
        margin-bottom: 1rem;
        color: #212529;
    }

        .result-text-content h1 .highlight-group {
            color: #e67e22;
        }

    .result-text-content .tagline {
        font-size: 1rem;
        color: #6c757d;
        margin-bottom: 0.3rem;
        font-weight: 500;
    }

    .result-text-content .tagline-italic {
        font-style: italic;
        color: #28a745;
        margin-bottom: 1.5rem;
    }

    .result-text-content p {
        font-size: 1rem;
        line-height: 1.75;
        color: #495057;
        margin-bottom: 1rem;
    }

.personality-traits {
    border-top: 1px solid #dee2e6;
}

    .personality-traits h4 {
        font-weight: 600;
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        color: #343a40;
    }

    .personality-traits ul {
        list-style: none;
        padding-left: 0;
        margin-bottom: 0;
    }

    .personality-traits li {
        font-size: 1rem;
        color: #495057;
        line-height: 1.7;
        margin-bottom: 0.6rem;
    }

.sidebar-container {
}

.sidebar-content-sticky {
    position: sticky;
    top: 20px;
    z-index: 10;
}

.chart-container {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    width: 100%;
    max-width: 100%;
    margin-bottom: 25px;
}

.chart-title {
    font-weight: 600;
    color: #343a40;
    margin-bottom: -10px !important;
    font-size: 0.95rem;
}

#radarChart {
    max-width: 100%;
    height: auto !important;
    display: block;
    aspect-ratio: 1 / 1;
}

.action-buttons-desktop {
}

.sticky-action-buttons {
    position: sticky;
    top: 20px;
    z-index: 100;
}

.btn-result-action {
    display: block;
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.btn-primary-action {
    background-color: #ffc107;
    color: #212529;
    border-color: #ffc107;
    box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 1) !important;
}

    .btn-primary-action:hover {
        background-color: #e0a800;
        border-color: #d39e00;
        color: #212529;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

.btn-result-action:not(.btn-primary-action) {
    background-color: #FBECCA;
    color: #495057;
    border-color: #dee2e6;
}

    .btn-result-action:not(.btn-primary-action):hover {
        background-color: #e9ecef;
        border-color: #ced4da;
        color: #212529;
    }
    
.btn-bling-bling {
    animation: blink-opacity 1.5s infinite alternate;
}

@keyframes blink-opacity {
    0% {
        opacity: 1; /* Button hiển thị đầy đủ */
        background-color: #FBECCA;
    }

    50% {
        opacity: 1; /* Button mờ đi còn 30% độ mờ */
        background-color: #1E377E;
        color: #FBECCA;
    }

    100% {
        opacity: 1; /* Button hiển thị đầy đủ trở lại */
        background-color: #FBECCA;
    }
}

.btn-bling-bling-red {
    animation: blink-opacity-red 1.5s infinite alternate;
    color: white;
}

@keyframes blink-opacity-red {
    0% {
        opacity: 1; /* Button hiển thị đầy đủ */
        background-color: red;
    }

    50% {
        opacity: 1; /* Button mờ đi còn 30% độ mờ */
        background-color: red;
        color: #FBECCA;
    }

    100% {
        opacity: 1; /* Button hiển thị đầy đủ trở lại */
        background-color: red;
    }
}

.mobile-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    padding: 10px 5px;
    z-index: 1000;
    border-top: 1px solid #e9ecef;
}

.btn-mobile-action {
    flex: 1;
    margin: 0 5px;
    padding: 10px 5px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    background-color: #f1f3f5;
    color: #495057;
    border: 1px solid #dee2e6;
    text-decoration: none;
    white-space: nowrap;
}

    .btn-mobile-action:hover {
        background-color: #e9ecef;
    }

/* Responsive */
@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

@media (max-width: 991px) {
    .sidebar-content-sticky {
        position: static;
    }

    .sticky-action-buttons {
        position: static;
    }

    .chart-container {
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }

    .action-buttons-desktop {
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }

    .result-text-content {
        margin-bottom: 30px;
    }

    .slider-image-content {
        max-height: 220px;
        max-width: 400px;
    }

    .carousel-item {
        min-height: 260px;
    }
}

@media (max-width: 767px) {
    .image-slider-section {
        padding: 20px 0 40px 0;
        max-height: 100%;
    }

    .result-content-section {
        padding-top: 25px;
    }

    .result-text-content h1 {
        font-size: 1.8rem;
    }

    .chart-container {
        max-width: 100%;
    }

    .action-buttons-desktop {
        max-width: 100%;
    }

    .sidebar-container.order-1 {
        margin-bottom: 30px;
    }

    .slider-image-content {
        max-height: 200px;
        max-width: 360px;
    }

    .result-carousel-indicators {
        bottom: -28px;
    }

    .carousel-item {
        min-height: 240px;
    }
}

@media (max-width: 575px) {
    html {
        font-size: 15px;
    }

    .image-slider-section {
        padding: 15px 0 35px 0;
        max-height: 168px;
    }

    .result-content-section {
        padding-top: 20px;
    }

    .slider-image-content {
        max-height: 180px;
        max-width: 90%;
    }

    .result-text-content h1 {
        font-size: 1.65rem;
    }

    .result-text-content p, .personality-traits li {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .btn-result-action {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .result-carousel-indicators {
        bottom: -25px;
    }

        .result-carousel-indicators [data-bs-target] {
            width: 8px;
            height: 8px;
        }

    .slide-label {
        font-size: 0.7rem;
        padding: 3px 8px;
        margin-bottom: 10px;
    }

    .mobile-action-bar {
        padding: 8px 5px;
    }

    .btn-mobile-action {
        padding: 8px 5px;
        font-size: 0.75rem;
    }

    .carousel-item {
        min-height: 220px;
    }
}

.img-background {
    position: absolute;
    box-sizing: border-box;
    padding: 0px;
    border: none;
    margin: auto;
    display: block;
    width: 50%;
    z-index: -999;
}

/* --- CSS cho Phần Chia sẻ Kết quả --- */
.share-results-section {
    background-color: #FFFBF0; /* Màu nền giống body hoặc màu mong muốn */
    /* border-top: 1px solid #eee; /* Đường kẻ phân cách phía trên */
}

.share-title {
    font-weight: 600;
    color: #343a40; /* Màu chữ tiêu đề */
    font-size: 1.2rem;
}

.share-buttons-container {
    /* Sử dụng flexbox và gap từ HTML (d-flex, gap-*) */
}

.share-button {
    display: flex; /* Cho phép căn chỉnh bên trong */
    flex-direction: column; /* Icon trên, chữ dưới */
    align-items: center; /* Căn giữa theo chiều ngang */
    text-align: center;
}

.share-icon-background {
    width: 50px; /* Kích thước vòng tròn */
    height: 50px; /* Kích thước vòng tròn */
    background-color: #000; /* Nền đen */
    color: #fff; /* Màu icon trắng */
    border-radius: 50%; /* Bo tròn thành hình tròn */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.25rem; /* Khoảng cách nhẹ giữa icon và chữ */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; /* Hiệu ứng hover */
    border: 2px solid #000; /* Thêm border để khớp hình */
}

    .share-icon-background i {
        font-size: 1.5rem; /* Kích thước icon bên trong */
        line-height: 1; /* Đảm bảo icon căn giữa chuẩn */
    }

.share-label {
    font-size: 0.85rem; /* Cỡ chữ label */
    color: #495057; /* Màu chữ label */
    font-weight: 500;
}

/* Reset style cho link và button */
.share-link,
.share-button-trigger {
    text-decoration: none;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    /* Hiệu ứng hover cho icon */
    .share-link:hover .share-icon-background,
    .share-button-trigger:hover .share-icon-background {
        transform: translateY(-3px) scale(1.05); /* Nhẹ nhàng nâng lên và phóng to */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Thêm bóng đổ */
    }


/* CSS cho tin nhắn feedback sao chép */
.copy-feedback-message {
    position: absolute;
    bottom: -25px; /* Hiện dưới nút */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0; /* Mặc định ẩn */
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; /* Không cho tương tác */
    z-index: 10;
}

    .copy-feedback-message.visible {
        opacity: 1; /* Hiện feedback */
    }

/* --- CSS cho Nút Sidebar Active --- */
/* --- CSS cho Nút Sidebar Active --- */

/* Style mặc định cho các nút (KHÔNG PHẢI primary) */
.sidebar-content-sticky .action-buttons-desktop .btn-result-action:not(.btn-primary-action) {
    background-color: #FBECCA; /* Màu gốc của bạn */
    color: #495057; /* Màu gốc của bạn */
    border-color: #dee2e6; /* Màu gốc của bạn */
    font-weight: 500; /* Độ đậm bình thường */
    opacity: 0.8; /* Hơi mờ đi khi không active */
    transition: opacity 0.3s ease, font-weight 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease; /* Thêm transition */
}

/* Style cho nút Primary ban đầu (Giữ nguyên hoặc đảm bảo đúng màu gốc) */
.sidebar-content-sticky .action-buttons-desktop .btn-primary-action {
    background-color: #ffc107; /* Màu vàng gốc */
    color: #212529; /* Màu chữ gốc */
    border-color: #ffc107; /* Màu border gốc */
    font-weight: 600; /* Có thể đậm hơn nút thường */
    opacity: 1; /* Rõ ràng */
    /* transition đã có ở trên hoặc thêm riêng nếu cần */
}

    .sidebar-content-sticky .action-buttons-desktop .btn-primary-action:hover {
        background-color: #e0a800;
        border-color: #d39e00;
        color: #212529;
        transform: translateY(-2px);
    }


/* Style mới cho nút đang được active (highlight) - KHÔNG đổi màu nền/chữ */
.sidebar-content-sticky .action-buttons-desktop .btn-result-action.active-sidebar-link {
    font-weight: 700; /* Làm chữ đậm hơn đáng kể */
    opacity: 1; /* Hiển thị rõ ràng nhất */
    /* Tùy chọn: Thêm hiệu ứng khác nếu muốn */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* Thêm bóng đổ nhẹ */
    /* Hoặc: */
    /* border-bottom: 3px solid var(--primary-accent-color); */ /* Thêm gạch chân màu */
    /* padding-bottom: calc(0.8rem - 3px); */ /* Điều chỉnh padding nếu thêm border */
}

/* Hover cho nút không active (Đảm bảo đúng style hover gốc) */
.sidebar-content-sticky .action-buttons-desktop .btn-result-action:not(.active-sidebar-link):not(.btn-primary-action):hover {
    background-color: #e9ecef; /* Màu hover gốc? */
    border-color: #ced4da; /* Màu hover gốc? */
    color: #212529; /* Màu hover gốc? */
    opacity: 1; /* Rõ hơn khi hover */
    transform: translateY(-1px); /* Hiệu ứng hover nhẹ */
}

/* Đảm bảo scroll-padding-top vẫn còn */
html {
    /* scroll-behavior: smooth; */
    scroll-padding-top: 90px; /* Điều chỉnh giá trị này nếu cần */
}