/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary-color: #f59e0b;
    --bg-page: #f0ede6;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-green: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    padding-bottom: 70px;
}

/* 顶部区域 */
.page-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #8b5cf6 100%);
    padding: 8px 16px 10px;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-right {
    display: flex;
    align-items: center;
}

.logo-icon {
    font-size: 18px;
    color: white;
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
    color: white;
}

.header-btn {
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
}

.header-search {
    background: white;
    border-radius: 24px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
}

.search-placeholder {
    color: var(--text-muted);
    font-size: 14px;
}


/* 三个产品入口 */
.index3Prod {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.index3Prod a {
    flex: 1;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.index3Prod a:active {
    transform: scale(0.98);
}

.index3Prod img {
    width: 100%;
    height: auto;
    display: block;
}

/* 区域标题 */
.section {
    margin-bottom: 16px;
}

.section-header {
    margin-bottom: 12px;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 服务网格 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.service-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: conic-gradient(from 0deg, transparent, rgba(234, 179, 8, 0.2), transparent, rgba(234, 179, 8, 0.2), transparent);
    animation: rotatingGold 4s linear infinite;
    opacity: 0.6;
    pointer-events: none;
}

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

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.service-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.service-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.service-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.service-price {
    font-size: 16px;
    font-weight: 700;
    color: #ef4444;
}

.service-price.free {
    color: #10b981;
}

.service-stats {
    font-size: 11px;
    color: var(--text-muted);
}

/* 特色服务列表 */
.feature-services {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

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

.feature-item:active {
    background: #f9fafb;
}

.feature-icon {
    font-size: 28px;
    margin-right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 10px;
}

.feature-info {
    flex: 1;
}

.feature-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.feature-arrow {
    font-size: 20px;
    color: var(--text-muted);
}

/* 优势区域 */
.advantages {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.advantage-item {
    text-align: center;
    padding: 12px;
}

.advantage-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.advantage-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.advantage-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* 底部间距 */
.bottom-spacer {
    height: 20px;
}

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

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    transition: color 0.2s;
}

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

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

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: flex-end;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

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

.modal-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    padding-top: 8px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px 30px;
    border-top: 1px solid var(--border-color);
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.form-row.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* 价格和按�?*/
.price-info {
    text-align: center;
    margin-bottom: 16px;
}

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

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #ef4444;
}

.price-value.free {
    color: #10b981;
}

.pay-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-alipay {
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    color: white;
}

.btn-wechat {
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    color: white;
}

.btn-success {
    background: var(--gradient-green);
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-free {
    background: var(--gradient-green);
    color: white;
    grid-column: span 2;
}

.pay-icon {
    margin-right: 6px;
}

/* 支付页面 */
.modal-pay {
    text-align: center;
}

.pay-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.pay-header h3 {
    color: var(--primary-color);
    padding-top: 0;
}

.pay-body {
    padding: 20px;
}

.order-info {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.order-info p {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.pay-amount {
    font-size: 16px;
    font-weight: 600;
    color: #ef4444 !important;
}

.pay-qrcode {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.pay-qrcode p {
    margin-bottom: 6px;
}

.pay-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 结果页面 */
.modal-result {
    max-height: 90vh;
}

.result-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.result-content {
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--text-primary);
    font-size: 15px;
}

.result-content h1,
.result-content h2,
.result-content h3 {
    color: var(--primary-color);
    margin: 16px 0 8px;
}

/* 历史记录 */
.history-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.order-query-box {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.order-query-box input {
    flex: 1;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.order-query-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.order-query-box .btn {
    padding: 12px 16px;
    white-space: nowrap;
}

.privacy-tip {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 12px;
}

.history-items {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 10px;
}

.history-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.history-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.history-time {
    font-size: 11px;
    opacity: 0.8;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* 滚动�?*/
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

/* PC端适配 */
@media (min-width: 769px) {
    body {
        max-width: 500px;
        margin: 0 auto;
        box-shadow: var(--shadow-lg);
        min-height: 100vh;
    }
    
    .bottom-nav {
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .page-header {
        border-radius: 0 0 20px 20px;
    }
}

/* 隐藏PC端旧导航 */
.nav, .hero, .services, .about, .footer {
    display: none;
}

/* 今日运程样式 */
.fortune-content {
    max-height: 90vh;
}

.fortune-body {
    padding: 0;
}

.fortune-date {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    padding: 20px;
    text-align: center;
    color: white;
}

.lunar-date {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.solar-date {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.almanac {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 13px;
}

.almanac .yi {
    color: #86efac;
}

.almanac .ji {
    color: #fca5a5;
}

.fortune-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.fortune-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.fortune-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.fortune-result {
    min-height: 300px;
}

.fortune-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.fortune-placeholder p {
    margin-bottom: 16px;
    font-size: 15px;
}

/* 运势卡片 */
.fortune-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

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

.fortune-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.fortune-card-score {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fortune-stars {
    color: #f59e0b;
    font-size: 14px;
}

.fortune-comment {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.fortune-indexes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fortune-index {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.fortune-index-bar {
    width: 60px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.fortune-index-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.fortune-tips {
    margin-top: 16px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 10px;
}

.fortune-tips-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.fortune-tips-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.fortune-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ============ 服务独立页面样式 ============ */

.service-hero {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 12px;
    margin-bottom: 16px;
}

.service-hero-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
}

.service-hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-hero-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.service-hero-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.service-hero-price {
    display: inline-block;
    background: white;
    padding: 8px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.service-hero-price .price-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-right: 8px;
}

.service-hero-price .price-value {
    font-size: 18px;
    font-weight: 700;
    color: #ef4444;
}

.service-form-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.service-pay-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.service-pay-section .pay-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.service-info {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.service-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    margin-top: 16px;
}

.service-info h3:first-child {
    margin-top: 0;
}

.service-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.service-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-info li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    padding-left: 16px;
    position: relative;
}

.service-info li:last-child {
    border-bottom: none;
}

.service-info li::before {
    content: '�?;
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* 特色服务图标图片 */
.feature-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* 特色服务链接样式 */
.feature-services a.feature-item {
    text-decoration: none;
    color: inherit;
}

/* 服务卡片链接 */
.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-card-link .service-card {
    margin: 0;
}

/* ============ banner图动�?============ */
.indexBann {
	position: relative;
	float: left;
	width: 100%;
	height: 11.3rem;
	overflow: hidden;
	margin: 0 0 -.5rem 0;
	background: #2c4470 url(../img/wrap-bg.png) no-repeat;
	background-size: 100% auto;
}
.indexBann ul.headline {
	position: absolute;
	width: 100%;
	height: 100%;
	background: url(../img/headline.png) no-repeat;
	background-size: 100% 100%;
}
.indexBann ul.shensha {
	position: absolute;
	left: -.2rem;
	top: 1rem;
	width: 4.3rem;
	height: 4.3rem;
	background: url(../img/shensha-bg.png) no-repeat;
	background-size: 100% 100%;
	transform-origin: center center;
}
.indexBann ul.shensha li {
	position: absolute;
	width: 100%;
	height: 100%;
	background-repeat: no-repeat;
	background-size: 100% 100%;
}
.indexBann ul.shensha li:nth-child(1) {
	background-image: url(../img/shensha1.png);
}
.indexBann ul.shensha li:nth-child(2) {
	background-image: url(../img/shensha2.png);
}
.indexBann ul.shensha li:nth-child(3) {
	background-image: url(../img/shensha3.png);
}
.indexBann ul.shensha li:nth-child(4) {
	background-image: url(../img/shensha4.png);
}
.indexBann ul.shensha li:nth-child(5) {
	background-image: url(../img/shensha5.png);
}
.indexBann ul.plate {
	position: absolute;
	left: .4rem;
	top: 1.6rem;
	width: 3.1rem;
	height: 3.1rem;
	background: url(../img/plate.png) no-repeat;
	background-size: 100% 100%;
}
.indexBann ul.text {
	transform-origin: center center;
}
.indexBann ul.text li {
	position: absolute;
	left: 1.3rem;
	top: 5.7rem;
	width: 3rem;
	height: 2.8rem;
	background-repeat: no-repeat;
	background-size: 100% 100%;
}
.indexBann ul.text li:nth-child(1) {
	background-image: url(../img/text1.png);
}
.indexBann ul.text li:nth-child(2) {
	background-image: url(../img/text2.png);
}
.indexBann ul.text li:nth-child(3) {
	background-image: url(../img/text3.png);
}
.indexBann ul.text li:nth-child(4) {
	background-image: url(../img/text4.png);
}
.indexBann ul.text li:nth-child(5) {
	background-image: url(../img/text5.png);
}
.indexBann ul.line {
	position: absolute;
	left: .8rem;
	top: 5rem;
	width: 1.35rem;
	height: 0;
	overflow: hidden;
}
.indexBann ul.line li {
	display: block;
	width: 100%;
	height: 2rem;
	background: url(../img/line.png) no-repeat;
	background-size: 100% 100%;
}
.indexBann ul.line.height {
	animation: line 1s linear forwards;
}
@keyframes line {
	100% {
		height: 2rem;
	}
}
.main {
	float: left;
	width: 100%;
	padding: 0 .2rem .5rem .2rem;
}
.bigbox {
	float: left;
	width: 100%;
	padding: 0 .28rem .3rem .28rem;
	background: #f9e9d0;
	border: .02rem solid #cba266;
	border-radius: .2rem;
}
.bigbox.bg {
	background: #ffe1b1;
}
