* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #1a1a1a;
    color: #fff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #ff6b35;
    flex-shrink: 0;
}

.menu {
    display: flex;
    list-style: none;
    gap: 30px;
    flex-grow: 1;
}

.menu a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.menu a:hover {
    color: #ff6b35;
}

/* Search Box */
.search-box {
    flex-shrink: 0;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #333;
    color: #fff;
    font-size: 14px;
    width: 350px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #ff6b35;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    padding: 8px 16px;
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.search-btn:hover {
    background: #e55a2b;
}

/* Main */
.main {
    min-height: calc(100vh - 120px);
    padding: 30px 0;
}

.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 24px;
    color: #ff6b35;
    border-left: 4px solid #ff6b35;
    padding-left: 15px;
    margin-bottom: 20px;
}

.more-link {
    color: #999;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.more-link:hover {
    color: #ff6b35;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.video-item {
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    width: 100%;
    max-width: none;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.video-poster {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    margin-bottom: 5px;
    color: #fff;
}

.video-desc {
    font-size: 14px;
    color: #999;
}

/* Video Item Links */
.video-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

/* Detail Page */
.detail-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.detail-poster {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.poster-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.detail-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: #ff6b35;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.meta-item {
    font-size: 16px;
    color: #ccc;
}

.detail-desc h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #ff6b35;
}

.detail-desc p {
    font-size: 16px;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 30px;
}

.play-buttons {
    display: flex;
    gap: 15px;
}

.play-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.play-btn.primary {
    background: #ff6b35;
    color: #fff;
}

.play-btn.primary:hover {
    background: #e55a2b;
}

.play-btn.secondary {
    background: transparent;
    color: #ff6b35;
    border: 2px solid #ff6b35;
}

.play-btn.secondary:hover {
    background: #ff6b35;
    color: #fff;
}

/* Download Module */
.download-content {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.download-item {
    background: #333;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid #444;
    transition: transform 0.3s, border-color 0.3s;
}

.download-item:hover {
    transform: translateY(-5px);
    border-color: #ff6b35;
}

.download-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.download-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
}

.download-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #ff6b35;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #e55a2b;
}

.download-btn.android { background: #4caf50; }
.download-btn.ios { background: #007aff; }
.download-btn.windows { background: #0078d4; }
.download-btn.mac { background: #666; }
.download-btn.tv { background: #9c27b0; }
.download-btn.box { background: #795548; }
.download-btn.online { background: #ff6b35; }
.download-btn.m3u8 { background: #607d8b; }

.download-tips {
    background: #222;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #ff6b35;
}

.download-tips h4 {
    color: #ff6b35;
    margin-bottom: 15px;
    font-size: 16px;
}

.download-tips ul {
    list-style: none;
    padding: 0;
}

.download-tips li {
    color: #ccc;
    margin-bottom: 8px;
    font-size: 14px;
}

.plot-content {
    background: #2a2a2a;
    padding: 25px;
    border-radius: 8px;
    line-height: 1.8;
}

.plot-content p {
    color: #ccc;
    margin-bottom: 15px;
    font-size: 16px;
}

/* 主要内容布局 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.content-left {
    min-width: 0;
}

.content-right {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* 侧边栏样式 */
.sidebar-section {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    color: #ff6b35;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 8px;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s;
    cursor: pointer;
}

.ranking-item:hover {
    background: #333;
}

.ranking-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #666;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.ranking-num.top {
    background: #ff6b35;
}

.ranking-poster {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    background: #333;
    flex-shrink: 0;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-title {
    font-size: 14px;
    color: #fff;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-desc {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* Ranking Item Links */
.ranking-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.ranking-item a:hover {
    background: #333;
    text-decoration: none;
}

/* Footer */
.footer {
    background: #000;
    padding: 20px 0;
    text-align: center;
    color: #999;
    border-top: 1px solid #333;
}

/* Footer Links */
.footer p {
    color: #999;
}

.footer a {
    color: #999;
    text-decoration: none;
}

.footer a:hover,
.footer a:visited,
.footer a:active,
.footer a:focus {
    color: #999;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .menu {
        gap: 20px;
    }
    
    .detail-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .detail-poster {
        position: static;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .search-input {
        width: 100%;
        max-width: 350px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .content-right {
        position: static;
        order: 2; /* 排行榜放在最后 */
    }
    
    .content-left {
        order: 1; /* 内容放在前面 */
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
