/* 直播投流源样式 */ .livestream-section { padding: 40px 0; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); margin-bottom: 30px; } .livestream-section .section-header { text-align: center; margin-bottom: 30px; } .livestream-section .section-title { font-size: 32px; font-weight: 700; color: #fff; margin-bottom: 10px; } .livestream-section .section-subtitle { font-size: 16px; color: rgba(255, 255, 255, 0.9); margin: 0; } .livestream-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding: 0 20px; } .livestream-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; cursor: pointer; position: relative; } .livestream-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); } .livestream-card .live-badge { position: absolute; top: 10px; left: 10px; background: #ff4444; color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; z-index: 2; display: flex; align-items: center; gap: 5px; } .livestream-card .live-badge::before { content: ''; width: 8px; height: 8px; background: #fff; border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; } /* 未开播标识 */ .livestream-card .offline-badge { position: absolute; top: 10px; left: 10px; background: #999; color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; z-index: 2; } @keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } } .livestream-card .platform-badge { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, 0.7); color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; z-index: 2; } .livestream-card .cover-image { width: 100%; height: 160px; object-fit: cover; display: block; } .livestream-card .placeholder-cover { width: 100%; height: 160px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 48px; } .livestream-card .card-content { padding: 15px; } .livestream-card .card-title { font-size: 16px; font-weight: 600; color: #333; margin: 0 0 8px 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; min-height: 44px; } .livestream-card .card-description { font-size: 13px; color: #666; margin: 0 0 12px 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; min-height: 36px; } .livestream-card .card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid #f0f0f0; } .livestream-card .view-count { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #999; } .livestream-card .view-count svg { width: 16px; height: 16px; } .livestream-card .watch-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; border: none; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; } .livestream-card .watch-btn:hover { transform: scale(1.05); box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4); } /* 禁用状态的观看按钮 */ .livestream-card .watch-btn.disabled { background: #ccc; cursor: not-allowed; opacity: 0.6; } .livestream-card .watch-btn.disabled:hover { transform: none; box-shadow: none; } /* 未开播卡片样式 */ .livestream-card.not-live { opacity: 0.85; cursor: default; } .livestream-card.not-live:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); } .livestream-card.not-live .cover-image, .livestream-card.not-live .placeholder-cover { filter: grayscale(30%); opacity: 0.9; } /* 响应式设计 */ @media (max-width: 768px) { .livestream-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; } .livestream-section { padding: 30px 0; } .livestream-section .section-title { font-size: 24px; } .livestream-section .section-subtitle { font-size: 14px; } } @media (max-width: 480px) { .livestream-grid { grid-template-columns: 1fr; padding: 0 10px; } .livestream-card .cover-image, .livestream-card .placeholder-cover { height: 180px; } }