Files
InfoGenie/frontend/react-app/public/60sapi/热搜榜单/网易云榜单详情/css/style.css

483 lines
8.8 KiB
CSS

/* 基础样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
color: #2c3e50;
min-height: 100vh;
overflow-x: hidden;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
position: relative;
z-index: 1;
}
/* 头部样式 */
.header {
text-align: center;
margin-bottom: 40px;
padding: 40px 20px;
background: rgba(255, 255, 255, 0.9);
border-radius: 20px;
backdrop-filter: blur(10px);
box-shadow: 0 8px 32px rgba(76, 175, 80, 0.1);
}
.title {
font-size: 2.5rem;
font-weight: 700;
background: linear-gradient(135deg, #4CAF50, #81C784);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 10px;
animation: titleGlow 3s ease-in-out infinite alternate;
}
@keyframes titleGlow {
from { filter: drop-shadow(0 0 5px rgba(76, 175, 80, 0.3)); }
to { filter: drop-shadow(0 0 15px rgba(76, 175, 80, 0.6)); }
}
.subtitle {
font-size: 1.1rem;
color: #666;
opacity: 0.8;
}
/* 榜单信息样式 */
.rank-info {
background: rgba(255, 255, 255, 0.95);
border-radius: 15px;
padding: 25px;
margin-bottom: 30px;
box-shadow: 0 6px 25px rgba(76, 175, 80, 0.1);
border: 1px solid rgba(76, 175, 80, 0.2);
}
.rank-header {
display: flex;
gap: 20px;
align-items: flex-start;
}
.rank-cover {
width: 120px;
height: 120px;
border-radius: 12px;
object-fit: cover;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
flex-shrink: 0;
}
.rank-details {
flex: 1;
}
.rank-name {
font-size: 1.8rem;
color: #2c3e50;
margin-bottom: 10px;
font-weight: 600;
}
.rank-description {
color: #666;
margin-bottom: 15px;
line-height: 1.6;
}
.rank-meta {
display: flex;
gap: 20px;
flex-wrap: wrap;
}
.update-time, .update-frequency {
background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
padding: 6px 12px;
border-radius: 20px;
font-size: 0.9rem;
color: #2E7D32;
border: 1px solid rgba(76, 175, 80, 0.3);
}
/* 控制区域样式 */
.controls {
background: rgba(255, 255, 255, 0.9);
border-radius: 15px;
padding: 25px;
margin-bottom: 30px;
box-shadow: 0 6px 25px rgba(76, 175, 80, 0.1);
}
.input-group {
display: flex;
gap: 15px;
align-items: center;
flex-wrap: wrap;
}
.input-group label {
font-weight: 600;
color: #2c3e50;
min-width: 80px;
}
#rankId {
flex: 1;
min-width: 200px;
padding: 12px 16px;
border: 2px solid #E0E0E0;
border-radius: 10px;
font-size: 1rem;
transition: all 0.3s ease;
background: rgba(255, 255, 255, 0.9);
}
#rankId:focus {
outline: none;
border-color: #4CAF50;
box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}
.load-btn {
padding: 12px 24px;
background: linear-gradient(135deg, #4CAF50, #66BB6A);
color: white;
border: none;
border-radius: 10px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}
.load-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}
.load-btn:active {
transform: translateY(0);
}
.load-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none;
}
/* 加载动画 */
.loading {
text-align: center;
padding: 40px;
background: rgba(255, 255, 255, 0.9);
border-radius: 15px;
margin-bottom: 30px;
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid #E0E0E0;
border-top: 4px solid #4CAF50;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 15px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 错误提示 */
.error {
text-align: center;
padding: 30px;
background: rgba(255, 245, 245, 0.95);
border: 2px solid #ffcdd2;
border-radius: 15px;
margin-bottom: 30px;
}
.error-icon {
font-size: 3rem;
margin-bottom: 15px;
}
.error-message {
color: #c62828;
margin-bottom: 20px;
font-size: 1.1rem;
}
.retry-btn {
padding: 10px 20px;
background: #f44336;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
}
.retry-btn:hover {
background: #d32f2f;
transform: translateY(-1px);
}
/* 歌曲列表样式 */
.song-list {
background: rgba(255, 255, 255, 0.95);
border-radius: 15px;
padding: 25px;
margin-bottom: 30px;
box-shadow: 0 6px 25px rgba(76, 175, 80, 0.1);
}
.list-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 2px solid #E8F5E8;
}
.list-header h3 {
font-size: 1.5rem;
color: #2c3e50;
font-weight: 600;
}
.song-count {
background: linear-gradient(135deg, #4CAF50, #66BB6A);
color: white;
padding: 6px 12px;
border-radius: 20px;
font-size: 0.9rem;
font-weight: 600;
}
/* 歌曲项样式 */
.song-item {
display: flex;
align-items: center;
padding: 15px;
margin-bottom: 12px;
background: rgba(248, 255, 248, 0.8);
border-radius: 12px;
transition: all 0.3s ease;
border: 1px solid rgba(76, 175, 80, 0.1);
cursor: pointer;
}
.song-item:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(76, 175, 80, 0.15);
background: rgba(232, 245, 232, 0.9);
}
.song-rank {
font-size: 1.2rem;
font-weight: 700;
color: #4CAF50;
min-width: 40px;
text-align: center;
}
.song-rank.top3 {
background: linear-gradient(135deg, #FFD700, #FFA000);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.song-info {
flex: 1;
margin-left: 15px;
}
.song-title {
font-size: 1.1rem;
font-weight: 600;
color: #2c3e50;
margin-bottom: 5px;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
.song-artist {
color: #666;
font-size: 0.9rem;
margin-bottom: 3px;
}
.song-album {
color: #888;
font-size: 0.85rem;
}
.song-meta {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 5px;
}
.song-duration {
color: #666;
font-size: 0.9rem;
}
.song-popularity {
background: linear-gradient(135deg, #4CAF50, #66BB6A);
color: white;
padding: 3px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 600;
}
/* 返回按钮 */
.back-to-list {
text-align: center;
margin: 30px 0;
}
.back-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 12px 24px;
background: linear-gradient(135deg, #81C784, #A5D6A7);
color: white;
text-decoration: none;
border-radius: 10px;
font-weight: 600;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(129, 199, 132, 0.3);
}
.back-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(129, 199, 132, 0.4);
}
/* 页脚 */
.footer {
text-align: center;
padding: 30px 20px;
background: rgba(255, 255, 255, 0.9);
border-radius: 15px;
margin-top: 40px;
color: #666;
backdrop-filter: blur(10px);
}
/* 响应式设计 */
@media (max-width: 768px) {
.container {
padding: 15px;
}
.title {
font-size: 2rem;
}
.rank-header {
flex-direction: column;
text-align: center;
}
.rank-cover {
width: 100px;
height: 100px;
margin: 0 auto 15px;
}
.input-group {
flex-direction: column;
align-items: stretch;
}
.input-group label {
min-width: auto;
margin-bottom: 5px;
}
#rankId {
min-width: auto;
margin-bottom: 10px;
}
.song-item {
flex-direction: column;
text-align: center;
gap: 10px;
}
.song-info {
margin-left: 0;
}
.song-meta {
align-items: center;
flex-direction: row;
justify-content: center;
}
.list-header {
flex-direction: column;
gap: 10px;
text-align: center;
}
}
@media (max-width: 480px) {
.title {
font-size: 1.8rem;
}
.header {
padding: 30px 15px;
}
.rank-info, .controls, .song-list {
padding: 20px;
}
.song-item {
padding: 12px;
}
}
/* 平板端适配 */
@media (min-width: 769px) and (max-width: 1024px) {
.container {
padding: 25px;
}
.song-item {
padding: 18px;
}
.rank-cover {
width: 110px;
height: 110px;
}
}