/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.0/font/bootstrap-icons.css");

/* 设备框架样式 */
.device-frame {
    position: relative;
    width: 100%;
    max-width: 414px;
    height: 100vh;
    margin: 0 auto;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

@media screen and (min-width: 415px) {
    body {
        background: #f5f5f5;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .device-frame {
        height: 90vh;
        border-radius: 40px;
        position: relative;
        border: 12px solid #1a1a1a;
        overflow: hidden;  /* 确保内容不会溢出边框 */
    }

    /* 设备内容容器 */
    .device-frame > * {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    /* 刘海屏模拟 */
    .notch {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 200px;
        height: 30px;
        background: #1a1a1a;
        border-bottom-left-radius: 24px;
        border-bottom-right-radius: 24px;
        z-index: 1000;
    }

    .notch-container {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .notch-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .camera {
        width: 12px;
        height: 12px;
        background: #0a0a0a;
        border-radius: 50%;
        border: 2px solid #2a2a2a;
    }

    .speaker {
        width: 60px;
        height: 6px;
        background: #0a0a0a;
        border-radius: 3px;
        border: 1px solid #2a2a2a;
    }
}

/* 状态栏样式 */
.status-bar {
    position: absolute;  /* 改为absolute定位 */
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: transparent;
    z-index: 100;
    pointer-events: none;
}

.status-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-primary);
}

.time {
    font-weight: 600;
    font-size: 14px;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-icons i {
    font-size: 14px;
}

.battery-level {
    font-size: 12px;
    margin-left: 2px;
}

/* 主内容区域 */
.main-content {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 64px; /* 为tabbar预留空间 */
    overflow-y: auto;
    background: var(--background-light);
}

/* 内容容器 */
.content-container {
    min-height: 100%;
    padding-bottom: 64px; /* 为底部tabbar预留空间 */
}

/* 搜索栏 */
.search-bar {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
}

.search-input {
    flex: 1;
    background: var(--background-light);
    border-radius: 24px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input input {
    border: none;
    background: none;
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.search-input input::placeholder {
    color: var(--text-light);
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Banner轮播图 */
.banner-swiper {
    height: 180px;
    margin: 16px;
}

.banner-card {
    position: relative;
    height: 100%;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.banner-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.banner-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px;
}

.banner-info p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

/* 快捷功能区 */
.quick-actions {
    padding: 20px 16px;
    background: white;
    margin-bottom: 12px;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-color);
    transition: transform 0.2s;
}

.quick-action-item:active .icon-wrapper {
    transform: scale(0.95);
}

.quick-action-item span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 路线卡片 */
.section-container {
    padding: 20px 16px;
    background: white;
    margin-bottom: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.view-all {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.route-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.route-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.route-card:active {
    transform: scale(0.98);
}

.route-image {
    position: relative;
    height: 200px;
}

.route-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.route-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.9);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.route-badge.popular {
    color: var(--secondary-color);
}

.route-content {
    padding: 16px;
}

.route-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.route-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.route-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    font-size: 12px;
}

.route-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--background-light);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* 活动卡片 */
.activity-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.activity-image {
    position: relative;
    height: 160px;
}

.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
}

.activity-status.ongoing {
    background: var(--success-color);
}

.activity-content {
    padding: 16px;
}

.activity-time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    font-size: 12px;
    margin-bottom: 8px;
}

.activity-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
}

.activity-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.activity-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-group img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    margin-right: -8px;
}

.avatar-group .more {
    width: 24px;
    height: 24px;
    background: var(--background-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 底部分类导航 */
.category-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 8px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    border-top: 1px solid rgba(0,0,0,0.05);
    margin: 0 12px 12px;
    border-radius: var(--border-radius-md);
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    transition: all 0.2s;
}

.category-item i {
    font-size: 20px;
    color: var(--text-secondary);
}

.category-item span {
    font-size: 12px;
    color: var(--text-secondary);
}

.category-item:active {
    transform: scale(0.95);
}

/* 路线分类 */
.route-categories {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    background: white;
    margin-bottom: 12px;
}

.route-categories .category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.route-categories .category-item i {
    font-size: 24px;
    color: var(--primary-color);
    background: var(--background-light);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.route-categories .category-item span {
    font-size: 12px;
    color: var(--text-secondary);
}

.route-categories .category-item:active i {
    transform: scale(0.95);
}

/* 底部TabBar */
.tab-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.1);
    border-bottom-left-radius: 44px;
    border-bottom-right-radius: 44px;
    z-index: 1000;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-light);
    font-size: 12px;
    gap: 4px;
    padding: 8px 0;
}

.tab-item i {
    font-size: 24px;
}

.tab-item.active {
    color: var(--primary-color);
}

/* 修改图标样式以匹配设计图 */
.tab-item i.bi-house-fill {
    color: #4080FF;
}

.tab-item i.bi-map,
.tab-item i.bi-calendar-event,
.tab-item i.bi-person {
    color: #999;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.route-card, .activity-card {
    animation: fadeIn 0.3s ease-out;
}

/* 滚动条美化 */
.main-content::-webkit-scrollbar {
    width: 4px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
} 

/* 顶部导航栏 */
.top-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: white;
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.back-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    padding: 0;
    margin-right: 8px;
}

.back-btn i {
    font-size: 24px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* 路线列表容器 */
.route-list-container {
    padding: 16px;
}

.route-list-container .route-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
} 

/* 通用变量 */
:root {
    --primary-color: #3B7FFF;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --background-light: #f5f7fa;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    user-select: none;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

/* 移动端点击态 */
@media (hover: none) {
    .point-item:active,
    .action-button:active,
    .map-action-button:active,
    .navigate-btn:active {
        opacity: 0.7;
    }
} 