This commit is contained in:
2025-09-07 22:00:47 +08:00
parent 0a8b20e450
commit c2b2e84416
63 changed files with 1939 additions and 1343 deletions

View File

@@ -109,14 +109,20 @@ body {
backdrop-filter: blur(10px);
}
header {
header, .header {
text-align: center;
margin-bottom: 28px;
padding-bottom: 20px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
header h1 {
.header-icon {
font-size: 3rem;
margin-bottom: 10px;
display: block;
}
header h1, .title {
background: linear-gradient(135deg, #4096ff, #ff7a45);
-webkit-background-clip: text;
background-clip: text;
@@ -127,6 +133,82 @@ header h1 {
letter-spacing: -0.5px;
}
.subtitle {
color: #666;
font-size: 1.1rem;
margin-bottom: 20px;
font-weight: 400;
}
.tab-container {
display: flex;
justify-content: center;
gap: 12px;
margin-bottom: 20px;
flex-wrap: wrap;
}
.tab-btn {
background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
border: none;
padding: 12px 20px;
border-radius: 25px;
cursor: pointer;
font-size: 0.95rem;
font-weight: 500;
color: #666;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 6px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.tab-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.tab-btn.active {
background: linear-gradient(135deg, #4096ff, #40a9ff);
color: white;
box-shadow: 0 4px 16px rgba(64, 150, 255, 0.3);
}
.tab-icon {
font-size: 1.1rem;
}
.refresh-btn {
background: linear-gradient(135deg, #52c41a, #73d13d);
border: none;
padding: 12px 24px;
border-radius: 25px;
color: white;
cursor: pointer;
font-size: 0.95rem;
font-weight: 500;
margin-top: 15px;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 8px;
box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}
.refresh-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(82, 196, 26, 0.4);
}
.btn-icon {
font-size: 1.1rem;
}
.time-icon {
margin-right: 6px;
}
.update-time {
color: #666;
font-size: 0.9rem;
@@ -215,6 +297,331 @@ header h1 {
padding: 40px;
color: #666;
font-size: 1.1rem;
display: none;
}
.loading-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
.rainbow-spinner {
width: 50px;
height: 50px;
border: 4px solid transparent;
border-top: 4px solid #4096ff;
border-radius: 50%;
animation: spin 1s linear infinite;
background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff, #5f27cd);
background-size: 400% 400%;
animation: spin 1s linear infinite, rainbowGradient 3s ease infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading-text {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.loading-emoji {
font-size: 2rem;
animation: bounce 1.5s ease-in-out infinite;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {
transform: translateY(0);
}
40% {
transform: translateY(-10px);
}
60% {
transform: translateY(-5px);
}
}
.loading-dots {
display: flex;
gap: 4px;
}
.loading-dots span {
width: 8px;
height: 8px;
background: #4096ff;
border-radius: 50%;
animation: loadingDots 1.4s ease-in-out infinite both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }
@keyframes loadingDots {
0%, 80%, 100% {
transform: scale(0);
}
40% {
transform: scale(1);
}
}
.news-list {
margin-top: 20px;
}
/* 新闻项目卡片 - 移动端优先设计 */
.news-item {
background: white;
border-radius: 16px;
padding: 16px;
margin-bottom: 12px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
border: 1px solid rgba(0, 0, 0, 0.05);
display: flex;
gap: 12px;
position: relative;
overflow: hidden;
}
.news-item:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
border-color: rgba(64, 169, 255, 0.2);
}
/* 排名容器 */
.news-rank-container {
flex-shrink: 0;
display: flex;
align-items: flex-start;
padding-top: 2px;
}
.news-rank {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
border-radius: 12px;
background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
color: #666;
font-weight: 600;
position: relative;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.news-rank.rank-1 {
background: linear-gradient(135deg, #ff4d4f, #ff7a45);
color: white;
box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}
.news-rank.rank-2 {
background: linear-gradient(135deg, #ff7a45, #ffa940);
color: white;
box-shadow: 0 4px 12px rgba(255, 122, 69, 0.3);
}
.news-rank.rank-3 {
background: linear-gradient(135deg, #ffa940, #ffec3d);
color: #333;
box-shadow: 0 4px 12px rgba(255, 169, 64, 0.3);
}
.rank-number {
font-size: 0.9rem;
font-weight: 700;
line-height: 1;
}
.rank-emoji {
font-size: 0.7rem;
line-height: 1;
margin-top: 1px;
}
/* 内容包装器 */
.news-content-wrapper {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 8px;
}
/* 标题 */
.news-title {
font-size: 1rem;
font-weight: 600;
color: #333;
line-height: 1.4;
margin: 0;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
transition: color 0.2s ease;
}
.news-title:hover {
color: #4096ff;
}
/* 元信息行 */
.news-meta-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.news-author, .news-time {
display: flex;
align-items: center;
gap: 4px;
color: #666;
font-size: 0.8rem;
flex: 1;
min-width: 0;
}
.meta-icon {
font-size: 0.9rem;
flex-shrink: 0;
}
.meta-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 统计信息行 */
.news-stats-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
margin-top: 4px;
}
.news-score {
display: flex;
align-items: center;
gap: 4px;
background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
color: white;
padding: 4px 10px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.heat-level {
font-size: 0.8rem;
}
.score-text {
font-size: 0.75rem;
}
.news-link {
display: flex;
align-items: center;
gap: 4px;
background: linear-gradient(135deg, #4096ff, #40a9ff);
color: white;
text-decoration: none;
padding: 6px 12px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
transition: all 0.3s ease;
box-shadow: 0 2px 6px rgba(64, 150, 255, 0.3);
flex-shrink: 0;
}
.news-link:hover {
transform: translateY(-1px);
box-shadow: 0 4px 10px rgba(64, 150, 255, 0.4);
text-decoration: none;
color: white;
}
.link-icon {
font-size: 0.8rem;
}
.link-text {
font-size: 0.75rem;
}
.error-message {
text-align: center;
padding: 40px;
background: white;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.error-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.error-icon {
font-size: 3rem;
}
.error-content h3 {
color: #ff4d4f;
margin: 0;
font-size: 1.3rem;
}
.error-content p {
color: #666;
margin: 0;
font-size: 1rem;
}
.retry-btn {
background: linear-gradient(135deg, #ff4d4f, #ff7a45);
border: none;
padding: 12px 24px;
border-radius: 25px;
color: white;
cursor: pointer;
font-size: 0.95rem;
font-weight: 500;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 8px;
box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}
.retry-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(255, 77, 79, 0.4);
}
footer {
@@ -226,7 +633,7 @@ footer {
font-size: 0.9rem;
}
/* 响应式设计 */
/* 响应式设计 - 移动端优化 */
@media (max-width: 1024px) and (min-width: 768px) {
.container {
max-width: 90%;
@@ -254,20 +661,40 @@ footer {
.container {
max-width: 95%;
margin: 12px auto;
padding: 16px;
padding: 8px;
border-radius: 12px;
}
header {
header, .header {
margin-bottom: 20px;
padding-bottom: 16px;
padding: 12px 0 16px 0;
}
header h1 {
font-size: 1.8rem;
header h1, .title {
font-size: 1.6rem;
margin-bottom: 10px;
}
.subtitle {
font-size: 0.85rem;
}
.tab-container {
gap: 8px;
margin: 16px 0;
}
.tab-btn {
padding: 8px 12px;
font-size: 0.8rem;
min-width: auto;
}
.refresh-btn {
padding: 8px 10px;
font-size: 0.8rem;
}
.update-time {
font-size: 0.85rem;
padding: 6px 12px;
@@ -296,6 +723,52 @@ footer {
margin-bottom: 6px;
}
.news-item {
padding: 12px;
margin-bottom: 10px;
gap: 10px;
}
.news-rank {
width: 40px;
height: 40px;
}
.rank-number {
font-size: 0.8rem;
}
.rank-emoji {
font-size: 0.6rem;
}
.news-title {
font-size: 0.9rem;
line-height: 1.3;
}
.news-meta-row {
gap: 8px;
}
.news-author, .news-time {
font-size: 0.75rem;
}
.news-score {
padding: 3px 8px;
font-size: 0.7rem;
}
.news-link {
padding: 5px 10px;
font-size: 0.7rem;
}
.link-text {
font-size: 0.7rem;
}
footer {
margin-top: 24px;
padding-top: 16px;
@@ -306,10 +779,10 @@ footer {
@media (max-width: 480px) {
.container {
margin: 8px auto;
padding: 14px;
padding: 6px;
}
header h1 {
header h1, .title {
font-size: 1.6rem;
}
@@ -329,6 +802,47 @@ footer {
.hot-title {
font-size: 0.95rem;
}
.news-item {
padding: 10px;
gap: 8px;
}
.news-rank {
width: 36px;
height: 36px;
}
.rank-number {
font-size: 0.75rem;
}
.news-title {
font-size: 0.85rem;
}
.news-meta-row {
flex-direction: column;
align-items: flex-start;
gap: 6px;
}
.news-stats-row {
gap: 8px;
}
.news-author, .news-time {
font-size: 0.7rem;
}
.news-score {
font-size: 0.65rem;
}
.news-link {
font-size: 0.65rem;
padding: 4px 8px;
}
}
/* 减少动画以节省电池 */