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

body {
    font-family: Arial, sans-serif;
    background: #000;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    border: 1px solid #333;
    background: #000;
    min-height: 100vh;
}

/* 头部 */
.header {
    border-bottom: 1px solid #333;
    margin-bottom: 30px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.search-box {
    position: relative;
    width: 280px;
}

.search {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid #333;
    background: #0a0a0a;
    color: #fff;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.3s;
}

.search:focus {
    outline: none;
    border-color: #555;
    background: #111;
    box-shadow: 0 0 0 2px rgba(85, 85, 85, 0.2);
}

.search:focus+.search-icon {
    color: #999;
}

.search::placeholder {
    color: #666;
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    transition: color 0.3s;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 20px;
}

.nav a {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 16px;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.nav a:hover {
    color: #fff;
    background: #222;
    border-color: #555;
}


.list-header {
    padding: 20px;
    margin-bottom: 20px;
}

.list-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}


.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-bottom: 60px;
}


.video-card {
    cursor: pointer;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
}

.video-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-card:nth-child(4n) {
    border-right: none;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #1a1a1a;
    background-image: linear-gradient(45deg, #111 25%, #1a1a1a 25%, #1a1a1a 50%, #111 50%, #111 75%, #1a1a1a 75%, #1a1a1a 100%);
    background-size: 40px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}


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

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

.video-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;

    -webkit-line-clamp: 2;

    overflow: hidden;

    text-overflow: ellipsis;

    line-height: 1.5em;

    max-height: 3em;

    font-size: 14px;
    font-weight: normal;
    line-height: 1.4;
    color: #ccc;
    padding: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    height: 3.5em;
    /* (1.4 * 2) + extra for padding if needed, or exact 2.8em */
    min-height: 3.5em;
}

.video-card:hover .video-title {
    color: #fff;
}


.play-top-section {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px;
}

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

.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #333;
}

.player-wrapper video,
.player-wrapper #player,
.player-wrapper .plyr {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: #0a0a0a;
}

.video-main-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.video-meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 16px;
}

.video-description {
    padding: 16px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
}

.video-description p {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
}

/* 侧边栏 */
.player-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tags-box {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 16px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    color: #ccc;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    transition: all 0.2s;
}

.tag-item:hover {
    background: #222;
    color: #fff;
    border-color: #555;
}


.recommend-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
}


.plyr--video {
    background: #000;
}

.plyr--full-ui input[type=range] {
    color: #00b3ff;
}

.plyr__control--overlaid {
    background: rgba(0, 179, 255, 0.8);
}


.footer {
    padding: 60px 20px 40px;
    border-top: 1px solid #333;
    background: #050505;
}

.footer-tags {
    margin: 0 auto 40px;
    text-align: left;
}

.footer-title {
    font-size: 16px;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.footer-tag-list a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-tag-list a:hover {
    color: #aaa;
}

.copyright {
    text-align: center;
    color: #444;
    font-size: 12px;
    border-top: 1px solid #1a1a1a;
    padding-top: 30px;
}


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    gap: 15px;
}

.page-btn {
    padding: 8px 20px;
    background: #111;
    color: #fff;
    text-decoration: none;
    border: 1px solid #333;
    border-radius: 4px;
}


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

    .video-card:nth-child(4n) {
        border-right: 1px solid #333;
    }

    .video-card:nth-child(3n) {
        border-right: none;
    }

    .play-top-section {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-card:nth-child(3n) {
        border-right: 1px solid #333;
    }

    .video-card:nth-child(2n) {
        border-right: none;
    }

    .play-top-section {
        grid-template-columns: 1fr;
    }

    .player-right {
        flex-direction: row;
    }

    .tags-box {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .play-top-section {
        padding: 15px;
    }

    .player-wrapper {
        border-radius: 0;
    }

    .recommend-section {
        padding: 0 15px;
    }

    .video-title {
        height: 3.5em;
        min-height: 3.5em;
    }
}

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

    .video-card:nth-child(2n) {
        border-right: none;
    }

    .player-right {
        flex-direction: column;
    }
}