/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background-color: #f5f5f5;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* 主容器 */
.main-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: #fff;
    position: relative;
    padding-bottom: 60px;
    padding-left: 15px;
    padding-right: 15px;
}

/* 顶部橙色栏 */
.header {
    background: linear-gradient(135deg, #FF9A2E 0%, #FF7D00 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(255, 125, 0, 0.2);
}

.header-content {
    margin-bottom: 10px;
}

.header-content .brand-name {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
    animation: brandPulse 3s ease-in-out infinite;
}

/* 品牌名称动效 */
@keyframes brandPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.header-content .subtitle {
    font-size: 18px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    line-height: 1.4;
}

.header-content .description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    font-weight: normal;
}

.user-status {
    position: absolute;
    top: 15px;
    right: 20px;
}

/* 头部登录按钮 */
.login-btn-header {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn-header:hover {
    background-color: white;
    color: #FF7D00;
    transform: translateY(-2px);
}

.login-btn-header:active {
    background-color: #FF6A00;
    color: white;
    transform: translateY(0);
}

/* 页面切换 */
.page {
    display: none;
    padding: 15px 0;
}

.page.active {
    display: block;
}

/* 欢迎语区域 */
.welcome-box {
    background-color: #FFF5E6;
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    text-align: center;
}

.welcome-text {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.sub-text {
    font-size: 16px;
    color: #666;
}

/* 6大服务分类网格 */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.category-item {
    width: 31%;
    background-color: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 16px;
    padding: 20px 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.category-item:hover {
    border-color: #FF7D00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 125, 0, 0.15);
}

.category-item:active {
    transform: scale(0.98);
}

.category-icon {
    font-size: 40px;
    line-height: 1;
    background-color: #FFF5E6;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

/* 分类图标颜色 */
.category-item[data-category="home"] .category-icon {
    color: #FF7D00;
}

.category-item[data-category="food"] .category-icon {
    color: #9B59B6;
}

.category-item[data-category="life"] .category-icon {
    color: #3498DB;
}

.category-item[data-category="medical"] .category-icon {
    color: #E74C3C;
}

.category-item[data-category="rehab"] .category-icon {
    color: #F1C40F;
}

.category-item[data-category="health"] .category-icon {
    color: #FF69B4;
}

.category-name {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    transition: all 0.3s;
}

/* 悬停效果 */
.category-item:hover .category-icon {
    background-color: #FF7D00;
    color: white;
    transform: scale(1.1);
}

.category-item:hover .category-name {
    color: #FF7D00;
}

/* 客服与员工登录区 */
.help-box {
    background-color: #F8F8F8;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
}

.help-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
}

.phone-link {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #FF7D00;
    text-decoration: none;
    margin-bottom: 16px;
}

.staff-login {
    display: block;
    font-size: 16px;
    color: #FF7D00;
    text-decoration: none;
}

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.back-btn {
    background-color: #f5f5f5;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.3s;
}

.back-btn:hover {
    background-color: #e0e0e0;
}

.page-header h2 {
    font-size: 24px;
    color: #333;
}

/* 表单样式 */
.form-box {
    background-color: #fafafa;
    padding: 25px;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.required {
    color: #FF6B6B;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #FF7D00;
}

/* 价格信息 */
.price-info {
    background-color: #FFF8F0;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    text-align: center;
}

.price-info p {
    font-size: 18px;
    margin-bottom: 5px;
}

.price-info strong {
    font-size: 24px;
    color: #FF7D00;
}

.subsidy-info {
    font-size: 14px;
    color: #666;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 18px;
    font-size: 22px;
    font-weight: bold;
    color: white;
    background-color: #FF7D00;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #E66A00;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* 价格列表 */
.price-list {
    margin-bottom: 25px;
}

.price-item {
    background-color: #fafafa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #FF7D00;
}

.price-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.price-detail {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
}

.price-number {
    font-size: 24px;
    font-weight: bold;
    color: #FF7D00;
}

/* 补贴券说明 */
.subsidy-box {
    background-color: #F0F8E8;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 25px;
}

.subsidy-box h3 {
    font-size: 20px;
    color: #5A8F2A;
    margin-bottom: 10px;
}

.subsidy-box p {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

/* 返回首页按钮 */
.back-home-btn {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    color: #666;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.back-home-btn:hover {
    background-color: #e0e0e0;
}

/* 成功页面 */
.success-box {
    text-align: center;
    padding: 50px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: #99CC33;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 25px;
}

.success-box h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
}

.success-box p {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.order-info {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.success-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.back-home-btn,
.view-orders-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.back-home-btn {
    background-color: #FF7D00;
    color: white;
}

.view-orders-btn {
    background-color: #f8f8f8;
    color: #333;
    border: 1px solid #ddd;
}

.back-home-btn:hover {
    background-color: #E66A00;
    transform: translateY(-2px);
}

.view-orders-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.orders-footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

.export-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.export-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #E5E5E5;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-btn {
    background: none;
    border: none;
    flex: 1;
    height: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s;
}

.nav-btn.active {
    color: #FF7D00;
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.nav-btn span:last-child {
    font-size: 14px;
}

/* 提示弹窗 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 18px;
    z-index: 1000;
    display: none;
}

.toast.show {
    display: block;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF7D00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 订单页面样式 */
.orders-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.empty-orders {
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f8f8;
    border-radius: 12px;
    margin: 20px 0;
}

.empty-orders p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.empty-orders .service-btn {
    padding: 15px 30px;
    min-height: auto;
    display: inline-block;
    flex-direction: row;
    font-size: 16px;
    font-weight: 500;
}

.empty-orders .service-btn .btn-text {
    margin: 0;
}

.order-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.order-id {
    font-size: 14px;
    color: #999;
}

.order-status {
    font-size: 14px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 12px;
}

.status-pending {
    background-color: #FFF3E0;
    color: #FF7D00;
}

.status-confirmed {
    background-color: #E3F2FD;
    color: #2196F3;
}

.status-completed {
    background-color: #E8F5E9;
    color: #4CAF50;
}

.status-cancelled {
    background-color: #F5F5F5;
    color: #999;
}

.order-body {
    margin-bottom: 15px;
}

.order-info-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 15px;
}

.order-label {
    color: #666;
    width: 80px;
    flex-shrink: 0;
}

.order-value {
    color: #333;
    flex: 1;
}

.order-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.order-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: white;
    color: #666;
}

.order-btn:hover {
    background-color: #f5f5f5;
}

.order-btn.primary {
    background-color: #FF7D00;
    color: white;
    border-color: #FF7D00;
}

.order-btn.primary:hover {
    background-color: #E66A00;
}

/* 响应式设计 */
@media (max-width: 375px) {
    .header {
        padding: 25px 15px;
    }
    
    .header-content h1 {
        font-size: 26px;
    }
    
    .header-content p {
        font-size: 14px;
    }
    
    .welcome-box {
        padding: 20px 15px;
    }
    
    .welcome-text {
        font-size: 18px;
    }
    
    .sub-text {
        font-size: 14px;
    }
    
    .category-item {
        padding: 15px 8px;
    }
    
    .category-icon {
        font-size: 32px;
    }
    
    .category-name {
        font-size: 14px;
    }
    
    .phone-link {
        font-size: 24px;
    }
    
    .page {
        padding: 12px;
    }
}

@media (max-width: 320px) {
    .category-item {
        width: 48%;
    }
    
    .category-grid {
        justify-content: space-between;
    }
}
