:root {
    --main-orange: #f45001;
    --main-green: #3ac09a;
    --main-gray: #4d4d4d;
    --main-black: #232323;
    --main-bg: #fff6e5;
    --border-gray: #e3e3e3;
    --highlight-yellow: #ffe088;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    --font-main: 'Noto Sans JP', sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background: var(--main-bg);
    color: var(--main-black);
    width: 430px;
    margin: auto;
}

body {
    background: #fff;
}

.container {
    width: 100%;
    width: 430px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
}

/* Hiển thị mobile-only và ẩn pc-only */
.mobile-only {
    display: inline;
}

.pc-only {
    display: none;
}

/* Header */
.header {
    background: #fff;
    padding: 18px 0 12px 24px;
    border-bottom: 3px solid var(--main-orange);
    font-size: 25px;
    display: flex;
    align-items: center;
}

.header-logo {
    width: 150px;
    cursor: pointer;
}

.header-title {
    color: var(--main-orange);
    font-weight: 700;
    letter-spacing: 0.07em;
}

/* Main Catch */
.catch {
    background: var(--main-bg);
    padding: 18px 22px 1px 22px;
    text-align: center;
}

.catch-head-container {
    text-align: center;
    margin: 0 auto 18px;
    padding-top: 8px;
}

.catch-head-img {
    max-width: 102%;
    height: auto;
    display: inline-block;
    margin: 0 auto;
}

.catch-content {
    position: relative;
    text-align: left;
    min-height: 130px;
    margin-bottom: 5px;
    padding-bottom: 10px;
}

.catch-text-img {
    max-width: 75%;
    height: auto;
    display: block;
    margin-left: -5px;
    position: relative;
    z-index: 1;
}

.catch-person-img {
    position: absolute;
    max-width: 35%;
    height: auto;
    right: -22px;
    top: 0px;
    z-index: 2;
}

.catch-row {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.36;
    margin: 0 0 5px 0;
    text-align: left;
}

.catch-free {
    display: inline-block;
    vertical-align: middle;
    border: 2px solid var(--main-gray);
    border-radius: 7px;
    background: #fff;
    padding: 0px 16px 0px 12px;
    color: var(--main-black);
    font-size: 26px;
    font-weight: 700;
    margin-right: 5px;
    letter-spacing: 0.09em;
    position: relative;
    top: -2px;
    margin-top: 6px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.catch-illust {
    float: right;
    margin-top: -65px;
    margin-right: -14px;
    width: 125px;
    height: 106px;
    background: url('<ここに女性イラストのURLやSVG>') no-repeat center/contain;
    display: inline-block;
}

/* Section doanh nghiệp đặc điểm */
.features-section {
    background: #ffc81a;
    text-align: center;
    padding: 7px 0 12px 0;
    margin: 0;
}

.features-section-title {
    position: relative;
    margin-top: -24px;
    margin-bottom: 5px;
    z-index: 2;
    text-align: center;
}

.tokucho-title-img {
    max-width: 70%;
    height: auto;
    display: inline-block;
}

.features-list {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 10px 15px 10px 15px;
}

.feature-item {
    flex: 1 1 0;
    max-width: 125px;
    display: flex;
    justify-content: center;
}

.tokucho-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 9px 17px 4px;
}

.cta-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.cta-desc {
    color: var(--main-black);
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.cta-warning {
    text-align: center;
    margin: 8px auto 0px auto;
}

.warning-title-img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.cta-note {
    color: #6a6a6a;
    font-size: 13px;
    margin: 0px 0 4px 0;
    line-height: 1.38;
    font-weight: 500;
}

/* Survey Section */
.survey {
    margin: 60px auto 45px auto;
    padding: 0;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-sizing: border-box;
    overflow-y: visible;
}

/* Background chung cho cả 2 trạng thái */
.bg-question, .bg-question2 {
    position: relative;
    width: 100%;
    background: #cba74a;
    border: 2px solid #333;
    border-radius: 16px;
    padding: 0;
    margin: 30px auto 20px;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Tạo phần nền trắng ở giữa */
.bg-question:before, .bg-question2:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    background: #fff;
    border: 2px solid #333;
    border-radius: 12px;
    z-index: 0;
    box-sizing: border-box;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.05);
}

