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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.logo h1 {
    font-size: 24px;
    color: #667eea;
}

.user-info {
    text-align: right;
}

.user-info .nickname {
    font-weight: bold;
    color: #333;
}

.user-info .phone {
    font-size: 12px;
    color: #666;
}

/* 主内容区 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 车辆状态 */
.status-section {
    margin-top: 20px;
}

.status-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-label {
    font-size: 12px;
    color: #666;
}

.status-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.status-value.warning {
    background: #ffa502;
    color: #333;
}

.status-info {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.info-label {
    font-size: 13px;
    color: #666;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: #667eea;
}

/* 驾驶监测 */
.monitor-section {
    margin-top: 20px;
}

.monitor-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.monitor-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.monitor-label {
    font-size: 12px;
    color: #666;
}

.monitor-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.badge {
    background: #ff4757;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 车辆卡片 */
.car-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.car-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.car-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.car-card.selected {
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #e8f0fe 0%, #dce7fe 100%);
}

.car-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #ddd;
}

.car-details {
    flex: 1;
}

.car-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.car-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #666;
}

.car-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.car-plate {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.car-status {
    margin-top: 8px;
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.engine-code {
    color: #666;
    font-size: 11px;
}

.vin-code {
    color: #666;
    font-size: 11px;
}

.status-online {
    background: #2ed573;
    color: white;
}

.status-offline {
    background: #ff4757;
    color: white;
}

.status-locked {
    background: #2ed573;
    color: white;
}

.status-unlocked {
    background: #ff4757;
    color: white;
}

/* 远程控制 */
.control-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.control-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.control-btn:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.control-btn:active {
    transform: scale(0.98);
}

.control-btn .icon {
    font-size: 28px;
}

.control-btn span:last-child {
    font-size: 14px;
}

/* 消息列表 */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.message-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #667eea;
}

.message-item.unread {
    border-left-color: #ff4757;
    background: #fff5f5;
}

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

.message-title {
    font-weight: bold;
    color: #333;
}

.message-time {
    font-size: 12px;
    color: #999;
}

.message-content {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 提示框 */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 响应式 */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .user-info {
        text-align: center;
    }

    .car-card {
        flex-direction: column;
    }

    .car-image {
        width: 100%;
        height: 150px;
    }

    .control-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 车辆功能配置 */
.config-section {
    margin-top: 20px;
}

.config-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.config-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.config-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.config-status.enabled {
    background: #2ed573;
    color: white;
}

.config-status.disabled {
    background: #ff4757;
    color: white;
}

.config-status.unknown {
    background: #747d8c;
    color: white;
}
