/**
 * 智能问卷弹窗样式
 * Project 4.0-A - Vibe Marketing 设计
 * 温暖、专业、友好的用户体验
 */

/* ========== 遮罩层 ========== */
.questionnaire-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.questionnaire-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ========== 弹窗主体 ========== */
.questionnaire-modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.questionnaire-overlay.show .questionnaire-modal {
    transform: scale(1) translateY(0);
}

/* ========== 关闭按钮 ========== */
.questionnaire-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.questionnaire-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

/* ========== 头部 ========== */
.questionnaire-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.05), rgba(240, 185, 11, 0.05));
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.questionnaire-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.questionnaire-title {
    font-size: 24px;
    font-weight: bold;
    color: #354157;
    margin: 0 0 10px 0;
}

.questionnaire-subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ========== 问题容器 ========== */
.questionnaire-body {
    padding: 30px;
    min-height: 350px;
    position: relative;
    overflow: visible;
}

/* ========== 问题卡片 ========== */
.question-card {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    opacity: 0;
    transform: translateX(50px);
    pointer-events: none;
    transition: all 0.4s ease;
}

.question-card.active {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.question-card.slide-out {
    opacity: 0;
    transform: translateX(-50px);
    position: absolute;
}

.question-number {
    font-size: 12px;
    font-weight: bold;
    color: #6495ED;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-title {
    font-size: 18px;
    font-weight: bold;
    color: #354157;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.question-hint {
    font-size: 13px;
    color: #999;
    margin: 0 0 20px 0;
}

/* ========== 选项按钮 ========== */
.question-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: white;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

.option-btn:hover {
    border-color: #6495ED;
    background: rgba(100, 149, 237, 0.05);
    transform: translateX(5px);
}

.option-btn.selected {
    border-color: #6495ED;
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.1), rgba(65, 105, 225, 0.05));
    transform: scale(0.98);
}

.option-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.option-text {
    font-size: 15px;
    font-weight: 500;
    color: #354157;
    flex: 1;
    text-align: left;
}

/* ========== 结果页面 ========== */
.result-card {
    text-align: center;
}

.result-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: bounce 1s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.result-title {
    font-size: 24px;
    font-weight: bold;
    color: #354157;
    margin: 0 0 20px 0;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(100, 149, 237, 0.1);
    border-radius: 25px;
    margin-bottom: 20px;
}

.badge-icon {
    font-size: 28px;
}

.badge-text {
    font-size: 16px;
    font-weight: bold;
    color: #6495ED;
}

.result-description {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin: 20px 0 30px;
    text-align: left;
}

.result-actions {
    margin-top: 30px;
}

.result-hint {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* ========== 输入框 ========== */
.contact-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 15px;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.contact-input:focus {
    outline: none;
    border-color: #6495ED;
    background: rgba(100, 149, 237, 0.02);
}

.contact-input::placeholder {
    color: #bbb;
}

/* ========== 提交按钮 ========== */
.submit-btn {
    width: 100%;
    padding: 14px 20px;
    margin-top: 15px;
    background: linear-gradient(135deg, #6495ED, #4169E1);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(100, 149, 237, 0.3);
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4169E1, #354157);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 149, 237, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== 隐私说明 ========== */
.privacy-note {
    font-size: 12px;
    color: #999;
    margin-top: 12px;
    line-height: 1.6;
}

/* ========== 进度条 ========== */
.questionnaire-progress {
    padding: 0 30px 25px;
}

.progress-bar {
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 33.33%;
    background: linear-gradient(90deg, #6495ED, #F0B90B);
    transition: width 0.4s ease;
}

/* ========== 响应式设计 ========== */
@media (max-width: 600px) {
    .questionnaire-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .questionnaire-header {
        padding: 30px 20px 20px;
    }
    
    .questionnaire-icon {
        font-size: 40px;
    }
    
    .questionnaire-title {
        font-size: 20px;
    }
    
    .questionnaire-body {
        padding: 20px;
        min-height: 250px;
    }
    
    .question-card {
        top: 20px;
        left: 20px;
        right: 20px;
    }
    
    .question-title {
        font-size: 16px;
    }
    
    .option-btn {
        padding: 14px 16px;
    }
    
    .option-icon {
        font-size: 20px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .result-icon {
        font-size: 56px;
    }
    
    .result-title {
        font-size: 20px;
    }
    
    .questionnaire-progress {
        padding: 0 20px 20px;
    }
}

/* ========== 滚动条美化 ========== */
.questionnaire-modal::-webkit-scrollbar {
    width: 8px;
}

.questionnaire-modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.questionnaire-modal::-webkit-scrollbar-thumb {
    background: rgba(100, 149, 237, 0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.questionnaire-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 149, 237, 0.6);
}

/* ========== 动画优化 ========== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== 底部选项（不再提示） ========== */
.questionnaire-footer {
    text-align: center;
    padding: 15px 30px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.no-show-again {
    font-size: 13px;
    color: #999;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
}

.no-show-again:hover {
    color: #6495ED;
    background: rgba(100, 149, 237, 0.05);
}

@media (max-width: 600px) {
    .questionnaire-footer {
        padding: 12px 20px 15px;
    }
    
    .no-show-again {
        font-size: 12px;
    }
}

