/* ============================================
   蜜桃视频 - 主样式
============================================ */

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

:root {
    --pink:       #ff4d6d;
    --pink-light: #ff8fa3;
    --pink-pale:  #fff0f3;
    --pink-dark:  #c9374f;
    --text:       #333344;
    --text-mid:   #666677;
    --text-light: #999aaa;
    --bg:         #fafafa;
    --bg-light:   #f8f4f5;
    --white:      #ffffff;
    --border:     #f0e0e4;
    --shadow:     0 2px 12px rgba(255,77,109,0.10);
    --shadow-md:  0 4px 20px rgba(255,77,109,0.15);
    --r:          10px;
    --r-sm:       6px;
    --ease:       0.22s ease;
    --font:       'PingFang SC','Microsoft YaHei',Arial,sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; overflow-x: hidden; }
a { color: inherit; text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--pink); }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================
   Header
============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    flex-wrap: nowrap;
}

/* Logo */
.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}
.logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--pink);
    letter-spacing: 0.5px;
}

/* 搜索框 */
.search-box {
    flex: 1;
    max-width: 400px;
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.search-box:focus-within {
    border-color: var(--pink-light);
    box-shadow: 0 0 0 3px rgba(255,77,109,0.10);
}
.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 8px 14px;
    font-size: 14px;
    color: var(--text);
    font-family: var(--font);
    min-width: 0;
}
.search-input::placeholder { color: var(--text-light); }
.search-btn {
    background: var(--pink);
    border: none;
    padding: 8px 14px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background var(--ease);
    flex-shrink: 0;
}
.search-btn:hover { background: var(--pink-dark); }

/* 右侧 */
.header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}
.btn-primary {
    padding: 7px 18px;
    background: var(--pink);
    color: white;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--ease);
    white-space: nowrap;
}
.btn-primary:hover { background: var(--pink-dark); color: white; transform: translateY(-1px); }

/* 汉堡按钮 — 桌面隐藏 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-mid);
    border-radius: 2px;
    transition: all var(--ease);
}

/* ============================================
   主导航
============================================ */
.main-nav { border-top: 1px solid var(--border); }

.main-nav > ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0;
    margin: 0;
    list-style: none;
}
.main-nav > ul::-webkit-scrollbar { display: none; }

.main-nav > ul > li {
    position: relative;
    flex-shrink: 0;
}
.main-nav > ul > li > a {
    display: block;
    padding: 9px 13px;
    font-size: 14px;
    color: var(--text-mid);
    white-space: nowrap;
    border-radius: var(--r-sm);
    transition: all var(--ease);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a {
    color: var(--pink);
    background: var(--pink-pale);
}

/* 下拉菜单 */
.drop {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    min-width: 120px;
    box-shadow: var(--shadow-md);
    z-index: 999;
    padding: 5px 0;
    list-style: none;
}
.has-drop:hover .drop { display: block; }
.drop li a {
    display: block;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--text-mid);
    transition: all var(--ease);
    white-space: nowrap;
}
.drop li a:hover { color: var(--pink); background: var(--pink-pale); padding-left: 18px; }

/* ============================================
   Banner
============================================ */
.banner-section { padding: 18px 0; background: white; border-bottom: 1px solid var(--border); }

.banner-wrap {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 14px;
}

.banner-main {
    position: relative;
    border-radius: var(--r);
    overflow: hidden;
    height: 320px;
}
.banner-track {
    display: flex;
    flex-direction: row;
    height: 100%;
    transition: transform 0.5s ease;
}
.slide {
    min-width: 100%;
    position: relative;
    height: 100%;
    flex-shrink: 0;
}
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 24px 24px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.62));
    color: white;
}
.slide-tag {
    display: inline-block;
    background: var(--pink);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 50px;
    margin-bottom: 7px;
}
.slide-info h2 { font-size: 18px; font-weight: 800; margin-bottom: 5px; line-height: 1.3; }
.slide-info p { font-size: 12px; opacity: 0.85; margin-bottom: 10px; }
.slide-btn {
    display: inline-block;
    background: var(--pink);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--ease);
}
.slide-btn:hover { background: var(--pink-dark); color: white; }

.slide-prev, .slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    color: var(--pink);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ease);
    box-shadow: var(--shadow);
}
.slide-prev:hover, .slide-next:hover { background: var(--pink); color: white; }
.slide-prev { left: 10px; }
.slide-next { right: 10px; }

.slide-dots {
    position: absolute;
    bottom: 10px;
    right: 14px;
    display: flex;
    flex-direction: row;
    gap: 5px;
    z-index: 10;
}
.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all var(--ease);
}
.dot.active { background: var(--pink); width: 18px; border-radius: 3px; }

