/* 随机唱歌音频 - 淡绿色清新风格样式 */ /* 重置样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 50%, #ffd3a5 100%); min-height: 100vh; color: #2d5016; line-height: 1.6; overflow-x: hidden; } .container { max-width: 900px; margin: 0 auto; padding: 20px; } /* 头部 */ .header { text-align: center; margin-bottom: 20px; background: rgba(255, 255, 255, 0.85); border-radius: 20px; padding: 24px; box-shadow: 0 8px 25px rgba(45, 80, 22, 0.08); backdrop-filter: blur(10px); } .header h1 { font-size: 2rem; color: #2d5016; margin-bottom: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 12px; } .header p { color: #5a7c65; font-size: 1rem; } /* 用户卡片 */ .user-card { display: flex; align-items: center; justify-content: center; gap: 15px; background: rgba(255, 255, 255, 0.9); padding: 16px; border-radius: 15px; box-shadow: 0 4px 18px rgba(45, 80, 22, 0.08); margin-bottom: 15px; text-align: center; } .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(129, 199, 132, 0.5); } .user-info { display: flex; flex-direction: column; } .nickname { font-weight: 700; font-size: 1.1rem; color: #2d5016; } .meta { color: #5a7c65; font-size: 0.9rem; } /* 歌曲信息 */ .song-card { background: rgba(255, 255, 255, 0.9); padding: 16px; border-radius: 15px; box-shadow: 0 4px 18px rgba(45, 80, 22, 0.08); margin-bottom: 15px; text-align: center; } .song-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; color: #1b5e20; } .song-meta { color: #5a7c65; font-size: 0.95rem; margin-bottom: 10px; } /* 歌词 */ .lyrics { background: rgba(129, 199, 132, 0.1); border-radius: 12px; padding: 12px; max-height: 220px; overflow: auto; } .lyrics p { margin-bottom: 6px; } /* 音频播放器卡片 */ .audio-card { background: rgba(255, 255, 255, 0.9); padding: 16px; border-radius: 15px; box-shadow: 0 4px 18px rgba(45, 80, 22, 0.08); margin-bottom: 15px; } .audio-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: 10px; } .btn { background: linear-gradient(135deg, #81c784 0%, #66bb6a 100%); color: white; border: none; padding: 10px 18px; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.25s ease; box-shadow: 0 4px 12px rgba(129, 199, 132, 0.35); text-decoration: none; } .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(129, 199, 132, 0.45); } .info { color: #5a7c65; font-size: 0.9rem; } /* 加载与错误 */ .loading, .error { text-align: center; padding: 30px; background: rgba(255, 255, 255, 0.85); border-radius: 15px; box-shadow: 0 5px 20px rgba(45, 80, 22, 0.08); } .spinner { width: 36px; height: 36px; border: 4px solid #e8f5e8; border-top: 4px solid #81c784; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 18px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* 动画 */ .fade-in { animation: fadeIn 0.5s ease-in-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } /* 平板端适配 */ @media (max-width: 1024px) and (min-width: 768px) { .container { padding: 16px; } .header h1 { font-size: 1.8rem; } } /* 手机端优先优化 */ @media (max-width: 767px) { .container { padding: 12px; } .header { padding: 18px; } .header h1 { font-size: 1.6rem; gap: 8px; } .user-card { padding: 16px; flex-direction: column; text-align: center; } .avatar { width: 80px; height: 80px; margin-bottom: 8px; } .song-card, .audio-card { padding: 16px; } .lyrics { max-height: 180px; text-align: left; padding: 16px; } .audio-actions { flex-direction: column; gap: 15px; align-items: center; } .info { text-align: center; line-height: 1.8; } .btn { width: 100%; max-width: 200px; text-align: center; } }