/* ============================================
   红桃视频 - 主样式
   关键修复：导航强制横排，绝不竖排
============================================ */

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

:root {
    --red:        #ff3355;
    --red-light:  #ff6b84;
    --red-pale:   #fff0f2;
    --red-dark:   #cc1a35;
    --text:       #2d2d3a;
    --text-mid:   #606070;
    --text-light: #9999aa;
    --bg:         #fafafa;
    --bg-light:   #f6f4f5;
    --white:      #ffffff;
    --border:     #eedde0;
    --shadow:     0 2px 12px rgba(255,51,85,0.09);
    --shadow-md:  0 4px 22px rgba(255,51,85,0.14);
    --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;
    opacity: 0;
    transition: opacity 0.3s ease;
}
body.loaded { opacity: 1; }

a { color: inherit; text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--red); }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
ul { list-style: none; padding: 0; margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

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

/* header-inner：强制单行横排 */
.header-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 14px;
    padding: 10px 0;
    min-height: 56px;
}

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

/* 搜索框 */
.search-box {
    flex: 1 1 auto;
    max-width: 420px;
    min-width: 0;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    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(--red-light);
    box-shadow: 0 0 0 3px rgba(255,51,85,0.09);
}
.search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 8px 14px;
    font-size: 14px;
    color: var(--text);
    font-family: var(--font);
}
.search-input::placeholder { color: var(--text-light); }
.search-btn {
    flex-shrink: 0;
    background: var(--red);
    border: none;
    padding: 8px 14px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background var(--ease);
}
.search-btn:hover { background: var(--red-dark); }

/* 右侧操作 */
.header-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}
.btn-upload {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    background: var(--red-pale);
    color: var(--red);
    border: 1.5px solid #ffc0c8;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--ease);
    text-decoration: none;
}
.btn-upload:hover {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

/* 汉堡按钮 — 桌面默认隐藏 */
.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);
    width: 100%;
}

/* nav-list：强制横排，绝不换行 */
.nav-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-list::-webkit-scrollbar { display: none; }

/* 每个导航项 */
.nav-item {
    position: relative;
    flex-shrink: 0;
    display: block !important;
    width: auto !important;
    float: none !important;
}

/* 导航链接 */
.nav-item > a {
    display: block !important;
    padding: 9px 13px;
    font-size: 14px;
    color: var(--text-mid);
    white-space: nowrap;
    border-radius: var(--r-sm);
    transition: all var(--ease);
    text-decoration: none;
    line-height: 1.4;
}
.nav-item > a:hover,
.nav-item.active > a {
    color: var(--red);
    background: var(--red-pale);
}

/* 下拉菜单 — 桌面绝对定位 */
.drop-menu {
    display: none;
    position: absolute !important;
    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: 9999;
    padding: 5px 0;
    list-style: none;
}
.has-drop:hover .drop-menu { display: block; }
.drop-menu li a {
    display: block;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--text-mid);
    white-space: nowrap;
    transition: all var(--ease);
    text-decoration: none;
}
.drop-menu li a:hover {
    color: var(--red);
    background: var(--red-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 255px;
    gap: 14px;
    align-items: stretch;
}
.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;
    will-change: transform;
}
.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.65));
    color: white;
}
.slide-tag {
    display: inline-block;
    background: var(--red);
    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(--red);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--ease);
    text-decoration: none;
}
.slide-btn:hover { background: var(--red-dark); color: white; }

.slide-prev, .slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.88);
    color: var(--red);
    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(--red); 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(--red); 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;
    min-height: 0;
    transition: transform var(--ease);
}
.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.60));
    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(--red); 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(--red);
    border-radius: 2px;
}
.more-link {
    margin-left: auto;
    font-size: 13px;
    color: var(--red);
    padding: 4px 12px;
    border: 1px solid #ffc0c8;
    border-radius: 50px;
    transition: all var(--ease);
    white-space: nowrap;
    text-decoration: none;
}
.more-link:hover { background: var(--red); color: white; border-color: var(--red); }

.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(--red); border-color: var(--red); 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;
    text-decoration: none;
}
.vcard:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--red-light);
    color: inherit;
}
.vthumb {
    position: relative;
    height: 158px;
    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.65);
    color: white;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 3px;
}
.vhd {
    position: absolute;
    top: 7px; left: 7px;
    background: rgba(46,213,115,0.92);
    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(--red-pale);
    object-fit: cover;
    display: block;
}
.vmeta { flex: 1; min-width: 0; }
.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;
}
.vsub { font-size: 11px; color: var(--text-light); }