/* 侧边 */
.banner-side {
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.side-card {
    flex: 1;
    position: relative;
    border-radius: var(--r-sm);
    overflow: hidden;
    display: block;
    transition: transform var(--ease);
    min-height: 0;
}
.side-card:hover { transform: translateY(-2px); }
.side-card img { width: 100%; height: 100%; object-fit: cover; }
.side-mask {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 7px 9px;
    background: linear-gradient(transparent, rgba(0,0,0,0.58));
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}
.side-mask p { font-size: 11px; color: white; font-weight: 600; }
.badge { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 50px; flex-shrink: 0; }
.badge.hot  { background: #ff4757; color: white; }
.badge.new  { background: var(--pink); color: white; }
.badge.live { background: #2ed573; color: white; }

/* ============================================
   通用 Section
============================================ */
.section { padding: 36px 0; }
.bg-light { background: var(--bg-light); }

.sec-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.sec-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    padding-left: 10px;
    position: relative;
    white-space: nowrap;
}
.sec-title::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 18px;
    background: var(--pink);
    border-radius: 2px;
}
.more-link {
    margin-left: auto;
    font-size: 13px;
    color: var(--pink);
    padding: 4px 12px;
    border: 1px solid var(--pink-light);
    border-radius: 50px;
    transition: all var(--ease);
    white-space: nowrap;
}
.more-link:hover { background: var(--pink); color: white; }

/* 筛选标签 */
.tabs { display: flex; flex-direction: row; gap: 5px; flex-wrap: wrap; }
.tab {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 13px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-mid);
    cursor: pointer;
    transition: all var(--ease);
    font-family: var(--font);
    white-space: nowrap;
}
.tab:hover, .tab.active { background: var(--pink); border-color: var(--pink); color: white; }

/* ============================================
   视频卡片
============================================ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.vcard {
    background: white;
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--ease);
    display: block;
    color: inherit;
}
.vcard:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--pink-light);
    color: inherit;
}

.vthumb {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: var(--bg-light);
}
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.vcard:hover .vthumb img { transform: scale(1.05); }

.vplay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--ease);
    font-size: 28px;
    color: white;
}
.vthumb:hover .vplay { opacity: 1; }

.vdur {
    position: absolute;
    bottom: 7px; right: 7px;
    background: rgba(0,0,0,0.62);
    color: white;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 3px;
}
.vhd {
    position: absolute;
    top: 7px; left: 7px;
    background: rgba(46,213,115,0.9);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
}

.vinfo {
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 10px 11px 12px;
    align-items: flex-start;
}
.vavatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--pink-pale);
    object-fit: cover;
}
.vtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
}
.vmeta { font-size: 11px; color: var(--text-light); }

/* ============================================
   排行榜
============================================ */
.rank-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    background: white;
}

.rank-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    transition: background var(--ease);
    cursor: pointer;
}
.rank-item:hover { background: var(--pink-pale); }
/* 右列去掉右边框 */
.rank-item:nth-child(2n) { border-right: none; }
/* 最后两个去掉下边框 */
.rank-item:nth-last-child(-n+2) { border-bottom: none; }

