/* 合愉陪诊 - 现代化UI样式 */
:root {
    --primary: #667eea;
    --primary-dark: #5a6fd6;
    --primary-light: #8b9cf7;
    --accent: #34a853;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #fc8181;
    --bg: #f0f4ff;
    --card: rgba(255,255,255,0.85);
    --text: #1a202c;
    --text-light: #718096;
    --border: rgba(255,255,255,0.4);
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 8px 32px rgba(102,126,234,0.15);
    --shadow-sm: 0 4px 16px rgba(102,126,234,0.1);
    --glass: rgba(255,255,255,0.75);
    --glass-border: rgba(255,255,255,0.5);
    --glass-text: #2d3748;
    --glass-text-light: #4a5568;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    color: var(--glass-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.container { max-width: 768px; margin: 0 auto; padding: 0 16px; }

/* ========== 头部 ========== */
header {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: var(--glass-text);
    padding: 16px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
header h1 { font-size: 24px; font-weight: 800; background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { font-size: 14px; opacity: 0.9; }
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logout {
    color: var(--glass-text);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 24px;
    background: rgba(102,126,234,0.1);
    transition: all 0.3s;
    font-weight: 600;
}
.logout:hover { opacity: 1; background: rgba(255,255,255,0.3); }

/* ========== 卡片 ========== */
.card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.6);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    border-color: var(--primary-light);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.btn:active::after {
    width: 300px;
    height: 300px;
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(74,144,217,0.4); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #219a52; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(39,174,96,0.4); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(231,76,60,0.4); }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ========== 状态标签 ========== */
.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.status-pending { background: linear-gradient(135deg, #fff3e0, #ffe0b2); color: #e65100; }
.status-paid { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: #1565c0; }
.status-accepted { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #2e7d32; }
.status-pending_confirm { background: linear-gradient(135deg, #f3e5f5, #e1bee7); color: #7b1fa2; }
.status-completed { background: linear-gradient(135deg, #e8f5e9, #a5d6a7); color: #1b5e20; }
.status-cancelled { background: linear-gradient(135deg, #fafafa, #e0e0e0); color: #616161; }
.status-complaint { background: linear-gradient(135deg, #fce4ec, #f8bbd0); color: #c62828; }

/* ========== 表单 ========== */
.form {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.12);
    border: 1px solid rgba(255,255,255,0.6);
}
.fg { margin-bottom: 20px; position: relative; }
.fg label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    transition: all 0.3s;
}
.fg input, .fg select, .fg textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(102,126,234,0.2);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all 0.3s;
    background: rgba(255,255,255,0.9);
    color: var(--glass-text);
}
.fg input:focus, .fg select:focus, .fg textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
    background: #fff;
}
.fg input::placeholder { color: #bdbdbd; }

/* ========== 服务卡片 ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.service-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255,255,255,0.5);
    text-align: center;
}
.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: var(--primary);
}
.service-card .icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
    transition: transform 0.3s;
}
.service-card:hover .icon { transform: scale(1.2) rotate(5deg); }
.service-card h3 { font-size: 16px; margin-bottom: 6px; font-weight: 700; }
.service-card p { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.price {
    font-weight: 800;
    font-size: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.duration {
    font-size: 12px;
    color: var(--glass-text-light);
    background: rgba(102,126,234,0.08);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

/* ========== 详情列表 ========== */
.detail-list { padding: 8px 0; }
.detail-list .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.detail-list .row:last-child { border-bottom: none; }
.detail-list .row:hover { background: rgba(74,144,217,0.03); }
.detail-list .row span:first-child { color: var(--text-light); font-size: 14px; }
.detail-list .row span:last-child { font-weight: 600; font-size: 14px; }

/* ========== 底部导航 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 16px;
    box-shadow: 0 -4px 24px rgba(102,126,234,0.1);
    z-index: 100;
    border-top: 1px solid rgba(255,255,255,0.5);
}
.bottom-nav a {
    text-align: center;
    text-decoration: none;
    color: var(--glass-text-light);
    font-size: 11px;
    padding: 8px 16px;
    border-radius: 16px;
    transition: all 0.3s;
    font-weight: 500;
}
.bottom-nav a.active {
    color: #667eea;
    background: rgba(102,126,234,0.15);
    font-weight: 700;
}
.bottom-nav a:hover { color: var(--primary); }
.nav-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 2px;
    line-height: 1;
    transition: transform 0.3s;
}
.bottom-nav a:hover .nav-icon { transform: scale(1.2); }

/* ========== 订单号 ========== */
.order-no {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 13px;
    color: var(--text-light);
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 6px;
}

/* ========== 加载动画 ========== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== 骨架屏 ========== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ========== Toast提示 ========== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-success { background: linear-gradient(135deg, #27ae60, #2ecc71); color: #fff; }
.toast-error { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; }
.toast-info { background: linear-gradient(135deg, #3498db, #2980b9); color: #fff; }

/* ========== 响应式设计 ========== */
@media (max-width: 480px) {
    .services-grid { grid-template-columns: 1fr; }
    .card { padding: 16px; }
    .btn { padding: 10px 20px; }
    header h1 { font-size: 20px; }
}

@media (min-width: 768px) {
    .container { padding: 0 24px; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========== 深色模式（可选） ========== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a2e;
        --card: #16213e;
        --text: #eee;
        --text-light: #a0a0a0;
        --border: #2a2a4a;
    }
    .card { border: 1px solid var(--border); }
}

/* ========== 无障碍/大字体模式 ========== */
.large-font { font-size: 18px !important; }
.large-font .card { padding: 24px !important; }
.large-font .btn { padding: 16px 32px !important; font-size: 18px !important; }
.large-font input, .large-font select, .large-font textarea { font-size: 18px !important; padding: 16px !important; }
.large-font .nav-icon { font-size: 32px !important; }
.large-font .bottom-nav a { font-size: 14px !important; }
.large-font .status { font-size: 14px !important; padding: 6px 14px !important; }
