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

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f0f9f0;
    color: #333;
}

.container {
    width: 100%;
    max-width: 400px; /* 与home页面保持一致 */
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background-color: #4CAF50;
    border-bottom: none;
    font-size: 12px;
    color: #fff;
}

.header-left .location i {
    color: #fff;
    margin-right: 5px;
}

.header-right span {
    margin-left: 10px;
}

.header-right .battery i {
    color: #fff;
}

/* App Bar */
.app-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #4CAF50;
}

.app-bar-left {
    display: flex;
    align-items: center;
}

.app-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    color: #fff;
}

.app-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.app-bar-right {
    font-size: 20px;
    color: #fff;
}

/* 导航标签 */
.nav-tabs {
    display: flex;
    overflow-x: auto;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 8px;
    -webkit-overflow-scrolling: touch;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 12px 10px;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-right: 4px;
}

.tab.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    font-weight: 500;
}

.tab.more-tabs {
    font-size: 16px;
    color: #999;
}

/* 新闻列表 */
.news-list {
    padding: 8px;
}

.news-item {
    display: flex;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fff;
    margin-bottom: 8px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.news-image {
    width: 100px;
    height: 75px;
    margin-right: 12px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

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

.video-image .video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.news-content {
    flex: 1;
    min-width: 0;
}

.news-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.news-source {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
}

/* 筛选控件 */
.filter-section {
    background-color: #fff;
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 8px;
    border-radius: 8px;
}

.select-group {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.select-group label {
    font-size: 14px;
    color: #666;
    margin-right: 10px;
    min-width: 50px;
}

.province-select {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0;
    background-color: #fff;
    margin-top: 10px;
    border-radius: 8px;
}

.pagination button {
    padding: 8px 12px;
    margin: 0 5px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover {
    background-color: #f5f5f5;
}

.pagination button.active {
    background-color: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    font-size: 14px;
    margin: 0 10px;
    color: #666;
}

/* 餐厅列表 */
.restaurants-list {
    padding: 0;
}

/* 底部导航栏 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid #eee;
    background-color: #fff;
    position: sticky;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 10px;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

.nav-item.active {
    color: #4CAF50;
}

/* 驻京机构列表样式 */
.chambers-list {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chamber-item {
    background-color: #fff;
    border: 1px solid #f0f0f0;
    padding: 15px;
    margin-bottom: 0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    flex: 1 1 calc(50% - 4px); /* 50%宽度减去间距 */
    min-width: calc(50% - 4px);
    box-sizing: border-box;
}

.chamber-item:hover {
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: none;
}

.chamber-name {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* 知识库详情页样式 */
.knowledge-detail-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.knowledge-header {
    margin-bottom: 20px;
}

.knowledge-image {
    margin-bottom: 15px;
}

.knowledge-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.knowledge-info {
    padding: 0 5px;
}

.knowledge-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.knowledge-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.knowledge-content {
    padding: 0 5px;
}

.detail-section {
    margin-bottom: 25px;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-section h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #4CAF50;
    display: flex;
    align-items: center;
}

.detail-section h3 i {
    margin-right: 8px;
}

.content-body {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.content-body h4 {
    font-size: 15px;
    font-weight: bold;
    margin: 15px 0 10px;
    color: #2c3e50;
}

.content-body p {
    margin-bottom: 10px;
    text-align: justify;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.related-item:hover {
    background-color: #e8f5e8;
}

.related-image {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
}

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

.related-content {
    flex: 1;
    min-width: 0;
}

.related-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-meta {
    font-size: 12px;
    color: #666;
}

.chamber-info {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.chamber-info .province {
    font-weight: 500;
}

.chamber-info .category {
    background-color: #f0f8ff;
    color: #1890ff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* 餐厅详情页样式 */
.restaurant-detail-container {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
}

.restaurant-header {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.restaurant-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.restaurant-info {
    padding: 15px;
}

.restaurant-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.restaurant-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.restaurant-province {
    background-color: #f5f5f5;
    padding: 2px 8px;
    border-radius: 3px;
}

.restaurant-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.detail-section h3 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h3 i {
    color: #4CAF50;
}

.detail-item {
    display: flex;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: flex-start;
}

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

.detail-label {
    font-size: 14px;
    color: #666;
    min-width: 60px;
    margin-right: 10px;
    padding-top: 2px;
}

.detail-value {
    font-size: 14px;
    color: #333;
    flex: 1;
    line-height: 1.5;
}

.dishes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dish-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.dish-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.dish-price {
    font-size: 14px;
    color: #FF5722;
    font-weight: 500;
}

.restaurant-actions {
    display: flex;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 15px;
    gap: 10px;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
}

.action-btn i {
    font-size: 16px;
}

.call-btn {
    background-color: #4CAF50;
}

.call-btn:hover {
    background-color: #43a047;
}

.map-btn {
    background-color: #2196F3;
}

.map-btn:hover {
    background-color: #1976D2;
}

.order-btn {
    background-color: #FF5722;
}

.order-btn:hover {
    background-color: #e64a19;
}

.loading, .no-data {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 14px;
}

/* 返回按钮样式 */
.back-btn {
    margin-right: 10px;
    cursor: pointer;
    font-size: 18px;
}

/* 收藏和分享按钮样式 */
.app-bar-right i {
    margin-left: 15px;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
}

.app-bar-right i:hover {
    color: rgba(255, 255, 255, 0.8);
}
