/* 万嘉帮·智能推 样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    padding-bottom: 70px;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    background: linear-gradient(180deg, #f0f9ff 0%, #f9fafb 100%);
}

/* 顶部导航 */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.logo {
    font-size: 18px;
    font-weight: 700;
}

.header-right {
    display: flex;
    gap: 12px;
}

.notification-btn {
    font-size: 20px;
    cursor: pointer;
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: var(--danger-color);
    border-radius: 50%;
}

/* 主内容区 */
.main-content {
    padding: 16px;
    padding-bottom: 80px;
}

/* AI输入区 */
.ai-input-section {
    margin-bottom: 20px;
}

.ai-input-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.ai-greeting {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
}

.ai-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s;
}

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

.example-hints {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hint {
    color: var(--primary-color);
    cursor: pointer;
    padding: 4px 10px;
    background: #eff6ff;
    border-radius: var(--radius-full);
    font-size: 12px;
}

.hint:active {
    background: #dbeafe;
}

/* 订阅区 */
.subscription-section {
    margin-bottom: 20px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
}

.section-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.section-subtitle {
    font-size: 13px;
    color: var(--secondary-color);
    font-weight: 500;
}

.section-more {
    font-size: 13px;
    color: var(--primary-color);
    cursor: pointer;
}

.subscription-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sub-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-full);
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}

.sub-tag:active {
    transform: scale(0.95);
}

.sub-tag .remove {
    width: 16px;
    height: 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
}

.add-sub-btn {
    padding: 8px 14px;
    border: 2px dashed var(--border-color);
    background: transparent;
    border-radius: var(--radius-full);
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.add-sub-btn:active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 推荐区 */
.recommendation-section {
    margin-bottom: 20px;
}

.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommend-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.recommend-card:active {
    transform: scale(0.98);
}

.recommend-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.provider-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.provider-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.provider-name {
    font-size: 16px;
    font-weight: 600;
}

.provider-badge {
    font-size: 11px;
    padding: 2px 6px;
    background: #fef3c7;
    color: #92400e;
    border-radius: var(--radius-sm);
}

.provider-stats {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.match-reason {
    font-size: 13px;
    color: var(--primary-color);
    background: #eff6ff;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.contact-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* 好友动态区 */
.friends-section {
    margin-bottom: 20px;
}

.friends-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friend-activity {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 14px;
    font-weight: 600;
}

.friend-action {
    font-size: 13px;
    color: var(--text-secondary);
}

.service-tag {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-full);
    cursor: pointer;
}

/* 底部导航 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.tab-item.active {
    color: var(--primary-color);
}

.tab-icon {
    font-size: 20px;
}

.tab-label {
    font-size: 11px;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.service-detail-modal {
    max-height: 90vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.close-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* 服务分类 */
.service-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}

.category-item:active {
    background: #e5e7eb;
}

.category-item.selected {
    background: #dbeafe;
    border: 2px solid var(--primary-color);
}

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

.category-name {
    font-size: 13px;
    font-weight: 500;
}

/* 服务详情 */
.service-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.detail-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.detail-info h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.detail-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--secondary-color);
}

.detail-section {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.detail-section h5 {
    font-size: 15px;
    margin-bottom: 10px;
}

.detail-services {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-chip {
    padding: 8px 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    font-size: 13px;
    cursor: pointer;
}

.service-chip:active {
    background: #e5e7eb;
}

.detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
}

.action-btn.secondary {
    background: #fef3c7;
    color: #92400e;
}

/* 通知列表 */
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.notification-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.notification-time {
    font-size: 12px;
    color: var(--text-light);
}

/* AI结果 */
.ai-result-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-result-item {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.ai-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    z-index: 300;
    animation: fadeIn 0.3s;
}

/* 页面切换 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* 订单页样式 */
.orders-section {
    padding-bottom: 80px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 个人中心样式 */
.profile--section {
    padding-bottom: 80px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.profile-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.profile-info p {
    font-size: 13px;
    opacity: 0.8;
}

.profile-stats {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.stat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat- num {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-menu {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 15px;
}

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

.menu-item:active {
    background: var(--bg-primary);
}

.menu-item .arrow {
    color: var(--text-light);
}

/* 社交分享按钮 */
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}