/* style.css */

.header {
    background: #fff;
    padding: 10px 15px;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
}

.logo img {
    height: 40px;
    max-width: 150px;
}

.header-actions {
    gap: 15px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.icon-btn:hover {
    background: #e9ecef;
    color: #333;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.search-overlay.active {
    display: flex;
}

.search-box {
    background: white;
    border-radius: 25px;
    padding: 10px 20px;
    margin: 0 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 0;
    font-size: 16px;
    background: transparent;
}

.search-input::placeholder {
    color: #999;
}

.search-submit {
    background: #007bff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background 0.3s ease;
}

.search-submit:hover {
    background: #0056b3;
}

.close-search {
    position: absolute;
    top: -45px;
    right: 0;
    background: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
}

.language-dropdown {
    position: relative;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    z-index: 100;
    display: none;
    margin-top: 5px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-menu.active {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    gap: 8px;
    color: #333;
    font-size: 14px;
}

.lang-option:hover {
    background: #f8f9fa;
}

.lang-option:first-child {
    border-radius: 8px 8px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 8px 8px;
}

.flag-icon {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    display: inline-block;
}

.flag-cn { background: linear-gradient(to bottom, #de2910 0%, #de2910 100%); }
.flag-en { background: linear-gradient(to bottom, #012169 0%, #012169 33%, #fff 33%, #fff 66%, #C8102E 66%); }
.flag-jp { background: radial-gradient(circle at center, #BC002D 25%, #fff 25%); }

/* 移动端优化 */
@media (max-width: 640px) {
    .header {
        padding: 8px 12px;
    }
    
    .logo img {
        height: 32px;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
    }
    
    .search-box {
        margin: 0 15px;
    }
}

/* 内容区域样式 */
.content-wrapper {
    background: #f8f9fa;
    min-height: calc(100vh - 80px);
    padding: 20px 0;
}

.video-sections {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.video-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.view-more {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-more:hover {
    color: #0056b3;
}

/*.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}*/
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* PC端4列 */
    gap: 15px;
}

/* 平板端 */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr); /* 平板3列 */
    }
}

/* 移动端 */
@media (max-width: 640px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr); /* 手机2列 */
        gap: 12px;
    }
}

/* 超小屏幕 */
@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr); /* 手机2列 */
        gap: 10px;
    }
}
.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.video-card:active {
    transform: scale(0.98);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: #000;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.video-card:hover .play-button {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.views {
    font-weight: 500;
}

.date {
    color: #999;
}

/* 移动端视频卡片优化 */
@media (max-width: 640px) {
    .content-wrapper {
        padding: 15px 0;
    }
    
    .video-sections {
        padding: 0 12px;
    }
    
    .video-section {
        margin-bottom: 30px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .video-grid {
        gap: 12px;
    }
    
    .video-card {
        border-radius: 8px;
    }
    
    .video-info {
        padding: 12px;
    }
    
    .video-title {
        font-size: 14px;
    }
    
    .video-meta {
        font-size: 12px;
    }
    
    .play-button {
        width: 40px;
        height: 40px;
    }
    
    .duration {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .video-sections {
        padding: 0 8px;
    }
    
    .video-grid {
        gap: 10px;
    }
    
    .section-header {
        padding: 0 2px;
    }
}
/* 汉堡菜单样式 */
.hamburger-menu {
    position: relative;
    margin-left: 8px;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
}

.menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-item svg {
    margin-right: 8px;
    opacity: 0.7;
}

.menu-item:hover svg {
    opacity: 1;
}