/* 糖心Vlog 外部CSS样式表 - 完整版 */
:root {
    --primary-color: #ff4d4f;
    --primary-light: #ff7875;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --white: #fff;
    --gray: #999;
    --border: #eee;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== Header ===== */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    gap: 15px;
}

.logo {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary-color);
    white-space: nowrap;
    letter-spacing: 1px;
}

.logo a {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}

nav a {
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

nav a:hover {
    color: var(--primary-color);
    background: #fff0f0;
}

.search-box {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.search-box input {
    padding: 7px 12px;
    border: 1px solid #ddd;
    border-radius: 20px 0 0 20px;
    outline: none;
    font-size: 13px;
    width: 200px;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box button {
    padding: 7px 16px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.search-box button:hover {
    background-color: var(--primary-light);
}

/* ===== Main Content ===== */
main {
    padding: 20px 0;
    min-height: 60vh;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Video Cards ===== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.video-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.video-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background-color: #1a1a1a;
    overflow: hidden;
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    border: 2px solid rgba(255,255,255,0.8);
}

.play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

.video-card:hover .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 12px 14px 14px;
}

.video-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    color: var(--text-color);
}

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

/* ===== FAQ Section ===== */
.faq-list {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item:first-child {
    padding-top: 0;
}

.faq-q {
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--primary-color);
    font-size: 14px;
}

.faq-a {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.7;
}

/* ===== Comments Section ===== */
.comment-list {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.comment-item {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-item:first-child {
    padding-top: 0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-user {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--text-color);
}

.comment-text {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Footer ===== */
footer {
    background-color: #1f1f1f;
    color: #bbb;
    padding: 35px 0 20px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 25px;
}

.footer-col {
    flex: 1;
    min-width: 0;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 700;
}

.footer-col p {
    font-size: 13px;
    line-height: 1.8;
    color: #aaa;
}

.footer-col ul li {
    margin-bottom: 8px;
    font-size: 13px;
}

.footer-col a {
    color: #aaa;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 18px;
    border-top: 1px solid #333;
    font-size: 12px;
    color: #777;
    line-height: 1.8;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
        gap: 8px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
    }

    nav a {
        font-size: 13px;
        padding: 5px 8px;
    }

    .search-box input {
        width: 140px;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        gap: 20px;
    }

    .video-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .section-title {
        font-size: 17px;
    }
}

@media (max-width: 400px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}
