* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
}

header h1 {
    float: left;
}

nav {
    float: right;
}

nav ul {
    list-style: none;
}

nav ul li {
    display: inline;
    margin-left: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

main {
    padding-bottom: 40px;
}

section {
    margin-bottom: 30px;
}

section h2 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-item {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #333;
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.video-item {
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: bold;
}

.video-meta {
    font-size: 14px;
    color: #666;
}

footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

.clear {
    clear: both;
}

/* 分类页面样式 */
.category-page {
    display: flex;
    gap: 20px;
}

.category-sidebar {
    width: 250px;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-tree ul {
    list-style: none;
    padding-left: 0;
}

.category-tree li {
    margin-bottom: 10px;
}

.category-tree li ul {
    padding-left: 20px;
    margin-top: 5px;
}

.category-content {
    flex: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sub-categories {
    margin-bottom: 20px;
}

.sub-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.sub-category-item {
    background-color: #f8f8f8;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.sub-category-item:hover {
    background-color: #333;
    color: #fff;
}

.no-videos {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

/* 视频播放页面样式 */
.video-player {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.player-container {
    margin-bottom: 20px;
    background-color: #000;
    border-radius: 5px;
    overflow: hidden;
}

.player-container video {
    display: block;
    width: 100%;
}

.video-details h1 {
    margin-bottom: 15px;
    font-size: 24px;
}

.video-details .video-meta {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.video-details .video-meta span {
    margin-right: 20px;
}

.video-description {
    line-height: 1.8;
    color: #555;
}

.related-videos {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 登录页面样式 */
.login-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group button {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-group button:hover {
    background-color: #555;
}

.error-message {
    color: #e74c3c;
    margin-bottom: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-page {
        flex-direction: column;
    }
    
    .category-sidebar {
        width: 100%;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}