/* 全局样式 */
* {
    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-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    padding-bottom: 60px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
}

.logo-sub {
    font-size: 10px;
    opacity: 0.9;
}

.user-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 导航栏 */
.nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(0,0,0,0.1);
}

.nav-item {
    flex-shrink: 0;
    padding: 10px 20px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    position: relative;
    transition: all 0.3s;
}

.nav-item.active {
    color: white;
    font-weight: bold;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* 公告栏 */
.notice-bar {
    background: #fff3cd;
    color: #856404;
    padding: 8px 16px;
    font-size: 13px;
    border-bottom: 1px solid #ffc107;
}

/* 主要内容区 */
.main-content {
    padding: 16px;
}

.section-title {
    margin-bottom: 16px;
}

.live-tag {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
}

/* 直播列表 */
.live-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.live-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.live-card:active {
    transform: scale(0.98);
}

.card-cover {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #f0f0f0;
    overflow: hidden;
}

.card-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-cover .placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.live-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4757;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

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

.card-info {
    padding: 10px;
}

.card-title {
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #999;
}

.viewer-count {
    display: flex;
    align-items: center;
    gap: 3px;
}

.viewer-count::before {
    content: '🔥';
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.empty-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.empty-tip {
    font-size: 13px;
    margin-top: 8px;
    color: #ccc;
}

/* 底部导航 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 1px solid #eee;
    z-index: 99;
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #999;
    font-size: 11px;
    gap: 4px;
}

.footer-item.active {
    color: #ff6b6b;
}

.footer-item svg {
    width: 24px;
    height: 24px;
}

/* 播放器弹窗 */
.player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
}

.player-modal.show {
    display: block;
}

.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
}

.player-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 800px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #2a2a2a;
}

.player-title {
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.player-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.player-info {
    padding: 16px;
    background: #2a2a2a;
}

.match-name {
    color: white;
    font-size: 14px;
    margin-bottom: 8px;
}

.viewer-count {
    color: #999;
    font-size: 12px;
}

/* 响应式适配 */
@media (min-width: 768px) {
    .live-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .live-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 隐藏滚动条但保留功能 */
.nav::-webkit-scrollbar {
    display: none;
}

.nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
