/* SPA应用样式 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --gray-color: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
}

/* 通用样式 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
}

.back-btn:active {
    background: var(--light-gray);
}

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

/* 首页样式 */
.home-page {
    padding-bottom: 80px;
}

.home-header {
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

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

.location-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.location-badge svg {
    width: 16px;
    height: 16px;
}

.search-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    padding: 10px 16px;
    border-radius: 20px;
    color: #999;
}

.search-card input {
    border: none;
    background: transparent;
    flex: 1;
    outline: none;
    font-size: 14px;
}

.welcome-card {
    margin: 16px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.welcome-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.welcome-card p {
    margin: 0 0 16px;
    color: var(--gray-color);
    font-size: 14px;
}

.user-stats-row {
    display: flex;
    justify-content: space-around;
}

.user-stat-item {
    text-align: center;
}

.user-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.user-stat-label {
    font-size: 12px;
    color: var(--gray-color);
}

/* 快捷入口 */
.quick-entry-section {
    padding: 0 16px;
    margin-top: 20px;
}

.quick-entry-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-entry-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--white);
    border-radius: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.quick-entry-item:active {
    transform: scale(0.95);
}

.quick-entry-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-entry-icon svg {
    width: 24px;
    height: 24px;
}

.quick-entry-text {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

/* Banner */
.banner-section {
    margin: 16px;
}

.banner-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 160px;
    cursor: pointer;
}

.banner-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--white);
}

.banner-overlay h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.banner-overlay p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* 通用卡片 */
.section-card {
    background: var(--white);
    margin: 16px;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
}

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

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

.section-more {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
}

/* 线路卡片 */
.line-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.line-card-cover {
    position: relative;
    height: 120px;
}

.line-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.line-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.line-card-body {
    padding: 12px;
}

.line-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.line-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-color);
}

/* 任务卡片 */
.task-list {
    padding: 0 16px;
}

.task-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.task-card-cover {
    height: 120px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.task-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.task-card-body {
    padding: 12px;
}

.task-card-body h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.task-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-color);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-color);
}

.empty {
    text-align: center;
    padding: 40px;
    color: var(--gray-color);
}

.error {
    text-align: center;
    padding: 40px;
    color: var(--danger-color);
}

/* 登录页 */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-logo {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
}

.login-page h1 {
    text-align: center;
    color: var(--white);
    margin: 0 0 8px;
}

.login-subtitle {
    text-align: center;
    color: rgba(255,255,255,0.8);
    margin: 0 0 40px;
}

.login-form {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
}

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

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
}

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

.code-group {
    display: flex;
    gap: 12px;
}

.code-group input {
    flex: 1;
}

.code-btn {
    padding: 14px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
}

.code-btn:disabled {
    background: var(--gray-color);
}

.login-footer {
    margin-top: 24px;
    text-align: center;
}

.login-footer p {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

/* 用户中心 */
.user-page {
    padding-bottom: 80px;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h2 {
    margin: 0;
    font-size: 18px;
}

.user-info p {
    margin: 4px 0 0;
    opacity: 0.8;
}

.user-stats {
    display: flex;
    padding: 16px;
    background: var(--white);
}

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

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

.stat-label {
    font-size: 12px;
    color: var(--gray-color);
}

.menu-list {
    margin-top: 16px;
    background: var(--white);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--light-gray);
    cursor: pointer;
}

.menu-item:active {
    background: var(--light-gray);
}

.menu-item svg {
    color: var(--gray-color);
}

.menu-item span {
    flex: 1;
    font-size: 14px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid #e5e7eb;
}

.btn-block {
    width: 100%;
}

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

/* 任务详情 */
.task-detail-page {
    padding-bottom: 80px;
}

.task-cover {
    height: 200px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.task-info {
    background: var(--white);
    padding: 20px;
    margin: -20px 16px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.task-title {
    margin: 0;
    font-size: 20px;
    flex: 1;
    padding-right: 16px;
}

.task-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--danger-color);
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--gray-color);
}

.task-meta-item svg {
    width: 16px;
    height: 16px;
}

.task-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.task-tag {
    padding: 4px 12px;
    background: var(--light-gray);
    border-radius: 4px;
    font-size: 12px;
    color: var(--gray-color);
}

.task-description {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

/* 玩法规则 */
.rule-section {
    margin: 16px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.rule-title {
    margin: 0 0 16px;
    font-size: 16px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #374151;
}

.rule-number {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* 操作按钮 */
.action-buttons {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--white);
    display: flex;
    gap: 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.btn-group {
    display: flex;
    gap: 12px;
}

.btn-group .btn {
    flex: 1;
}

/* 线路页 */
.lines-page {
    padding-bottom: 80px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    padding: 16px;
    overflow-x: auto;
    background: var(--white);
}

.filter-item {
    padding: 8px 16px;
    background: var(--light-gray);
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.filter-item.active {
    background: var(--primary-color);
    color: var(--white);
}

/* 地图页 */
.map-page {
    height: 100vh;
}

#map-container {
    width: 100%;
    height: 100%;
}

.map-controls {
    position: absolute;
    right: 16px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-control-btn {
    width: 44px;
    height: 44px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.point-card {
    position: absolute;
    bottom: 80px;
    left: 16px;
    right: 16px;
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* 活动页 */
.activity-page,
.achievements-page,
.messages-page,
.vip-page,
.mall-page,
.team-page,
.game-page {
    padding-bottom: 80px;
}

.activity-list,
.achievement-list,
.message-list,
.vip-levels,
.product-list,
.team-list,
.game-list {
    padding: 16px;
}

.activity-card,
.achievement-card,
.message-card,
.vip-level-card,
.product-card,
.team-card,
.game-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-icon,
.achievement-icon,
.game-icon {
    font-size: 32px;
}

.activity-info,
.achievement-info,
.game-info {
    flex: 1;
}

.activity-info h3,
.achievement-info h3,
.game-info h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.activity-info p,
.achievement-info p,
.game-info p {
    margin: 0;
    font-size: 14px;
    color: var(--gray-color);
}

.achievement-card.locked {
    opacity: 0.6;
}

.achievement-reward {
    color: var(--warning-color);
    font-size: 14px;
    font-weight: 600;
}

.message-card.unread {
    background: #f0f9ff;
}

.message-title {
    font-size: 14px;
    font-weight: 600;
}

.message-content {
    font-size: 14px;
    color: var(--gray-color);
    margin-top: 4px;
}

.message-time {
    font-size: 12px;
    color: var(--gray-color);
    margin-top: 4px;
}

.product-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    flex: 1;
}

.product-info h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.product-info p {
    margin: 0;
    font-size: 12px;
    color: var(--gray-color);
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--danger-color);
}

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

.team-members {
    font-size: 14px;
    color: var(--gray-color);
    flex: 1;
}

/* 会员页 */
.vip-header {
    padding: 40px 20px;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #333;
    text-align: center;
}

.vip-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.vip-header p {
    margin: 0;
    font-size: 14px;
}

.vip-level-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.vip-level-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.vip-price {
    font-size: 24px;
    font-weight: 600;
    color: var(--danger-color);
    margin-bottom: 8px;
}

.vip-benefits {
    font-size: 14px;
    color: var(--gray-color);
    margin-bottom: 16px;
}

/* 404页面 */
.not-found-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.not-found-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.not-found-page h2 {
    margin: 0 0 8px;
}

.not-found-page p {
    color: var(--gray-color);
    margin-bottom: 24px;
}

/* 底部导航 */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}