.rnum {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    flex-shrink: 0;
}
.r1 { background: linear-gradient(135deg,#FFD700,#FFA500); color: white; }
.r2 { background: linear-gradient(135deg,#C0C0C0,#909090); color: white; }
.r3 { background: linear-gradient(135deg,#CD7F32,#A0522D); color: white; }

.rank-item img {
    width: 64px;
    height: 42px;
    object-fit: cover;
    border-radius: var(--r-sm);
    flex-shrink: 0;
}
.rinfo { flex: 1; min-width: 0; }
.rtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.rmeta { font-size: 11px; color: var(--text-light); }

/* ============================================
   文章区
============================================ */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.acard {
    background: white;
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--ease);
    display: flex;
    flex-direction: column;
}
.acard:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--pink-light);
}

/* 大图文章横跨两列 */
.acard-large {
    grid-column: span 2;
    flex-direction: row;
}
.acard-large .aimg {
    width: 38%;
    flex-shrink: 0;
    height: auto;
    min-height: 220px;
}

.aimg {
    height: 170px;
    overflow: hidden;
    flex-shrink: 0;
}
.aimg img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.acard:hover .aimg img { transform: scale(1.04); }

.abody {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.ameta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.atag {
    background: var(--pink-pale);
    color: var(--pink);
    border: 1px solid #ffc8d2;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
}
.adate { font-size: 12px; color: var(--text-light); margin-left: auto; }
.atitle {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.5;
}
.atext {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.amore {
    display: inline-block;
    color: var(--pink);
    font-size: 13px;
    font-weight: 600;
    margin-top: auto;
    transition: color var(--ease);
}
.amore:hover { color: var(--pink-dark); }

/* ============================================
   页脚
============================================ */
.footer {
    background: #2a2a35;
    color: rgba(255,255,255,0.65);
    padding: 40px 0 0;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .fbrand-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.footer-brand .fbrand-logo span {
    font-size: 16px;
    font-weight: 800;
    color: white;
}
.footer-brand p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.8;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul li a {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    transition: all var(--ease);
}
.footer-col ul li a:hover { color: var(--pink-light); padding-left: 3px; }

.flink-list { display: flex; flex-direction: column; gap: 0; }

.footer-bottom {
    padding: 16px 0;
    text-align: center;
}
.footer-bottom p {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 4px;
    line-height: 1.7;
}
.footer-bottom a { color: rgba(255,255,255,0.45); transition: color var(--ease); }
.footer-bottom a:hover { color: var(--pink-light); }

/* ============================================
   回到顶部
============================================ */
.back-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 38px; height: 38px;
    background: var(--pink);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--ease);
    box-shadow: 0 3px 12px rgba(255,77,109,0.38);
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { background: var(--pink-dark); transform: translateY(-2px); }

/* ============================================
   响应式
============================================ */

/* 桌面端强制横排（≥769px）*/
@media (min-width: 769px) {
    .nav-toggle       { display: none !important; }
    .main-nav         { display: block !important; }
    .main-nav > ul    { flex-direction: row !important; flex-wrap: nowrap !important; }
    .main-nav > ul > li { width: auto !important; }
    .main-nav > ul > li > a { border-bottom: none !important; border-radius: var(--r-sm) !important; }
    .drop             { position: absolute !important; display: none !important; }
    .has-drop:hover .drop { display: block !important; }
    .has-drop.open .drop  { display: none !important; }
}

/* 1100px */
@media (max-width: 1100px) {
    .video-grid   { grid-template-columns: repeat(3, 1fr); }
    .footer-grid  { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand { grid-column: span 3; }
}

/* 900px */
@media (max-width: 900px) {
    .banner-wrap  { grid-template-columns: 1fr; }
    .banner-side  { flex-direction: row; height: 90px; }
    .banner-main  { height: 260px; }
    .article-grid { grid-template-columns: 1fr; }
    .acard-large  { flex-direction: column; grid-column: span 1; }
    .acard-large .aimg { width: 100%; min-height: 180px; }
    .rank-grid    { grid-template-columns: 1fr; }
    .rank-item:nth-child(2n)      { border-right: 1px solid var(--border); }
    .rank-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
    .rank-item:last-child          { border-bottom: none; }
    .footer-grid  { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; }
}

/* 768px（移动端）*/
@media (max-width: 768px) {
    .nav-toggle { display: flex !important; }
    .search-box { max-width: 180px; }
    .btn-primary { padding: 6px 12px; font-size: 12px; }

    .main-nav { display: none !important; border-top: none; }
    .main-nav.open {
        display: block !important;
        border-top: 1px solid var(--border);
    }
    .main-nav > ul {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }
    .main-nav > ul > li { width: 100% !important; }
    .main-nav > ul > li > a {
        padding: 10px 16px !important;
        border-radius: 0 !important;
        border-bottom: 1px solid var(--border) !important;
    }
    .drop {
        position: static !important;
        display: none !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        background: var(--bg-light) !important;
        padding-left: 14px !important;
        min-width: unset !important;
    }
    .has-drop.open .drop  { display: block !important; }
    .has-drop:hover .drop { display: none !important; }
    .has-drop.open:hover .drop { display: block !important; }

    .video-grid   { grid-template-columns: repeat(2, 1fr); }
    .banner-side  { display: none; }
    .banner-wrap  { grid-template-columns: 1fr; }
    .footer-grid  { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; }
    .sec-head     { flex-wrap: wrap; }
}

/* 480px */
@media (max-width: 480px) {
    .video-grid   { grid-template-columns: 1fr; }
    .footer-grid  { grid-template-columns: 1fr; }
    .footer-brand { grid-column: auto; }
    .search-box   { max-width: 140px; }
    .banner-main  { height: 200px; }
    .slide-info h2 { font-size: 15px; }
    .slide-info p  { display: none; }
    .section       { padding: 24px 0; }
    .logo-text     { font-size: 16px; }
}
