/* 文件：css/zhuyemian.css - 主页面样式（完全保留原有样式） */

/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#app-loading {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#app {
    display: none;
}

/* 🔧 PC端4列布局 - 完全保持原有布局 */
@media (min-width: 769px) {
    .app-main {
        margin-top: 0 !important;
        padding: 10px 15px 5px 15px;
    }
    
    .input-sections-container {
        display: flex;
        flex-direction: row;
        gap: 10px;
        margin-bottom: 10px;
        height: 280px;
        min-height: 280px;
    }
    
    .symptom-column {
        flex: 0 0 35%;
        display: flex;
        flex-direction: column;
        height: 280px;
    }
    
    .copywriting-column {
        flex: 0 0 35%;
        display: flex;
        flex-direction: column;
        height: 280px;
    }
    
    .options-column {
        flex: 0 0 20%;
        display: flex;
        flex-direction: column;
        height: 280px;
    }
    
    .buttons-column {
        flex: 0 0 10%;
        display: flex;
        flex-direction: column;
        gap: 8px;
        height: 280px;
        align-items: center;
        justify-content: flex-start;
        padding-top: 10px;
    }
    
    .symptom-section,
    .copywriting-section,
    .pc-options-container {
        background: white;
        border-radius: 8px;
        padding: 8px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    /* 症状输入区域 - 标题不变，输入框高度改为130px */
    .symptom-section .section-title {
        font-size: 0.85rem;
        font-weight: 600;
        color: #374151;
        margin-bottom: 6px;
        padding-bottom: 5px;
        border-bottom: 1px solid #e5e7eb;
        line-height: 1.2;
        flex-shrink: 0;
    }
    
    .symptom-input {
        width: 100%;
        height: 130px !important;
        min-height: 130px;
        max-height: 130px;
        padding: 8px;
        font-size: 0.8rem;
        line-height: 1.3;
        resize: vertical;
        border: 1px solid #d1d5db;
        border-radius: 4px;
        flex: 1;
    }
    
    /* 患者档案按钮容器 - 在症状输入框下方 */
    .huanzhe-btn-container {
        margin-top: 8px;
        display: flex;
        justify-content: center;
    }
    
    /* 患者档案按钮 - 同其他医疗诊断按钮样式 */
    .huanzhe-btn {
        width: 100%;
        max-width: 180px;
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 8px 12px;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
        height: 38px;
    }
    
    .huanzhe-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    }
    
    .huanzhe-btn:active {
        transform: translateY(0);
    }
    
    .copywriting-section .section-title {
        color: #f59e0b;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 6px;
        padding-bottom: 5px;
        border-bottom: 1px solid #fef3c7;
        line-height: 1.2;
        flex-shrink: 0;
    }
    
    .copywriting-input {
        width: 100%;
        height: 200px !important;
        min-height: 200px;
        max-height: 200px;
        padding: 8px;
        border: 1px solid #fbbf24;
        border-radius: 4px;
        font-size: 0.8rem;
        line-height: 1.3;
        resize: vertical;
        background: #fffbeb;
        color: #333;
        flex-shrink: 0;
    }
    
    .buttons-column .login-btn,
    .buttons-column .share-btn {
        width: 100%;
        max-width: 70px;
        background: #10b981;
        color: white;
        border: none;
        padding: 6px 4px;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 32px;
        min-height: 32px;
        margin-bottom: 4px;
    }
    
    .buttons-column .share-btn {
        background: #3b82f6;
    }
    
    /* 语音播报选项 - 完全保持原样 */
    .buttons-column > div {
        width: 100%;
    }
    
    /* 浮动语音按钮容器 */
    .voice-btn-container {
        position: fixed;
        z-index: 1000;
        cursor: move;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        touch-action: none;
        transition: none;
    }
    
    /* 浮动语音按钮 */
    .floating-voice-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: #10b981;
        color: white;
        border: none;
        font-size: 28px;
        cursor: move;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        border: 3px solid white;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .floating-voice-btn:hover {
        transform: scale(1.05);
    }
    
    .floating-voice-btn:active {
        transform: scale(0.98);
    }
    
    .floating-voice-btn.listening {
        background: #ef4444;
        animation: floatPulse 1.5s infinite;
    }
    
    /* 症状模式光晕 - 绿色 */
    .floating-voice-btn.symptom-mode {
        box-shadow: 0 0 20px 8px rgba(16, 185, 129, 0.5);
    }
    
    /* 文案模式光晕 - 粉色 */
    .floating-voice-btn.copy-mode {
        box-shadow: 0 0 20px 8px rgba(236, 72, 153, 0.5);
    }
    
    @keyframes floatPulse {
        0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
        70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
        100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    }
    
    /* 音量指示器 */
    .volume-indicator {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
        opacity: 0;
        transition: opacity 0.1s ease, transform 0.1s ease;
        pointer-events: none;
        z-index: -1;
    }
    
    /* 波纹容器 */
    .voice-ripple-container {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: -2;
    }
    
    .ripple {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.4);
        animation: ripple 1.5s infinite;
        pointer-events: none;
        opacity: 0;
    }
    
    @keyframes ripple {
        0% {
            width: 0px;
            height: 0px;
            opacity: 0.6;
        }
        100% {
            width: 200px;
            height: 200px;
            opacity: 0;
        }
    }
    
    /* 提示词容器 */
    .voice-tooltip {
        position: fixed;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 8px 16px;
        border-radius: 30px;
        font-size: 0.9rem;
        z-index: 1002;
        pointer-events: none;
        white-space: nowrap;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: opacity 0.2s ease;
        opacity: 0;
    }
    
    .voice-tooltip.show {
        opacity: 1;
    }
    
    .voice-tooltip.symptom-tip {
        background: rgba(16, 185, 129, 0.9);
    }
    
    .voice-tooltip.copy-tip {
        background: rgba(236, 72, 153, 0.9);
    }
    
    /* 隐藏移动端内容 */
    .mobile-sections-container {
        display: none !important;
    }
    
    .function-section {
        margin: 10px 0;
    }
    
    .function-section .section-title {
        font-size: 0.85rem;
        font-weight: 600;
        color: #374151;
        margin-bottom: 8px;
        padding-bottom: 4px;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .warning-section {
        margin: 10px 0;
    }
    
    .warning-box {
        background: #fef3c7;
        border: 1px solid #fbbf24;
        border-radius: 6px;
        padding: 8px;
        font-size: 0.75rem;
        line-height: 1.3;
        color: #92400e;
    }
    
    .global-cancel-container {
        margin-top: 10px;
        display: flex;
        justify-content: center;
    }
    
    .global-cancel-btn {
        background: #ef4444;
        color: white;
        border: none;
        border-radius: 8px;
        padding: 12px 36px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    }
    
    .global-cancel-btn:hover {
        background: #dc2626;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }
}

/* 🔧 移动端样式 - 完全保持原样 */
@media (max-width: 768px) {
    .input-sections-container {
        display: none !important;
    }
    
    .mobile-sections-container {
        display: block !important;
    }
    
    .mobile-buttons-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 16px !important;
        background: white !important;
        border-bottom: 1px solid #e5e7eb !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 100 !important;
    }
    
    .mobile-buttons-bar .login-btn,
    .mobile-buttons-bar .share-btn {
        border: none !important;
        border-radius: 20px !important;
        padding: 8px 20px !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        cursor: pointer !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    .mobile-buttons-bar .login-btn {
        background: #10b981 !important;
        color: white !important;
    }
    
    .mobile-buttons-bar .share-btn {
        background: #3b82f6 !important;
        color: white !important;
    }
    
    .mobile-sections-container .symptom-section {
        margin: 10px 10px 0 10px;
        background: white;
        border-radius: 8px;
        padding: 12px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    }
    
    .mobile-sections-container .symptom-section .section-title {
        font-size: 0.85rem;
        font-weight: 600;
        color: #374151;
        margin-bottom: 8px;
        padding-bottom: 5px;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .mobile-sections-container .symptom-input {
        width: 100%;
        min-height: 120px;
        height: 120px;
        padding: 10px;
        font-size: 0.9rem;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        resize: vertical;
    }
    
    /* 功能区域 - 与上方的症状输入框紧挨着 */
    .function-section {
        margin: 0 0 0 0;
    }
    
    .function-grid {
        margin: 0;
    }
    
    /* 警示语区域 - 与上方的功能区域紧挨着，与下方的文案输入框紧挨着 */
    .warning-section {
        margin: 0 10px 0 10px;
        padding: 0;
    }
    
    .warning-box {
        background: #fef3c7;
        border: 1px solid #fbbf24;
        border-radius: 6px;
        padding: 12px;
        margin: 0;
        font-size: 0.85rem;
        line-height: 1.4;
        color: #92400e;
    }
    
    /* 移动端文案输入框 - 与警示语紧挨着 */
    .mobile-sections-container .copywriting-section {
        margin: 0 10px 0 10px;
        padding: 12px;
        background: white;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    }
    
    .mobile-sections-container .copywriting-section .section-title {
        color: #f59e0b;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 8px;
        padding-bottom: 5px;
        border-bottom: 1px solid #fef3c7;
    }
    
    .mobile-sections-container .copywriting-input {
        width: 100%;
        min-height: 120px;
        height: 120px;
        padding: 10px;
        border: 1px solid #fbbf24;
        border-radius: 6px;
        font-size: 0.9rem;
        background: #fffbeb;
        color: #333;
        resize: vertical;
    }
    
    .voice-btn-container {
        position: fixed;
        z-index: 1000;
        cursor: move;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        touch-action: none;
    }
    
    .floating-voice-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: #10b981;
        color: white;
        border: none;
        font-size: 28px;
        cursor: move;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        border: 2px solid white;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .floating-voice-btn.listening {
        background: #ef4444;
        animation: floatPulse 1.5s infinite;
    }
    
    .floating-voice-btn.symptom-mode {
        box-shadow: 0 0 15px 6px rgba(16, 185, 129, 0.5);
    }
    
    .floating-voice-btn.copy-mode {
        box-shadow: 0 0 15px 6px rgba(236, 72, 153, 0.5);
    }
    
    .voice-tooltip {
        position: fixed;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        z-index: 1002;
        pointer-events: none;
        white-space: nowrap;
        opacity: 0;
        transition: opacity 0.2s ease;
    }
    
    .voice-tooltip.show {
        opacity: 1;
    }
    
    .volume-indicator {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
        opacity: 0;
        transition: opacity 0.1s ease;
        pointer-events: none;
        z-index: -1;
    }
    
    /* 移动端隐藏语音按钮 */
    .voice-btn-container {
        display: none !important;
    }
}

/* ===== 功能按钮样式 ===== */
.function-button {
    background-color: #10b981;
    border: 1px solid #059669;
    border-radius: 12px;
    padding: 16px 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.function-button:hover {
    background-color: #0da271;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.button-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 6px;
    width: 100%;
}

/* 🔥 强制显示按钮描述文字 */
.button-desc {
    font-size: 0.8rem !important;
    color: white !important;
    opacity: 1 !important;
    margin: 4px 0 8px 0 !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
    white-space: normal !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    visibility: visible !important;
}

.button-remaining {
    font-size: 0.85rem;
    color: #ffd700;
    font-weight: 600;
    margin-top: auto;
    width: 100%;
}

/* 十字图标 - 红十字加白色外框（圆圈适配十字大小） */
.cross-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 35px;
    height: 35px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cross-horizontal {
    position: absolute;
    width: 25px;
    height: 8px;
    background-color: #e11b22;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cross-vertical {
    position: absolute;
    width: 25px;
    height: 8px;
    background-color: #e11b22;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
}

/* 进度覆盖层 */
.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 24, 185, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: rgb(255, 255, 255);
    border-radius: 12px;
    z-index: 10;
}

.progress-text {
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-align: center;
    padding: 0 10px;
}

.progress-bar {
    width: 80%;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: rgb(32, 192, 14);
    width: 0%;
    transition: width 0.3s;
}

.progress-percent {
    font-size: 0.85rem;
    font-weight: bold;
}

/* 按钮点击效果 */
.function-button:active {
    transform: scale(0.98);
}

/* 禁用状态 */
.function-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.function-button:disabled:hover {
    background-color: #10b981;
    transform: none;
    box-shadow: none;
}

/* 适配不同屏幕尺寸的按钮高度 */
@media (max-width: 480px) {
    .function-button {
        min-height: 90px;
        padding: 12px 8px;
    }
    
    .button-title {
        font-size: 0.95rem;
    }
    
    .button-desc {
        font-size: 0.75rem !important;
    }
}

@media (min-width: 1024px) {
    .function-button {
        min-height: 110px;
        padding: 18px 14px;
    }
    
    .button-title {
        font-size: 1.1rem;
    }
    
    .button-desc {
        font-size: 0.85rem !important;
    }
}

/* ===== 移动端文案选项样式（新增） ===== */
@media (max-width: 768px) {
    /* 移动端文案选项独立容器 - 确保显示 */
        margin: 0 16px 20px 16px !important;
        background: #f9fafb !important;
        border-radius: 20px !important;
        padding: 20px 16px !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .mobile-option-group {
        flex: 1 !important;
    }
    
    .mobile-option-title {
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
        border-bottom: 2px solid #10b981 !important;
        display: inline-block !important;
    }
    
    .mobile-radio-list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
    }
    
    .mobile-radio-option {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        background: white !important;
        padding: 8px 16px !important;
        border-radius: 30px !important;
        border: 1px solid #e5e7eb !important;
        cursor: pointer !important;
        transition: all 0.2s !important;
    }
    
    .mobile-radio-option input {
        width: 18px !important;
        height: 18px !important;
        cursor: pointer !important;
        accent-color: #10b981 !important;
        margin: 0 !important;
    }
    
    .mobile-radio-label {
        font-size: 14px !important;
        color: #374151 !important;
    }
}
/* 文件：css/zhuyemian.css */
/* ===== 强制移动端文案选项显示 ===== */
@media (max-width: 768px) {
    .copywriting-section {
        overflow: visible !important;
        height: auto !important;
        min-height: 320px !important;
    }
    div[style*="margin: 0 16px 20px 16px"],
    div[style*="background: #f9fafb"] {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-height: 500px !important;
        overflow: visible !important;
    }
}
