/* 基础样式 */
body {
    font-family: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    background-color: #f5f5f7;
    margin: 0;
    padding: 0;
}

/* 响应式容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 新闻展示区 */
.news-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 新闻卡片 */
.news-card {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 特色新闻卡片 */
.featured-news {
    margin-bottom: 10px;
}

.featured-news img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.featured-news .news-content {
    padding: 16px;
}

/* 普通新闻卡片 */
.regular-news {
    padding: 16px;
}

/* 标题 */
.news-title {
    font-weight: bold;
    font-size: 18px;
    margin: 0;
    color: black;
}

.regular-news .news-title {
    font-size: 16px;
}

/* 摘要 */
.news-summary {
    margin-top: 8px;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 标签和来源 */
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.news-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: linear-gradient(135deg, #4CA1AF 0%, #3B7A8B 100%);
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 100px;
    cursor: pointer;
}

.news-source {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.7);
}

/* 评分徽章 */
.score-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    font-weight: bold;
    font-size: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 顶部导航 */
.top-nav {
    background: linear-gradient(135deg, #4CA1AF 0%, #2C3E50 100%);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 20px;
    position: relative;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.nav-actions {
    display: flex;
    gap: 16px;
}

.nav-icon {
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.tag-filters {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none; /* Firefox */
}

.tag-filters::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.tag-filter {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tag-filter.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.tag-filter:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* 底部状态栏 */
.status-bar {
    background-color: white;
    padding: 12px 16px;
    border-radius: 16px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
}

/* 加载中效果 */
.loading {
    text-align: center;
    padding: 40px 0;
    color: rgba(0, 0, 0, 0.5);
}

/* 弹窗样式 */
.popup {
    position: absolute;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.popup.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.calendar-popup {
    top: 60px;
    left: 16px;
    width: 280px;
}

.sort-popup {
    top: 60px;
    right: 16px;
    width: 180px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.popup-title {
    font-weight: bold;
    color: black;
    margin: 0;
}

.popup-close {
    cursor: pointer;
    font-size: 20px;
    color: rgba(0, 0, 0, 0.5);
}

.popup-content {
    padding: 12px 16px;
}

/* 日历样式 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: black;
    border-radius: 50%;
    cursor: pointer;
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: default;
}

.calendar-day.active {
    background: linear-gradient(135deg, #4CA1AF 0%, #2C3E50 100%);
    color: white;
}

.calendar-day:not(.disabled):hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.calendar-weekday {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.5);
    text-align: center;
    margin-bottom: 8px;
}

/* 排序选项 */
.sort-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.sort-option:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sort-option.active {
    background: rgba(76, 161, 175, 0.1);
}

.sort-option-icon {
    margin-right: 8px;
    font-size: 16px;
}

.sort-option-text {
    font-size: 14px;
    color: black;
}

/* 详情页样式 */
.detail-page {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 20px;
}

.detail-hero {
    position: relative;
    height: 300px;
}

.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(0, 0, 0, 0.8));
}

.detail-actions {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
}

.detail-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.detail-title-area {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
}

.detail-title {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 12px 0;
}

.detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-source {
    color: white;
    font-size: 14px;
}

.detail-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-left: 12px;
}

.detail-content {
    padding: 20px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.detail-body {
    line-height: 1.6;
    color: black;
}

.detail-body p {
    margin-bottom: 16px;
}

.detail-related {
    margin-top: 40px;
}

.detail-related-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    color: black;
}

.related-news-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
}

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

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

.related-news-content {
    flex: 1;
}

.related-news-title {
    font-size: 14px;
    font-weight: 500;
    color: black;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.related-news-info {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.5);
}

.related-news-score {
    font-size: 12px;
}

/* 媒体查询 - 响应式布局 */
@media (min-width: 768px) {
    /* 平板和电脑 */
    .news-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .featured-news {
        grid-column: span 2;
    }
    
    .detail-page {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 40px);
    }
    
    .detail-content {
        max-width: 800px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (min-width: 1024px) {
    /* 大屏电脑 */
    .news-container {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .featured-news {
        grid-column: span 3;
        display: flex;
    }
    
    .featured-news img {
        width: 50%;
        height: auto;
    }
    
    .featured-news .news-content {
        width: 50%;
        display: flex;
        flex-direction: column;
    }
    
    .related-news-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 播放按钮样式 */
#play-news-btn {
    color: white;
    cursor: pointer;
}

#play-news-btn:hover {
    color: #f0f0f0;
}

/* 语音播放状态样式 */
.tts-status {
    margin: 20px 0;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #4CA1AF;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#tts-status-text {
    font-size: 14px;
    color: #333;
}

#stop-tts-btn {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}

#stop-tts-btn:hover {
    background: linear-gradient(135deg, #ff1f34 0%, #ff4757 100%);
}

/* 确保按钮在移动端也美观 */
@media (max-width: 768px) {
    .tts-status {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #stop-tts-btn {
        margin-top: 10px;
        align-self: flex-end;
    }
}

/* 播放所有新闻按钮 */
#play-all-btn {
    cursor: pointer;
    transition: transform 0.2s;
}

#play-all-btn:hover {
    transform: scale(1.1);
}

/* 列表页播放状态指示器 */
.list-tts-status {
    margin-top: 12px;
    padding: 10px 15px;
    background: linear-gradient(135deg, rgba(76, 161, 175, 0.1) 0%, rgba(44, 62, 80, 0.1) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 0.3s ease-out;
}

.list-tts-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: white;
}

.list-tts-title {
    font-weight: 500;
    margin-left: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.list-tts-controls {
    display: flex;
    gap: 8px;
}

.list-tts-controls .btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.list-tts-controls .btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

#stop-all-btn {
    background-color: rgba(255, 71, 87, 0.3);
}

#stop-all-btn:hover {
    background-color: rgba(255, 71, 87, 0.5);
}

/* 播放动画指示器 */
.playing-indicator {
    position: relative;
    background-color: rgba(76, 161, 175, 0.2);
    border-left: 3px solid #4CA1AF;
}

/* 媒体查询，确保在移动设备上显示良好 */
@media (max-width: 768px) {
    .list-tts-status {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .list-tts-controls {
        margin-top: 10px;
        align-self: flex-end;
    }
    
    .list-tts-title {
        max-width: 150px;
    }
}

/* 播放进度条样式 */
.progress-container {
    width: 100%;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar-wrapper {
    flex: 1;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4CA1AF 0%, #2C3E50 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-info {
    color: white;
    font-size: 12px;
    min-width: 40px;
    text-align: right;
}

/* 进度条悬停效果 */
.progress-bar-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.progress-bar-wrapper:hover .progress-bar {
    background: linear-gradient(90deg, #5DB9C9 0%, #3D5266 100%);
}

/* 媒体查询 */
@media (max-width: 768px) {
    .list-tts-status {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .progress-container {
        width: 100%;
    }
    
    .list-tts-controls {
        margin-top: 5px;
        align-self: flex-end;
    }
}

.news-link {
    color: inherit;
    text-decoration: none;
    position: relative;
}

.news-link:hover {
    color: #1a73e8;
}

.news-link:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-link:hover:after {
    transform: scaleX(1);
}

/* 详情页链接图标按钮样式 */
.detail-action-btn .news-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
}

.detail-action-btn .news-link:hover {
    color: #1a73e8;
}

.detail-action-btn .news-link:after {
    display: none;
}

/* 有新闻的日期样式 */
.calendar-day.has-news {
    background-color: rgba(76, 161, 175, 0.15);
    border: 1px solid rgba(76, 161, 175, 0.3);
    cursor: pointer;
}

.calendar-day.has-news:hover {
    background-color: rgba(76, 161, 175, 0.3);
}

.calendar-day.has-news.active {
    background: linear-gradient(135deg, #4CA1AF 0%, #2C3E50 100%);
    color: white;
    border: none;
}

/* 上一篇/下一篇导航样式 */
.news-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

.nav-btn {
    background: linear-gradient(135deg, rgba(76, 161, 175, 0.1) 0%, rgba(44, 62, 80, 0.1) 100%);
    border: 1px solid rgba(76, 161, 175, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.nav-btn:hover {
    background: linear-gradient(135deg, rgba(76, 161, 175, 0.2) 0%, rgba(44, 62, 80, 0.2) 100%);
    border-color: rgba(76, 161, 175, 0.3);
}

.prev-btn {
    justify-content: flex-start;
    background: linear-gradient(135deg, rgba(76, 161, 175, 0.15) 0%, rgba(44, 62, 80, 0.1) 100%);
}

.next-btn {
    justify-content: flex-end;
    background: linear-gradient(135deg, rgba(76, 161, 175, 0.1) 0%, rgba(44, 62, 80, 0.15) 100%);
}

.prev-btn:hover {
    background: linear-gradient(135deg, rgba(76, 161, 175, 0.25) 0%, rgba(44, 62, 80, 0.2) 100%);
}

.next-btn:hover {
    background: linear-gradient(135deg, rgba(76, 161, 175, 0.2) 0%, rgba(44, 62, 80, 0.25) 100%);
}

.nav-btn .nav-title {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 161, 175, 0.95) 0%, rgba(44, 62, 80, 0.95) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    text-align: center;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.nav-btn:hover .nav-title {
    opacity: 1;
}

.nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.1);
    border-color: rgba(200, 200, 200, 0.2);
}

.nav-btn.disabled:hover {
    background: rgba(200, 200, 200, 0.1);
    border-color: rgba(200, 200, 200, 0.2);
}

/* 媒体查询-小屏幕适配 */
@media (max-width: 768px) {
    .news-navigation {
        flex-direction: column;
    }
    
    .nav-btn {
        width: 100%;
    }
}

/* 关于我们的新闻链接样式 */
.about-news-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(76, 161, 175, 0.1);
}

.source-link {
    display: inline-flex;
    align-items: center;
    color: #4CA1AF;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    background-color: rgba(76, 161, 175, 0.1);
    transition: all 0.3s;
}

.source-link i {
    margin-right: 5px;
}

.source-link:hover {
    background-color: rgba(76, 161, 175, 0.2);
    color: #2C3E50;
}

/* 信息来源按钮悬停效果 */
#source-info-btn {
    transition: transform 0.2s, color 0.2s;
}

#source-info-btn:hover {
    transform: scale(1.1);
    color: #4CA1AF;
} 