/* ============================================
   排行榜
============================================ */
.rank-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}
.rank-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    transition: background var(--ease);
    cursor: pointer;
}
.rank-item:hover { background: var(--red-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;
    display: block;
}
.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(--red-light);
}
.acard-large {
    grid-column: span 2;
    flex-direction: row;
}
.acard-large .aimg {
    width: 38%;
    flex-shrink: 0;
    min-height: 220px;
    height: auto;
}
.aimg {
    height: 168px;
    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(--red-pale);
    color: var(--red);
    border: 1px solid #ffc0c8;
    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(--red);
    font-size: 13px;
    font-weight: 600;
    margin-top: auto;
    text-decoration: none;
    transition: color var(--ease);
}
.amore:hover { color: var(--red-dark); }

/* ============================================
   页脚
============================================ */
.footer {
    background: #28282f;
    color: rgba(255,255,255,0.62);
    padding: 40px 0 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.07);
}
.footer-brand .f-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.footer-brand .f-logo span {
    font-size: 16px;
    font-weight: 800;
    color: white;
}
.footer-brand p {
    font-size: 13px;
    color: rgba(255,255,255,0.48);
    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.07);
}
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul li a {
    font-size: 13px;
    color: rgba(255,255,255,0.48);
    transition: all var(--ease);
    text-decoration: none;
    display: inline-block;
}
.footer-col ul li a:hover {
    color: var(--red-light);
    padding-left: 3px;
}
.footer-bottom {
    padding: 16px 0;
    text-align: center;
}
.footer-bottom p {
    font-size: 12px;
    color: rgba(255,255,255,0.32);
    margin-bottom: 4px;
    line-height: 1.7;
}
.footer-bottom a {
    color: rgba(255,255,255,0.42);
    transition: color var(--ease);
    text-decoration: none;
}
.footer-bottom a:hover { color: var(--red-light); }

/* ============================================
   回到顶部
============================================ */
.back-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 38px; height: 38px;
    background: var(--red);
    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,51,85,0.38);
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { background: var(--red-dark); transform: translateY(-2px); }

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

/* ★ 桌面端强制横排保障（≥769px）
   用 min-width 覆盖，优先级最高
============================================ */
@media screen and (min-width: 769px) {
    /* 汉堡按钮隐藏 */
    .nav-toggle { display: none !important; }

    /* 导航始终显示且横排 */
    .main-nav  { display: block !important; }
    .nav-list  {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
    }
    .nav-item  {
        display: block !important;
        width: auto !important;
        float: none !important;
        flex-shrink: 0 !important;
    }
    .nav-item > a {
        display: block !important;
        padding: 9px 13px !important;
        border-bottom: none !important;
        border-radius: var(--r-sm) !important;
        white-space: nowrap !important;
    }

    /* 下拉菜单绝对定位 */
    .drop-menu {
        position: absolute !important;
        display: none !important;
        top: 100% !important;
        left: 0 !important;
    }
    .has-drop:hover .drop-menu { display: block !important; }
    .has-drop.open  .drop-menu { display: none  !important; }
}

/* 1100px */
@media screen and (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 screen and (max-width: 900px) {
    .banner-wrap  { grid-template-columns: 1fr; }
    .banner-side  { flex-direction: row; height: 88px; }
    .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                    { border-right: none; }
    .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 screen and (max-width: 768px) {
    /* 显示汉堡按钮 */
    .nav-toggle { display: flex !important; }

    /* 搜索框缩小 */
    .search-box { max-width: 170px; }

    /* 投稿按钮文字隐藏 */
    .btn-upload svg + * { display: none; }
    .btn-upload { padding: 7px 10px; }

    /* 导航收起 */
    .main-nav { display: none !important; border-top: none; }
    .main-nav.open {
        display: block !important;
        border-top: 1px solid var(--border);
    }

    /* 移动端竖排 */
    .nav-list {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }
    .nav-item { width: 100% !important; }
    .nav-item > a {
        padding: 11px 16px !important;
        border-radius: 0 !important;
        border-bottom: 1px solid var(--border) !important;
    }

    /* 移动端下拉静态展开 */
    .drop-menu {
        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;
        z-index: auto !important;
    }
    .has-drop.open .drop-menu  { display: block !important; }
    .has-drop:hover .drop-menu { display: none  !important; }
    .has-drop.open:hover .drop-menu { display: block !important; }

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

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

