/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* 移动端优化 */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

/* 应用容器 */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航样式 */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left,
.header-right {
    flex: 0 0 auto;
}

.header-center {
    flex: 1;
    text-align: center;
    padding: 0 10px;
}

.app-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 2px;
}

.vip-status {
    font-size: 0.75rem;
    color: #f59e0b;
}

/* 按钮基础样式 */
.login-btn,
.share-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.login-btn {
    background-color: #ef4444;
    color: white;
}

.share-btn {
    background-color: #3b82f6;
    color: white;
}

.login-btn:hover,
.share-btn:hover {
    opacity: 0.9;
}

/* 主内容区 */
.app-main {
    flex: 1;
    padding: 16px;
}

/* 症状输入区 */
.symptom-section {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.section-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.4;
}

.input-container {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9fafb;
    overflow: hidden;
}

.symptom-input {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #374151;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.symptom-input:focus {
    outline: none;
}

.symptom-input::placeholder {
    color: #9ca3af;
}

/* 功能按钮区 - 调整为8个按钮布局 */
.function-section {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.function-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 手机端2列 */
    gap: 12px;
    margin-top: 16px;
}

/* 8个按钮的响应式布局 */
@media (min-width: 480px) {
    .function-grid {
        grid-template-columns: repeat(2, 1fr); /* 小屏幕保持2列 */
    }
}

@media (min-width: 640px) {
    .function-grid {
        grid-template-columns: repeat(3, 1fr); /* 中屏幕3列 */
    }
}

@media (min-width: 768px) {
    .function-grid {
        grid-template-columns: repeat(5, 1fr); /* 平板端5列 */
    }
}

@media (min-width: 1024px) {
    .function-grid {
        grid-template-columns: repeat(5, 1fr); /* 桌面端保持5列 */
        gap: 16px;
    }
}

/* 功能按钮样式 */
.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;
    opacity: 0.9;
    margin-bottom: 8px;
    width: 100%;
}

.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: 24px;
    height: 24px;
}

.cross-horizontal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 2px;
    background-color: white;
}

.cross-vertical {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    width: 14px;
    height: 2px;
    background-color: white;
}

/* 警示信息 */
.warning-section {
    padding: 0 16px 20px;
}

.warning-box {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 16px;
    font-size: 0.9rem;
    color: #92400e;
    line-height: 1.5;
}

/* 全局取消按钮 */
.global-cancel-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 90;
}

.global-cancel-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.global-cancel-btn:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* 加载中状态 */
.loading-buttons {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* 进度覆盖层 */
.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 185, 129, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    border-radius: 12px;
}

.progress-text {
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-align: center;
    padding: 0 10px;
}

.progress-bar {
    width: 80%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: white;
    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;
    }
}

@media (min-width: 1024px) {
    .function-button {
        min-height: 110px;
        padding: 18px 14px;
    }
    
    .button-title {
        font-size: 1.1rem;
    }
    
    .button-desc {
        font-size: 0.85rem;
    }
}


/* 移动端主内容区滚动支持 - 套用弹窗滑动方案 */
@media (max-width: 768px) {
    .app-main {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    }
    
    /* 添加移动端文案输入区样式 */
    .copywriting-section {
        background-color: white;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .copywriting-section .section-title {
        color: #f59e0b;
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    .copywriting-input {
        width: 100%;
        min-height: 40px;
        padding: 8px 12px;
        border: 1px solid #fbbf24;
        border-radius: 8px;
        font-size: 1rem;
        line-height: 1.5;
        resize: vertical;
        background: #fffbeb;
        color: #333;
        font-family: inherit;
    }
    
    .copywriting-input:focus {
        outline: none;
        border-color: #f59e0b;
    }
    
    .copywriting-input::placeholder {
        color: #f59e0b;
        opacity: 0.7;
    }
}
/* 文件：css/yangshi.css */