﻿/* ============================================
   糖心Vlog 主样式表
   最后更新: 2024-03-15
   维护: 前端组 - 小李
   ============================================ */

/* 变量定义 - 主题色后续可能要调整 */
:root {
    --primary: #ff4d6d;
    --primary-dark: #c9184a;
    --primary-light: #ffb3c6;
    --secondary: #ffb3c6;
    --accent: #ff8fa3;
    --dark: #2b2d42;
    --dark-light: #4a4e69;
    --light: #f8f9fa;
    --gray: #8d99ae;
    --gray-light: #e9ecef;
    --gradient: linear-gradient(145deg, #ff4d6d, #c9184a);
    --shadow: 0 10px 30px rgba(255, 77, 109, 0.15);
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.08);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --transition: all 0.25s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background: #fafafa;
    color: var(--dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 容器 - 响应式宽度 */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* ========== 头部样式 ========== */
header {
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

/* Logo区域 */
.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-circle {
    width: 44px;
    height: 44px;
    background: var(--gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    transform: rotate(4deg);
    box-shadow: var(--shadow-sm);
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.logo-text span {
    font-size: 11px;
    color: var(--gray);
    display: block;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-menu a {
    padding: 8px 18px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 15px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.nav-menu a:hover {
    background: rgba(255, 77, 109, 0.08);
    color: var(--primary);
}

.nav-menu a.active {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.3);
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
}

/* ========== 搜索区域 ========== */
.search-section {
    margin: 28px 0 32px;
}

.search-wrapper {
    background: #fff;
    border-radius: 60px;
    padding: 4px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-light);
    transition: var(--transition);
}

.search-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.2);
    border-color: var(--primary-light);
}

.search-wrapper input {
    flex: 1;
    border: none;
    padding: 14px 24px;
    font-size: 15px;
    outline: none;
    background: transparent;
    border-radius: 60px;
}

.search-wrapper input::placeholder {
    color: var(--gray);
}

.search-wrapper button {
    background: var(--gradient);
    color: #fff;
    border: none;
    padding: 10px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 4px;
}

.search-wrapper button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 77, 109, 0.35);
}

.hot-searches {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
}

.hot-label {
    color: var(--gray);
    font-weight: 500;
}

.hot-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hot-tags a {
    color: var(--dark);
    text-decoration: none;
    padding: 4px 14px;
    background: #fff;
    border-radius: 30px;
    border: 1px solid var(--gray-light);
    font-size: 13px;
    transition: var(--transition);
}

.hot-tags a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ========== Hero区域 ========== */
.hero-section {
    background: linear-gradient(135deg, #fff5f7 0%, #ffeef3 100%);
    border-radius: var(--radius-lg);
    padding: 48px 44px;
    margin: 28px 0 36px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 580px;
}

.hero-badge {
    background: rgba(255, 77, 109, 0.12);
    color: var(--primary-dark);
    padding: 6px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 18px;
}

.hero-content h2 {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--dark);
}

.hero-content h2 span {
    color: var(--primary);
    display: block;
    font-size: 32px;
    font-weight: 500;
    margin-top: 8px;
}

.hero-content p {
    color: var(--dark-light);
    margin-bottom: 28px;
    font-size: 16px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 36px;
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-item .label {
    font-size: 13px;
    color: var(--gray);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 32px;
    }
    .hero-stats {
        gap: 24px;
    }
}

/* ========== 通用区块头部 ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h3 {
    font-size: 24px;
    font-weight: 700;
    position: relative;
    padding-left: 14px;
}

.section-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.view-all:hover {
    opacity: 0.8;
}

/* ========== 视频卡片网格 ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.video-item {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.video-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

/* 缩略图区域 */
.thumbnail {
    position: relative;
    height: 170px;
    overflow: hidden;
    background: #f0f0f0;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-item:hover .thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}

.video-item:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.play-icon::after {
    content: '';
    border-left: 18px solid var(--primary);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    margin-left: 5px;
}

.video-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gradient);
    color: #fff;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    backdrop-filter: blur(4px);
}

/* 视频信息区域 */
.video-info {
    padding: 14px 16px 16px;
}

.video-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--dark);
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--gray);
    font-size: 12px;
}

.uploader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.uploader img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========== 分类区域 ========== */
.categories {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    margin: 40px 0;
    box-shadow: var(--shadow-sm);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.category-item {
    background: linear-gradient(145deg, #fff, #fafafa);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 20px 12px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.category-item:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(255, 77, 109, 0.1);
    transform: translateY(-3px);
}

.category-icon {
    font-size: 34px;
    margin-bottom: 10px;
}

.category-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-item span {
    font-size: 11px;
    color: var(--gray);
}

/* ========== 排行榜 ========== */
.rankings {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    margin: 40px 0;
    box-shadow: var(--shadow-sm);
}

.rankings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.rank-card {
    background: #fafbfc;
    border-radius: var(--radius-md);
    padding: 20px;
}

.rank-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-light);
}

.rank-icon {
    width: 34px;
    height: 34px;
    background: var(--gradient);
    border-radius: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.rank-header h4 {
    font-size: 17px;
    font-weight: 700;
}

.rank-list {
    list-style: none;
}

.rank-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
    transition: var(--transition);
}

.rank-list li:last-child {
    border-bottom: none;
}

.rank-list li:hover {
    background: rgba(255, 77, 109, 0.03);
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 12px;
}

.rank-num {
    width: 26px;
    height: 26px;
    background: var(--gray-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray);
}

.rank-list li:nth-child(1) .rank-num {
    background: var(--gradient);
    color: #fff;
}

.rank-list li:nth-child(2) .rank-num {
    background: linear-gradient(145deg, #ffb3c6, #ff8fa3);
    color: #fff;
}

.rank-list li:nth-child(3) .rank-num {
    background: linear-gradient(145deg, #ffd6e0, #ffb3c6);
    color: #fff;
}

.rank-info {
    flex: 1;
}

.rank-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.rank-stats {
    font-size: 11px;
    color: var(--gray);
}

@media (max-width: 900px) {
    .rankings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========== 页脚 ========== */
footer {
    background: #1a1a2a;
    color: #fff;
    padding: 56px 0 32px;
    margin-top: 60px;
    border-radius: 40px 40px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1.2fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-about h4 {
    font-size: 20px;
    margin-bottom: 16px;
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-about p {
    color: #aaa;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

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

.footer-links a {
    display: block;
    color: #aaa;
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #666;
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    footer {
        padding: 40px 0 28px;
    }
}

/* ========== 工具类 ========== */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 8px;
}
.mt-3 {
    margin-top: 16px;
}
.mb-2 {
    margin-bottom: 8px;
}
.mb-3 {
    margin-bottom: 16px;
}

/* 图片加载失败占位 */
img {
    background: #f0f0f0;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}