/* ============================================
   直播系统 - 主样式表
   ============================================ */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #0a0a1a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #00a8cc;
}

/* 导航栏 */
.navbar {
    background: rgba(10, 10, 30, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .logo {
    font-size: 24px;
    font-weight: 700;
    color: #00d4ff;
    letter-spacing: 2px;
}

.navbar .logo span {
    color: #ff6b9d;
}

.navbar .nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar .nav-links a {
    color: #ccc;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: #00d4ff;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #00d4ff;
    transition: width 0.3s;
}

.navbar .nav-links a:hover::after,
.navbar .nav-links a.active::after {
    width: 100%;
}

/* 首页英雄区 */
.hero {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0a1a2e 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 107, 157, 0.08) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 40px;
}

.hero-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #00d4ff, #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: #999;
    margin-bottom: 10px;
}

.hero .subtitle {
    font-size: 16px;
    color: #777;
    margin-bottom: 40px;
}

/* 延时按钮 */
.delay-btn-wrapper {
    margin-top: 30px;
}

.delay-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 48px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.delay-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.4);
}

.delay-btn:active {
    transform: translateY(-1px);
}

.delay-btn .btn-icon {
    font-size: 24px;
}

.delay-btn.counting {
    background: linear-gradient(135deg, #ff6b9d, #cc3366);
    pointer-events: none;
}

.delay-btn .countdown-num {
    font-size: 28px;
    font-weight: 800;
    min-width: 30px;
    display: inline-block;
}

/* 特性展示 */
.features {
    padding: 80px 40px;
    background: #0d0d24;
}

.features .section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 50px;
    color: #fff;
}

.features .section-title span {
    color: #00d4ff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.feature-card .feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 12px;
}

.feature-card p {
    color: #888;
    font-size: 14px;
    line-height: 1.8;
}

/* 页脚 */
.footer {
    background: #06060f;
    padding: 30px 40px;
    text-align: center;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.footer p {
    color: #666;
    font-size: 14px;
}

/* 直播内容页 */
.live-page {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.live-header h1 {
    font-size: 28px;
    color: #fff;
}

.live-tabs {
    display: flex;
    gap: 10px;
}

.live-tab {
    padding: 10px 24px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: transparent;
    color: #ccc;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.live-tab:hover,
.live-tab.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00d4ff;
    color: #00d4ff;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.video-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.video-card .thumb {
    width: 100%;
    height: 180px;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.video-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card .thumb .play-icon {
    position: absolute;
    font-size: 48px;
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.3s;
}

.video-card:hover .thumb .play-icon {
    transform: scale(1.2);
}

.video-card .thumb .duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.video-card .video-info {
    padding: 16px;
}

.video-card .video-info h3 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card .video-info .meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #888;
}

.video-card .video-info .formats {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.video-card .video-info .format-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    color: #00d4ff;
}

/* 播放器页面 */
.player-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.player-wrapper {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.player-wrapper video {
    width: 100%;
    display: block;
    max-height: 70vh;
}

.player-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 24px;
}

.player-info h2 {
    font-size: 22px;
    color: #fff;
    margin-bottom: 16px;
}

.player-info .info-row {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.player-info .info-item {
    color: #999;
    font-size: 14px;
}

.player-info .info-item strong {
    color: #ccc;
    margin-right: 6px;
}

.format-selector {
    margin-top: 20px;
}

.format-selector h3 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 12px;
}

.format-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.format-btn {
    padding: 10px 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: transparent;
    color: #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.format-btn:hover {
    border-color: #00d4ff;
    color: #00d4ff;
}

.format-btn.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    color: #00d4ff;
}

.back-btn {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 16px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 212, 255, 0.2);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 直播状态指示 */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.4);
    border-radius: 20px;
    color: #ff4444;
    font-size: 12px;
    font-weight: 600;
}

.live-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 24px;
    background: #1a1a2e;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.toast.success {
    border-color: rgba(0, 255, 100, 0.3);
}

.toast.error {
    border-color: rgba(255, 0, 0, 0.3);
}

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 响应式 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .navbar {
        padding: 0 20px;
    }
    
    .features {
        padding: 60px 20px;
    }
    
    .live-page {
        padding: 20px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .delay-btn {
        padding: 14px 36px;
        font-size: 18px;
    }
}