/* Icon phía trên cùng */
.bg-question:after, .bg-question2:after {
    content: '';
    position: absolute;
    top: -31px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 50px;
    background: url(../images/top_question_icon.png) no-repeat center / contain;
    z-index: 5;
}

/* Thêm z-index cho tất cả các phần tử con  */
.bg-question .question-block, 
.bg-question2 .question-block,
.bg-question .new-form-questions,
.bg-question2 .new-form-questions {
    position: relative;
    z-index: 1;
}

/* Loại bỏ CSS không cần thiết cho clip-inner */
.bg-question .clip-inner, .bg-question2 .clip-inner {
    display: none;
}

/* CSS cho khối câu hỏi */
.question-block {
    position: relative;
    padding: 10px 30px 15px 30px;
    margin-bottom: 15px;
    z-index: 1;
}

.bg-question .question-block:first-child {
    padding-top: 30px;
}

/* Tạo dòng phân cách giả lọt vào giữa */
.question-block:not(:last-child):after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 35px;
    right: 35px;
    height: 1px;
    background-color: #333333;
}

.question-block:last-child {
    margin-bottom: 15px;
}

/* Phần câu hỏi tiếp theo */
.new-form-questions {
    position: relative;
    z-index: 1;
    padding-top: 25px;
}

.question-title {
    margin: 5px 0 10px 0;
    text-align: center;
}

.question-img {
    max-width: 50px;
    height: auto;
}

.question-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--main-black);
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

.choices {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px auto 0 auto;
    position: relative;
}

.choice-label {
    color: #555;
    font-size: 15px;
}

.choice-label:first-child {
    text-align: left;
    margin-left: 5px;
}

.choice-label:last-child {
    text-align: right;
    margin-right: 5px;
}

.radio-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Custom Radio Button */
.radio-custom {
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    outline: none;
    background: #fff;
    position: relative;
    margin: 0 4px;
    transition: border-color 0.2s;
    cursor: pointer;
}

/* Kích thước khác nhau - to ở hai bên, nhỏ ở giữa */
.radio-custom:nth-child(1), .radio-custom:nth-child(5) {
    width: 25px;
    height: 25px;
}

.radio-custom:nth-child(2), .radio-custom:nth-child(4) {
    width: 23px;
    height: 23px;
}

.radio-custom:nth-child(3) {
    width: 21px;
    height: 21px;
}

/* Màu sắc cho radio buttons ngay cả khi chưa được check */
.radio-green-dark {
    border: 3px solid #4bc095;
}

.radio-green-light {
    border: 3px solid #8bdfc0;
}

.radio-gray {
    border: 3px solid #7e7e7e;
}

.radio-orange-light {
    border: 3px solid #ffb500;
}

.radio-orange-dark {
    border: 3px solid #f55b01;
}

.radio-custom:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 40%;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.radio-custom:checked:after {
    opacity: 1;
}

.radio-green-dark:checked:after {
    background: #4bc095;
}

.radio-green-light:checked:after {
    background: #8bdfc0;
}

.radio-gray:checked:after {
    background: #7e7e7e;
}

.radio-orange-light:checked:after {
    background: #ffb500;
}

.radio-orange-dark:checked:after {
    background: #f55b01;
}

/* Survey bottom message */
.survey-bottom {
    text-align: center;
    margin: 20px auto 15px auto;
    position: relative;
    z-index: 5;
    padding: 0 20px;
}

.bottom-text-img {
    max-width: 90%;
    height: auto;
    position: relative;
}

/* Button Container */
.btn-container {
    position: relative;
    text-align: center;
    margin: 20px auto 10px;
    padding-bottom: 40px;
    z-index: 5;
}

.hand-img {
    position: absolute;
    left: 30px;
    bottom: 10px;
    width: 65px;
    z-index: 6;
    animation: handWave 0.8s ease-in-out infinite alternate;
}

@keyframes handWave {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-25px);
    }
}

