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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

#app {
    max-width: 414px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f5f7fa;
    position: relative;
}

/* 页面切换 */
.page {
    display: none;
    padding-bottom: 70px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

/* 头部 */
.header {
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    color: white;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header h1 {
    font-size: 18px;
    font-weight: 600;
}

.location {
    font-size: 12px;
    opacity: 0.9;
}

.header-back {
    font-size: 20px;
    cursor: pointer;
    padding-right: 10px;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    background: white;
    border-radius: 25px;
    padding: 8px 15px;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
}

.search-bar input::placeholder {
    color: #999;
}

.search-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

/* 内容区域 */
.content {
    padding: 15px;
}

/* 服务分类 */
.categories {
    margin-bottom: 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.category-item {
    background: white;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.category-item span {
    font-size: 12px;
    color: #666;
}

/* 优惠横幅 */
.promo-banner {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: white;
}

.promo-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.promo-tag {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.promo-text {
    font-size: 14px;
    font-weight: 600;
}

.promo-btn {
    background: white;
    color: #FF6B6B;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

/* 热门服务 */
.hot-services h2,
.reviews h2 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

/* 服务列表 */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 15px;
}

.service-info {
    flex: 1;
}

.service-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
}

.service-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.service-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-rating {
    color: #FF6B6B;
    font-size: 12px;
}

.service-duration {
    color: #999;
    font-size: 12px;
}

.service-price {
    color: #FF6B6B;
    font-size: 16px;
    font-weight: 600;
    align-self: center;
}

/* 用户评价 */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.review-avatar {
    width: 36px;
    height: 36px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 10px;
}

.review-user {
    font-size: 14px;
    font-weight: 500;
}

.review-rating {
    color: #FF6B6B;
    font-size: 12px;
    margin-left: auto;
}

.review-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-bar select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* 详情页 */
#detail-content {
    padding: 15px;
}

.detail-banner {
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    color: white;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.detail-banner .banner-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.detail-banner .banner-name {
    font-size: 20px;
    font-weight: 600;
}

.detail-banner .banner-price {
    font-size: 24px;
    margin-top: 10px;
}

.detail-section {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.detail-section h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: #333;
}

.detail-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.detail-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-tag {
    background: #f0f7ff;
    color: #4A90D9;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.detail-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
}

/* 预约页 */
.booking-info {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.booking-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
}

.booking-form {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 80px;
    resize: none;
}

.booking-summary {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.summary-row.discount {
    color: #FF6B6B;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 600;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.submit-btn {
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

/* 订单页 */
.order-tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 15px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tab.active {
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    color: white;
}

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

.order-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

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

.order-status {
    font-size: 12px;
    color: #4A90D9;
    font-weight: 500;
}

.order-status.completed {
    color: #52c41a;
}

.order-status.ongoing {
    color: #FF6B6B;
}

.order-body {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.order-icon {
    width: 40px;
    height: 40px;
    background: #f0f7ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
}

.order-name {
    font-size: 14px;
    font-weight: 500;
}

.order-time {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.order-price {
    font-size: 16px;
    color: #FF6B6B;
    font-weight: 600;
}

.order-btn {
    background: #f0f7ff;
    color: #4A90D9;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

/* 个人中心 */
.profile-card {
    background: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 15px;
}

.username {
    font-size: 18px;
    font-weight: 600;
}

.user-phone {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
}

.profile-stats {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-num {
    font-size: 20px;
    font-weight: 600;
    color: #4A90D9;
}

.stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.profile-menu {
    background: white;
    border-radius: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

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

.menu-icon {
    font-size: 18px;
    margin-right: 12px;
}

.menu-item span:nth-child(2) {
    flex: 1;
    font-size: 14px;
}

.menu-arrow {
    color: #999;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    background: white;
    display: flex;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-icon {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

.nav-item span:last-child {
    font-size: 12px;
    color: #999;
}

.nav-item.active span {
    color: #4A90D9;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 80%;
    max-width: 300px;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

.modal-close {
    cursor: pointer;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
    text-align: center;
}

.modal-body .success-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.modal-body .success-text {
    font-size: 16px;
    color: #333;
}

.modal-body .order-info {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

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

.empty-text {
    font-size: 14px;
}