/* mitbbs Videos — 短视频 section styles (mobile-first) */

.hx-videos-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 14px 40px;
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}

/* ---- Hero header ---- */
.hx-videos-hero {
    background: linear-gradient(135deg, #b01e1e 0%, #d43a2f 55%, #e8a33d 130%);
    border-radius: 16px;
    padding: 26px 22px;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 6px 20px rgba(176, 30, 30, .25);
    position: relative;
    overflow: hidden;
}
.hx-videos-hero::after {
    content: "▶";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 90px;
    opacity: .14;
    pointer-events: none;
}
.hx-videos-hero h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
}
.hx-videos-hero p {
    margin: 0;
    font-size: 13px;
    opacity: .92;
}
.hx-videos-uploadbtn {
    display: inline-block;
    margin-top: 12px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .55);
    color: #fff;
    border-radius: 999px;
    padding: 7px 18px;
    font-size: 13px;
    text-decoration: none;
}
.hx-videos-uploadbtn:hover { background: rgba(255, 255, 255, .28); color: #fff; }

/* ---- Card grid: 2 cols on phones, more on desktop ---- */
.hx-videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 700px) {
    .hx-videos-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
    .hx-videos-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}
@media (min-width: 1300px) {
    .hx-videos-grid { grid-template-columns: repeat(5, 1fr); }
}

.hx-video-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex;
    flex-direction: column;
}
.hx-video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
}
.hx-video-thumb {
    position: relative;
    display: block;
    aspect-ratio: 9 / 13;
    background: #FFF9C4;
    overflow: hidden;
}
.hx-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hx-video-thumb-blank {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #FFFDE7 0%, #FFF9C4 100%);
}
.hx-video-thumb-blank::before {
    content: "▶";
    font-size: 44px;
    color: rgba(0, 0, 0, .4);
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(216, 58, 47, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
}
.hx-video-duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: .5px;
}
.hx-video-playhint {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: rgba(216, 58, 47, .92);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
}
.hx-video-cardbody { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; }
.hx-video-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hx-video-card a { text-decoration: none; }
.hx-video-card a:hover .hx-video-title { color: #b01e1e; }
.hx-video-meta {
    margin-top: auto;
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hx-video-meta .dot { opacity: .5; }

/* ---- Empty state ---- */
.hx-videos-empty {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 15px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

/* ---- Pager ---- */
.hx-videos-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 26px;
    font-size: 14px;
    color: #666;
}
.hx-videos-pager a {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 999px;
    padding: 8px 22px;
    color: #b01e1e;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.hx-videos-pager a:hover { border-color: #b01e1e; }

/* ---- Watch page ---- */
.hx-watch-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 14px 44px;
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}
.hx-watch-back {
    display: inline-block;
    margin-bottom: 14px;
    color: #b01e1e;
    font-size: 14px;
    text-decoration: none;
    font-weight: 700;
}
.hx-watch-player {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
    max-width: 100%;
    width: 100%;
}
.hx-watch-player video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 78vh;
    background: #000;
    object-fit: contain;
}
.hx-watch-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.5;
    color: #1c1c1c;
    margin: 18px 4px 8px;
}
.hx-watch-meta {
    font-size: 13px;
    color: #999;
    margin: 0 4px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hx-watch-meta .dot { opacity: .5; }
.hx-watch-desc {
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0 4px;
    font-size: 14px;
    line-height: 1.9;
    color: #444;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    white-space: pre-wrap;
}

/* ---- Upload form ---- */
.hx-post-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 18px 14px 44px;
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}
.hx-post-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px 22px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
}
.hx-post-card h1 { font-size: 22px; margin: 0 0 18px; color: #1c1c1c; }
.hx-post-error {
    background: #fdecea;
    border: 1px solid #f5c6c0;
    color: #b01e1e;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}
.hx-post-field { margin-bottom: 16px; }
.hx-post-field label { display: block; font-size: 14px; font-weight: 700; color: #333; margin-bottom: 6px; }
.hx-post-field input[type="text"],
.hx-post-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
}
.hx-post-field textarea { min-height: 120px; resize: vertical; }
.hx-post-field input[type="file"] { font-size: 14px; }
.hx-post-hint { font-size: 12px; color: #999; margin-top: 6px; }
.hx-post-submit {
    background: linear-gradient(135deg, #b01e1e, #d43a2f);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(176, 30, 30, .35);
}
.hx-post-submit:hover { filter: brightness(1.08); }

/* ---- Mobile: keep vertical video player compact ---- */
@media (max-width: 700px) {
    .hx-watch-player {
        max-width: 100%;
    }
    .hx-watch-player video {
        width: 100%;
        height: auto;
        max-height: 60vh;
    }
    .hx-watch-title {
        font-size: 17px;
    }
}
/* ---- Prevent horizontal overflow (forces zoom-out on iOS) ---- */
.hx-watch-wrap img,
.hx-watch-wrap video,
.hx-watch-wrap iframe,
.hx-watch-wrap table {
    max-width: 100%;
}
.hx-watch-wrap {
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.hx-watch-desc {
    word-break: break-word;
}