.cta-btn-img {
    max-width: 85%;
    height: auto;
    cursor: pointer;
    position: relative;
    z-index: 5;
    margin-bottom: 30px;
}

/* Footer */
.footer {
    background: #333333;
    color: #fff;
    text-align: center;
    font-size: 13px;
    padding: 12px 11px 13px 11px;
    /* margin-top: 25px; */
    letter-spacing: 0.02em;
    font-weight: 500;
}

.footer a {
    color: #fff;
    text-decoration: underline;
}

/* CSS cho checkbox và input */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 90%;
    margin: 0 auto;
    padding: 0 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 5px 0;
    cursor: pointer;
    position: relative;
    color: #333;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.checkbox-label input[type="checkbox"] + span {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border: 2px solid #FF8A00;
    border-radius: 3px;
    position: relative;
    background-color: #fff;
}

.checkbox-label input[type="checkbox"]:checked + span:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #FF8A00;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.input-group {
    width: 100%;
    margin: 10px auto;
    text-align: center;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #787878;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-input:focus {
    outline: none;
    border-color: #FF8A00;
}

/* Button mới thay thế hình ảnh */
.btn-green {
    display: block;
    width: 300px;
    height: 60px;
    background: #3aba6a;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    box-shadow: 0 6px 0 #309f57;
    text-align: center;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    margin: 0 auto;
    transition: all 0.2s ease;
    position: relative;
    letter-spacing: 0.05em;
}

.btn-green:hover,
.btn-green:focus {
    filter: brightness(1.05);
}

.btn-green:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #309f57;
}

/* Hiệu ứng loading cho nút */
@keyframes loading {
    0% { content: "。"; }
    33% { content: "。。"; }
    66% { content: "。。。"; }
}

.btn-green.loading::after {
    content: "。";
    display: inline-block;
    animation: loading 1.5s infinite;
    margin-left: 5px;
}

.survey-bottom {
    margin-bottom: 30px;
}

.survey-container {
    padding-bottom: 122px;
    background-color: var(--main-bg);
}

/* Hiển thị lỗi validation */
.error-messages {
    width: 90%;
    max-width: 300px;
    margin: 0 auto 15px;
    color: #ff0000;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    padding: 10px;
    border-radius: 5px;
    background-color: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.error-messages ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.error-messages li {
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
    line-height: 1.4;
}

.error-messages li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ff0000;
}

.error-messages li:last-child {
    margin-bottom: 0;
}

/* Style cho input lỗi */
.input-error {
    border: 2px solid #ff0000 !important;
    background-color: rgba(255, 0, 0, 0.03);
}

/* Sửa lỗi hiển thị input date trên iOS */
input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 45px;
    width: 100%;
    /* Thêm biểu tượng lịch ở sau */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23787878' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 35px; /* Để tránh che mất biểu tượng */
    text-align: center;
    font-size: 16px; /* Đảm bảo không bị zoom trên iOS */
    padding: 12px;
    box-sizing: border-box;
}

/* Đảm bảo text của input date hiển thị đầy đủ trên iOS */
input[type="date"]::-webkit-datetime-edit {
    display: inline-block;
    width: auto;
    padding: 0;
    margin: 0;
    text-align: center;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
    margin: 0;
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    color: #333;
}

