/* 彈窗遮罩 */
.modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}


/* 彈窗內容 */

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 540px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* 開始頁面樣式 */

.answer-start {
    padding: 40px 30px;
    text-align: center;
}

.answer-start .fa-question-circle {
    color: #9f353a;
    font-size: 60px;
    margin-bottom: 20px;
}

.answer-start-title {
    font-size: 24px;
    color: #333;
    font-weight: bold;
    margin-bottom: 15px;
}

.answer-start-text {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 30px;
}

.answer-start-button {
    margin-top: 20px;
}

.answer-start-button .gonext {
    display: inline-block;
    padding: 12px 40px;
    background: #9f353a;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.answer-start-button .gonext:hover {
    opacity: 0.8;
}


/* 問卷頁面樣式 */

.answer-faq {
    padding: 20px;
    display: none;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}


/* 進度條樣式 */

.progress-container {
    margin: 20px 0;
    background-color: #ecf0f1;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d3777c, #9f353a);
    border-radius: 10px;
    width: 10%;
    transition: width 0.5s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}


/* 問題容器 */

.question-container {
    display: none;
    padding: 15px 0;
    animation: fadeIn 0.5s ease;
}

.question-container.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.question-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: #9f353a;
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 14px;
}


/* 選擇容器 */

.select-container {
    height: 300px;
    overflow: hidden;
    overflow-y: auto;
}

.select-box {
    flex: 1;
}

.select-container select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    margin-bottom: 10px;
}

.select-container select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}


/* 選項容器 */

.options-container {
    height: 300px;
    overflow: hidden;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .options-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.option-item {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.option-item:hover {
    border-color: #9f353a;
    background-color: #f9f0f0;
}

.option-item.selected {
    border-color: #9f353a !important;
    background-color: #f9f0f0 !important;
}

.checkbox,
.radio {
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio {
    border-radius: 50%;
}

.checkbox.selected::after,
.radio.selected::after {
    content: "";
    width: 10px;
    height: 10px;
    background-color: #9f353a;
}

.checkbox.selected::after {
    border-radius: 2px;
}

.radio.selected::after {
    border-radius: 50%;
}

.checkbox.selected,
.radio.selected {
    border-color: #9f353a;
}

.option-text {
    font-size: 15px;
    flex: 1;
}


/* 價格範圍樣式 */

.range-container {
    padding: 20px 0;
}

.range-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    margin: 20px 0;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #9f353a;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.range-value {
    text-align: center;
    font-size: 18px;
    color: #9f353a;
    font-weight: bold;
    margin-top: 10px;
}


/* 其他輸入框 */

.other-input {
    margin-top: 10px;
    padding: 12px;
    width: 100%;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    box-sizing: border-box;
}

.other-input.show {
    display: block;
}


/* 按鈕容器 */

.button-container {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-prev {
    background-color: #6c757d;
    color: white;
}

.btn-prev:hover:not(:disabled) {
    background-color: #545b62;
}

.modal-content .btn-next,
.btn-submit {
    background-color: #9f353a;
    color: white;
}

.modal-content .btn-next:hover:not(:disabled),
.btn-submit:hover:not(:disabled) {
    opacity: 0.8;
}

.btn:disabled {
    background-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
}


/* 完成頁面 */

.completion-page {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.completion-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
}

.completion-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.completion-message {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.results-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.result-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: bold;
    color: #495057;
    display: inline-block;
    min-width: 120px;
}

.restart-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.restart-btn:hover {
    background: #545b62;
}

@media (max-width: 767px) {
    .option-item {
        padding: 10px 15px;
    }

    .answer-faq {
        padding: 10px 10px;
    }

    .modal-header {
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
}






/* ===== 推薦教練清單容器 ===== */
#coachList {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* ===== 空資料 ===== */
.qa-recommend-x121-empty {
    padding: 24px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ===== 教練卡片 ===== */
.qa-recommend-x121-card {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: box-shadow .2s ease, transform .2s ease;
}

.qa-recommend-x121-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}

/* ===== 頭像 ===== */
.qa-recommend-x121-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    object-fit: cover;
    background: #f3f3f3;
}

/* ===== 右側資訊 ===== */
.qa-recommend-x121-info {
    flex: 1;
    min-width: 0;
}

/* ===== 教練名稱 ===== */
.qa-recommend-x121-name {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    line-height: 1.2;
}

/* ===== 技能標籤區 ===== */
.qa-recommend-x121-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ===== 技能 Tag ===== */
.qa-recommend-x121-skill {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f4f6f8;
    color: #555;
    white-space: nowrap;
}

.qa-recommend-x121-card {
    display: flex;
    text-decoration: none;
    color: inherit;
}

@media (max-width: 767px) {
    #coachList {
        max-height: 50vh;
        margin-bottom: 10px;
    }
}