/*
Theme Name: Video Learning Platform
Description: YouTube风格视频学习主题
Version: 1.0
*/

:root {
    --primary-color: #ff0000;
    --secondary-color: #282828;
    --background-color: #0f0f0f;
    --text-color: #ffffff;
    --text-secondary: #aaa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', Arial, sans-serif;
}

/* Header Styles */
.site-header {
    background: var(--secondary-color);
    padding: 0 16px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    height: 56px;
}

.logo {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.search-bar {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
}

.search-bar input {
    width: 100%;
    padding: 8px 16px;
    background: #121212;
    border: 1px solid #303030;
    border-radius: 20px;
    color: var(--text-color);
}

/* Main Layout */
.main-container {
    display: flex;
    margin-top: 56px;
}

.sidebar {
    width: 240px;
    background: var(--secondary-color);
    height: calc(100vh - 56px);
    position: fixed;
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
    padding: 12px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
}

.sidebar-menu li a:hover {
    background: #383838;
}

.content-area {
    margin-left: 240px;
    padding: 20px;
    width: calc(100% - 240px);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.video-card {
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.video-info {
    padding: 12px;
}

.video-title {
    font-weight: 500;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Video Player Page */
.video-player-container {
    max-width: 1200px;
    margin: 0 auto;
}

.video-player {
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-description {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .content-area {
        margin-left: 0;
        width: 100%;
    }
}
/* 头部样式增强 */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    font-size: 18px;
}

.logo-icon {
    font-size: 24px;
    margin-right: 8px;
}

.search-container {
    display: flex;
    align-items: center;
    background: #121212;
    border-radius: 20px;
    overflow: hidden;
}

.search-container input {
    background: none;
    border: none;
    padding: 8px 16px;
    color: var(--text-color);
    width: 400px;
}

.search-button {
    background: #303030;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--text-color);
}

.user-dropdown {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.user-toggle:hover {
    background: #383838;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--secondary-color);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: none;
    z-index: 1000;
}

.user-dropdown:hover .user-dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-item:hover {
    background: #383838;
}

.dropdown-divider {
    height: 1px;
    background: #383838;
    margin: 8px 0;
}

/* 移动端菜单 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-color);
    margin: 2px 0;
    transition: 0.3s;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* 页脚样式 */
.site-footer {
    background: var(--secondary-color);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.footer-section h3 {
    color: var(--text-color);
    margin-bottom: 16px;
    font-size: 18px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-color);
}

.footer-bottom {
    border-top: 1px solid #383838;
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .search-container input {
        width: 200px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content-area {
        margin-left: 0;
        width: 100%;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }
}
