/* 今日早报 - 移动端样式 */

/* CSS Variables */
:root {
    --primary-color: #1E90FF;
    --secondary-color: #4169E1;
    --background-color: #F5F5F5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #E0E0E0;
    --card-bg: #FFFFFF;
    --highlight-color: #FF6B6B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo {
    height: 32px;
    width: auto; /* 保持原始宽高比，不强制正方形 */
    border-radius: 4px;
    object-fit: contain; /* 确保图片不被拉伸变形 */
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-title {
    font-size: 18px;
    font-weight: bold;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-date {
    font-size: 14px;
    opacity: 0.9;
}

/* Tab导航 */
.tabs {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    display: flex;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    z-index: 999;
    -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex: 0 0 auto;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 500;
}

/* 内容区域 */
.content {
    margin-top: 106px; /* header 56px + tabs 50px */
    padding: 12px;
    padding-bottom: 60px;
}

/* 新闻列表 */
.news-list {
    display: none;
}

.news-list.active {
    display: block;
}

/* 新闻卡片 */
.news-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 12px;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
}

.news-card:active {
    transform: scale(0.98);
}

.news-image {
    flex: 0 0 120px;
    width: 120px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    background-color: var(--background-color);
}

.news-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.news-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.news-source {
    color: var(--primary-color);
    text-decoration: none; /* 去掉下划线 */
}

/* 底部工具栏 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
    z-index: 998;
}

/* 加载提示 */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* 关注引导区域 */
.follow-us-section {
    margin: 30px 0;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.follow-us-content {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.follow-us-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.follow-us-content h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.follow-us-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.5;
}

.qrcode-container {
    margin: 25px 0;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qrcode-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qrcode-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}

.follow-us-methods {
    margin: 25px 0;
    text-align: left;
}

.method-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.method-icon {
    font-size: 16px;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.method-text {
    font-size: 14px;
    color: var(--text-primary);
}

.method-text strong {
    color: var(--primary-color);
}

.follow-us-benefits {
    margin-top: 25px;
    text-align: left;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.benefits-title {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding: 5px 0;
    line-height: 1.4;
}

.benefits-list li:last-child {
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .follow-us-section {
        margin: 20px 10px;
        padding: 20px 15px;
    }
    
    .follow-us-content h3 {
        font-size: 18px;
    }
    
    .qrcode-container {
        padding: 15px;
    }
    
    .qrcode-placeholder {
        padding: 20px;
    }
}
