/* 红色主题样式 - 移动端优先 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #ff3b3b 0%, #d32f2f 100%);
    min-height: 100vh;
    padding-bottom: 60px;
}

/* 顶部搜索栏 */
.header-bar {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(90deg, #ff5252, #d32f2f);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left .today-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    color: #d32f2f;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.header-search {
    flex: 1;
    margin-left: 10px;
}

.header-search form {
    display: flex;
}

.header-search input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: 18px 0 0 18px;
    font-size: 14px;
    outline: none;
}

.header-search button {
    padding: 0 16px;
    height: 36px;
    background: #ffeb3b;
    color: #333;
    border: none;
    border-radius: 0 18px 18px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* 分类标签 - 多行网格排列 */
.category-bar {
    display: block;
    padding: 8px 12px;
    background: #d32f2f;
}

.category-scroll {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 6px;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.cat-item {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s;
}

.cat-item.active,
.cat-item:hover {
    background: #ffeb3b;
    color: #d32f2f;
}

.buy-btn {
    display: inline-block;
    padding: 4px 12px;
    background: #ffeb3b;
    color: #d32f2f;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* 代理首页视频 */
.agent-video-section {
    margin: 12px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.agent-video-title {
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-video-title .hot-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #ff5252, #d32f2f);
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

.agent-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.agent-video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    position: relative;
}

.play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-left: 20px solid #d32f2f;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.agent-video-desc {
    padding: 12px 15px;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #eee;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
}

.video-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.video-item a {
    text-decoration: none;
    color: inherit;
}

.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

.video-thumb .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.video-thumb .play-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-left: 16px solid #ffb300;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

.vod-tag {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 4px 12px;
    font-size: 12px;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
}

.vod-tag.pay {
    background: linear-gradient(90deg, #ff5252, #d32f2f);
}

.vod-tag.free {
    background: linear-gradient(90deg, #4caf50, #388e3c);
}

.video-info {
    padding: 10px;
}

.video-info .views {
    font-size: 12px;
    color: #999;
}

.video-info .title {
    font-size: 14px;
    color: #333;
    margin-top: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 20px;
    color: #fff;
    font-size: 14px;
}

/* 底部固定栏 */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: linear-gradient(90deg, #ff5252, #d32f2f);
    padding: 8px 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.footer-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 12px;
    padding: 5px;
}

.footer-item em {
    font-style: normal;
    color: #ffeb3b;
}

.footer-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.footer-icon.points {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.31-8.86c-1.77-.45-2.34-.94-2.34-1.67 0-.84.79-1.43 2.1-1.43 1.38 0 1.9.66 1.94 1.64h1.71c-.05-1.34-.87-2.57-2.49-2.97V5H10.9v1.69c-1.51.32-2.72 1.3-2.72 2.81 0 1.79 1.49 2.69 3.66 3.21 1.95.46 2.34 1.15 2.34 1.87 0 .53-.39 1.39-2.1 1.39-1.6 0-2.23-.72-2.32-1.64H8.04c.1 1.7 1.36 2.66 2.86 2.97V19h2.34v-1.67c1.52-.29 2.72-1.16 2.73-2.77-.01-2.2-1.9-2.96-3.66-3.42z'/%3E%3C/svg%3E");
}

.footer-icon.contact {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z'/%3E%3C/svg%3E");
}

.footer-icon.promo {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
}

.footer-icon.top {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 85%;
    max-width: 350px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(90deg, #ff5252, #d32f2f);
    color: #fff;
    font-weight: 600;
}

.modal-header .close {
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.modal-body input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.modal-body button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #ff5252, #d32f2f);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* 响应式 - 大屏幕 */
@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 900px;
        margin: 0 auto;
    }
}

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