* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --baidu-primary: #3385ff;
    --baidu-primary-dark: #2d75e6;
    --baidu-primary-light: #4d95ff;
    --baidu-bg: #ffffff;
    --baidu-surface: #ffffff;
    --baidu-border: #e5e7eb;
    --baidu-text: #333333;
    --baidu-text-secondary: #666666;
    --baidu-text-light: #999999;
    --baidu-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --baidu-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
    --baidu-radius: 4px;
}

body.baidu-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f5f5;
    color: var(--baidu-text);
    line-height: 1.6;
}

.baidu-header {
    background: var(--baidu-surface);
    border-bottom: 1px solid var(--baidu-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--baidu-text);
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-text {
    color: var(--baidu-primary);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    flex-wrap: nowrap;
}

.nav-link {
    padding: 0 18px;
    height: 60px;
    line-height: 60px;
    color: var(--baidu-text);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--baidu-primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--baidu-primary);
    background: transparent;
}

.nav-link:hover::after {
    width: 60%;
}

.nav-link.active {
    color: var(--baidu-primary);
    background: transparent;
    font-weight: 500;
}

.nav-link.active::after {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    margin-left: 20px;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid var(--baidu-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: var(--baidu-primary);
    background: var(--baidu-surface);
    box-shadow: 0 0 0 2px rgba(51, 133, 255, 0.1);
}

.search-input {
    padding: 8px 12px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    width: 200px;
    outline: none;
    color: var(--baidu-text);
}

.search-input::placeholder {
    color: var(--baidu-text-light);
}

.search-btn {
    padding: 8px 12px;
    background: var(--baidu-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--baidu-primary-dark);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--baidu-text);
    border-radius: 2px;
    transition: all 0.2s;
}

.baidu-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.baidu-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 1rem;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--baidu-text);
}

.section-more {
    color: var(--baidu-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.section-more:hover {
    color: var(--baidu-primary-dark);
    text-decoration: underline;
}

.section-count {
    color: var(--baidu-text-secondary);
    font-size: 14px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--baidu-surface);
    border-radius: var(--baidu-radius);
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--baidu-shadow);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--baidu-shadow-hover);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-image {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: #f0f0f0;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-card:hover .card-image img {
    transform: scale(1.08);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .card-overlay {
    opacity: 1;
}

.play-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 2px;
    z-index: 2;
}

.card-info {
    padding: 12px;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--baidu-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 40px;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 12px;
    color: var(--baidu-text-light);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--baidu-text-secondary);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 16px;
    background: var(--baidu-surface);
    border: 1px solid var(--baidu-border);
    border-radius: var(--baidu-radius);
    color: var(--baidu-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--baidu-primary);
    color: white;
    border-color: var(--baidu-primary);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-page {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--baidu-surface);
    border: 1px solid var(--baidu-border);
    border-radius: var(--baidu-radius);
    color: var(--baidu-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination-page:hover {
    background: var(--baidu-primary);
    color: white;
    border-color: var(--baidu-primary);
}

.pagination-page.active {
    background: var(--baidu-primary);
    color: white;
    border-color: var(--baidu-primary);
}

.pagination-ellipsis {
    padding: 0 8px;
    color: var(--baidu-text-light);
}

/* 播放器样式 */
.baidu-player {
    background: var(--baidu-surface);
    border-radius: var(--baidu-radius);
    padding: 20px;
    box-shadow: var(--baidu-shadow);
}

.player-screen {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: var(--baidu-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.player-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--baidu-text);
}

.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.control-btn {
    padding: 6px 16px;
    background: var(--baidu-surface);
    border: 1px solid var(--baidu-border);
    border-radius: var(--baidu-radius);
    color: var(--baidu-text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: rgba(51, 133, 255, 0.08);
    border-color: var(--baidu-primary);
    color: var(--baidu-primary);
}

.control-btn.active {
    background: var(--baidu-primary);
    border-color: var(--baidu-primary);
    color: white;
}

/* 详情页样式 */
.detail-section {
    background: var(--baidu-surface);
    border-radius: var(--baidu-radius);
    padding: 20px;
    box-shadow: var(--baidu-shadow);
}

.detail-container {
    display: flex;
    gap: 20px;
}

.detail-poster {
    position: relative;
    flex-shrink: 0;
    width: 200px;
}

.detail-poster img {
    width: 100%;
    border-radius: var(--baidu-radius);
    box-shadow: var(--baidu-shadow);
}

.poster-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 2px;
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--baidu-text);
    margin-bottom: 16px;
    line-height: 1.4;
}

.detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-tag {
    padding: 4px 12px;
    background: rgba(51, 133, 255, 0.1);
    color: var(--baidu-primary);
    font-size: 12px;
    border-radius: var(--baidu-radius);
}

.detail-meta {
    margin-bottom: 20px;
}

.meta-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
}

.meta-label {
    color: var(--baidu-text-secondary);
    min-width: 60px;
}

.meta-value {
    color: var(--baidu-text);
}

.detail-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 8px 20px;
    background: var(--baidu-primary);
    color: white;
    border: none;
    border-radius: var(--baidu-radius);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-block;
}

.action-btn:hover {
    background: var(--baidu-primary-dark);
}

.action-btn.secondary {
    background: var(--baidu-surface);
    color: var(--baidu-text);
    border: 1px solid var(--baidu-border);
}

.action-btn.secondary:hover {
    background: #f5f5f5;
    border-color: var(--baidu-primary);
    color: var(--baidu-primary);
}

.content-section {
    background: var(--baidu-surface);
    border-radius: var(--baidu-radius);
    padding: 20px;
    box-shadow: var(--baidu-shadow);
}

.detail-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--baidu-text);
    white-space: pre-wrap;
}

/* 底部样式 */
.baidu-footer {
    background: var(--baidu-surface);
    border-top: 1px solid var(--baidu-border);
    margin-top: 60px;
    padding: 30px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    text-align: center;
}

.footer-text {
    font-size: 12px;
    color: var(--baidu-text-light);
    margin-bottom: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
        height: auto;
        min-height: 60px;
        flex-wrap: wrap;
    }

    .header-left {
        width: 100%;
        justify-content: space-between;
        gap: 1rem;
    }

    .logo {
        flex-shrink: 0;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--baidu-surface);
        border-top: 1px solid var(--baidu-border);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: none;
        flex-direction: column;
        padding: 10px 15px;
        gap: 0;
        z-index: 999;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .main-nav[data-open="true"] {
        display: flex;
        max-height: 500px;
        padding: 15px;
    }

    .main-nav .nav-link {
        width: 100%;
        padding: 0 16px;
        height: 48px;
        line-height: 48px;
        border-radius: 0;
        margin-bottom: 0;
        border-bottom: 1px solid var(--baidu-border);
        border-left: none;
        border-right: none;
    }

    .main-nav .nav-link:last-child {
        border-bottom: none;
    }

    .main-nav .nav-link.active {
        border-bottom-color: var(--baidu-primary);
        background: rgba(51, 133, 255, 0.05);
    }

    .nav-toggle {
        display: flex;
        order: 2;
    }

    .header-right {
        order: 3;
        width: 100%;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--baidu-border);
    }

    .search-input {
        width: 100%;
        min-width: 0;
        flex: 1;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .detail-container {
        flex-direction: column;
    }

    .detail-poster {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .baidu-main {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .header-left {
        flex-wrap: nowrap;
    }

    .header-right {
        margin-top: 0;
    }

    .search-input {
        min-width: 150px;
        flex: 1;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .section-title {
        font-size: 18px;
    }
}

