/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    max-width: 768px;
    margin: 0 auto;
    position: relative;
}

/* CSS变量定义 */
:root {
    --primary-color: #25d482;
    --secondary-color: #1a9b5b;
    --blue-color: #2680eb;
    --orange-color: #ff7e00;
    --green-color: #25d482;
    --red-color: #ff4757;
    --gray-color: #999;
    --light-gray: #f5f5f5;
    --border-color: #e5e5e5;
    --header-height: 50px;
    --footer-height: 60px;
}

/* 顶部导航栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 15px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.location {
    display: flex;
    align-items: center;
    font-size: 16px;
}

.location i {
    margin-left: 5px;
    font-size: 12px;
    color: var(--gray-color);
}

.message-icon {
    position: relative;
    font-size: 20px;
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: var(--red-color);
    border-radius: 50%;
}

.scan-btn {
    display: flex;
    align-items: center;
    background-color: var(--primary-color);
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
}

.scan-btn i {
    margin-right: 5px;
}

/* 登录提示区 */
.login-prompt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #fff;
    margin-top: 8px;
}

.login-prompt p {
    color: var(--gray-color);
    font-size: 14px;
}

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

/* 服务功能区 */
.services-container {
    background-color: #fff;
    margin-top: 8px;
    padding: 15px 0;
}

.services {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.services:last-child {
    margin-bottom: 0;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
}

.service-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    font-size: 24px;
    color: #fff;
}

.service-icon.taxi {
    background-color: var(--primary-color);
}

.service-icon.carpool {
    background-color: var(--blue-color);
}

.service-icon.bike {
    background-color: var(--orange-color);
}

.service-icon.rent {
    background-color: #9c27b0;
}

.service-icon.job {
    background-color: #00bcd4;
}

.service-icon.loan {
    background-color: #ff9800;
}

.service-icon.delivery {
    background-color: #795548;
}

.service-icon.gas {
    background-color: #ff5722;
}

.service-icon.battery {
    background-color: #607d8b;
}

.service-icon.charge {
    background-color: #e91e63;
}

.service-item span {
    font-size: 12px;
    color: #333;
}

/* 打车模式选择器 */
.mode-selector {
    display: flex;
    background-color: #fff;
    margin-top: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.mode-item {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 16px;
    color: var(--gray-color);
}

.mode-item.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* 地图区域 */
.map-container {
    background-color: #fff;
    margin-top: 8px;
    padding: 15px;
}

.map {
    width: 100%;
    height: 300px;
    background-color: #e8f4ea;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.map-mock {
    width: 100%;
    height: 100%;
    position: relative;
}

.map-grid {
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.map-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.current-location {
    top: 50%;
    left: 50%;
}

.pulse {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    transform: translate(-25%, -25%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-25%, -25%) scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(-25%, -25%) scale(1.5);
        opacity: 0;
    }
}

.map-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.map-label {
    position: absolute;
    font-size: 10px;
    color: #666;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 5px;
    border-radius: 3px;
}

/* 上车地点和目的地 */
.location-inputs {
    margin-top: 15px;
}

.location-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 10px;
}

.location-item:last-child {
    margin-bottom: 0;
}

.location-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.location-dot.green {
    background-color: var(--green-color);
}

.location-dot.orange {
    background-color: var(--orange-color);
}

.location-info {
    flex: 1;
}

.location-label {
    font-size: 12px;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.location-value {
    font-size: 16px;
    color: #333;
}

.location-item i {
    color: var(--gray-color);
    font-size: 16px;
}

/* 广告区域 */
.ad-container {
    background-color: #fff;
    margin-top: 8px;
    padding: 15px;
}

.ad-banner {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.ad-content {
    width: 100%;
    height: 100%;
}

.ad-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 底部导航栏 */
.footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--footer-height);
    background-color: #fff;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 768px;
    margin: 0 auto;
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray-color);
}

.footer-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.footer-item span {
    font-size: 12px;
}

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

/* 响应式设计 */
@media (max-width: 480px) {
    .service-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .map {
        height: 250px;
    }
    
    .location-item {
        padding: 12px;
    }
}