input[type="date"]::-webkit-inner-spin-button {
    display: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0; /* Ẩn biểu tượng mặc định của trình duyệt */
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

/* Trang Thank You */
.survey-content {
    position: relative;
    z-index: 1;
    padding: 40px 25px 30px;
    text-align: center;
}

.thanks-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

.thanks-message {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
    text-align: center;
}

.highlight-text {
    background-color: #faef40;
    font-weight: 700;
    padding: 2px 5px;
    display: inline;
    margin: 2px 0;
    font-size: 20px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    line-height: 0.5px;
}

.red-text {
    color: #f45001;
    font-weight: 700;
}

.contact-info {
    margin-top: 25px;
    padding: 0px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    font-size: 20px;
    line-height: 1.7;
}

/* Media Queries cho màn hình nhỏ hơn */
@media screen and (max-width: 400px) {
    body, .container {
        width: 100%;
        max-width: 430px;
    }
    .catch-content {
        margin-bottom: -13px;
    }
    .cta-section-title {
        font-size: 16px;
    }
    .cta-note {
        font-size: 12px;
    }
    .features-list {
        padding: 10px 5px 10px 5px;
    }
    
    .feature-item {
        max-width: 110px;
    }
    
    .btn-green {
        width: 90%;
        max-width: 300px;
    }
    
    .question-block {
        padding: 10px 20px 15px 20px;
    }
    
    .checkbox-group {
        max-width: 100%;
        padding: 0 5px;
    }
    
    .catch-text-img {
        max-width: 72%;
    }
    
    .catch-person-img {
        max-width: 33%;
        right: -15px;
    }
    
    .radio-group {
        padding: 0 5px;
    }
    
    .choices {
        padding: 0 5px;
    }
    
    .header {
        padding: 18px 0 12px 15px;
    }
    
    .checkbox-label {
        font-size: 13px;
    }
    
    .bg-question:before, .bg-question2:before {
        left: 10px;
        right: 10px;
        top: 12px;
        bottom: 12px;
    }
    
    .survey-content {
        padding: 40px 15px 30px;
    }
    
    .thanks-title {
        font-size: 20px;
    }
    
    .highlight-text {
        font-size: 18px;
    }
    
    .contact-info {
        font-size: 18px;
    }
    
    /* Giảm padding của các phần tử để tránh scroll ngang */
    .catch {
        padding: 18px 10px 13px 10px;
    }
    
    .catch-head-container {
        width: 100%;
        overflow: hidden;
    }
    
    .catch-head-img {
        max-width: 100%;
    }
    
    /* Đảm bảo bố cục không bị tràn */
    .content-container {
        width: 100%;
        max-width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
    }
}

/* Media query cho kích thước giữa 375px và 430px */
@media screen and (min-width: 360px) and (max-width: 399px) {
    html, body, .container {
        width: 100%;
    }

    .cta-section-title {
        font-size: 15px;
    }
    .cta-note {
        font-size: 11px;
    }
    
    .features-section-title {
        margin-top: -18px;
    }
    .catch-content {
        margin-bottom: -23px;
    }
    
    .tokucho-title-img {
        max-width: 75%;
    }
    
    .warning-title-img {
        max-width: 95%;
    }
    
    .feature-item {
        max-width: 115px;
    }
    
    .bottom-text-img {
        max-width: 95%;
    }
}

/* Media query cho màn hình rất nhỏ */
@media screen and (max-width: 374px) {
    .checkbox-label {
        font-size: 12px;
    }
    
    .feature-item {
        max-width: 100px;
    }
    
    .question-text {
        font-size: 14px;
    }
    
    .choice-label {
        font-size: 14px;
    }
    
    .radio-custom {
        margin: 0 2px;
    }
}

/* Kiểu dáng cho nhóm trường ngày tháng năm */
.birthdate-group {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.date-select {
    flex: 1;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 25px;
    cursor: pointer;
    text-align-last: center;
    font-size: 15px;
}

.line-btn img{
    width: 400px;
    max-width: 100%;
}

/* Đảm bảo văn bản trong select được căn giữa trên iOS */
@supports (-webkit-overflow-scrolling: touch) {
    .date-select {
        text-align: center;
        padding-right: 20px;
    }
}

/* Kiểu dáng khi dropdown được focus */
.date-select:focus {
    outline: none;
    border-color: #FF8A00;
}

/* Kiểu dáng cho nhóm trường ngày tháng năm trên điện thoại di động */
@media screen and (max-width: 430px) {
    .birthdate-group {
        gap: 4px;
    }
    
    .date-select {
        font-size: 14px;
        padding: 10px 5px;
        padding-right: 20px;
        background-position: right 5px center;
    }
}

/* Stacking date selects on very small screens */
@media screen and (max-width: 359px) {
    .birthdate-group {
        flex-direction: column;
        gap: 6px;
    }
    
    .date-select {
        width: 100%;
    }
}