/* Media Portal - China Railway 12306 Style: Sky Blue + Orange + White */

:root {
    /* ── 主色：12306天蓝 ── */
    --rail-blue: #2e7fc1;
    --rail-blue-dark: #1f67a8;
    --rail-blue-deeper: #154e84;
    --rail-blue-light: #e8f3fb;
    --rail-blue-mid: #9dcbe8;

    /* ── 点缀：12306橙色（查询按钮/高亮） ── */
    --rail-orange: #f07c00;
    --rail-orange-dark: #d66b00;
    --rail-orange-light: #fff4e6;
    --rail-orange-mid: #ffc87a;

    /* ── 导航栏：亮蓝带渐变 ── */
    --nav-from: #3a8fd4;
    --nav-to: #2476b8;

    /* ── 文字 ── */
    --text-dark: #1a1f2e;
    --text-body: #3d4560;
    --text-muted: #7a85a0;
    --text-dim: #b8bfd0;

    /* ── 背景 ── */
    --bg-page: #eef3f9;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-strip: #f6fafd;

    /* ── 边框/阴影 ── */
    --border: #d0e3f2;
    --border-soft: #e8f1f9;
    --shadow-xs: 0 1px 4px rgba(46,127,193,0.07);
    --shadow-sm: 0 2px 10px rgba(46,127,193,0.10);
    --shadow-md: 0 5px 22px rgba(46,127,193,0.14);

    /* ── 圆角 ── */
    --rd: 6px;
    --rd-sm: 4px;
    --rd-lg: 10px;

    --ease: all 0.2s ease;
    --blue-glow: 0 3px 14px rgba(46,127,193,0.26);
    --orange-glow: 0 3px 12px rgba(240,124,0,0.30);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', sans-serif;
    background: var(--bg-page);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════
   TOPBAR — 白色品牌区（非固定）
════════════════════════════════════ */
.rlw-topbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.rlw-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 16px;
}

/* 品牌：LOGO图标 + 名称 + 域名同行 */
.rlw-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.rlw-logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.rlw-logo-icon {
    width: 42px;
    height: 42px;
    background: var(--rail-orange);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(240,124,0,0.32);
}

.rlw-logo-icon::after {
    content: '⊙';
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.rlw-sitename {
    font-size: 22px;
    font-weight: 900;
    color: var(--rail-blue);
    letter-spacing: 1px;
    white-space: nowrap;
    line-height: 1.1;
}

.rlw-sitesub {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    display: block;
    margin-top: 2px;
    text-transform: uppercase;
}

.rlw-domain-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--rail-orange-light);
    border: 1px solid var(--rail-orange-mid);
    border-radius: var(--rd-sm);
    padding: 5px 14px;
}

.rlw-domain-lbl {
    font-size: 11px;
    color: var(--rail-orange-dark);
    font-weight: 700;
    white-space: nowrap;
}

.rlw-domain-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

/* ════════════════════════════════════
   BLUE NAV BAR — 亮蓝导航横条
════════════════════════════════════ */
.rlw-navbar {
    background: linear-gradient(90deg, var(--nav-from) 0%, var(--nav-to) 100%);
    border-bottom: 2px solid var(--rail-blue-deeper);
    padding: 0;
    margin-bottom: 0;
}

.rlw-navbar-inner {
    display: flex;
    align-items: center;
    height: 46px;
    gap: 0;
    overflow-x: auto;
}

.rlw-navbar-inner::-webkit-scrollbar { display: none; }

/* ════════════════════════════════════
   PAGE WRAPPER
════════════════════════════════════ */
.rlwwrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 14px;
}

.rlwpad { padding: 10px 0; }

/* ════════════════════════════════════
   CATEGORY NAV BLOCK
════════════════════════════════════ */
.rlw-catblock {
    background: var(--bg-white);
    border-radius: var(--rd);
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.rlw-catrow {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border-soft);
}

.rlw-catrow:last-child { border-bottom: none; }

.rlw-zone-lbl {
    font-weight: 800;
    font-size: 13px;
    color: var(--bg-white);
    white-space: nowrap;
    width: 9%;
    min-width: 58px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 4px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--rail-blue) 0%, var(--rail-blue-dark) 100%);
    letter-spacing: 0.3px;
    border-right: 2px solid var(--rail-blue-deeper);
}

.rlw-zone-links {
    width: 91%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px;
    align-items: center;
    background: var(--bg-strip);
}

.rlw-zone-links a {
    display: inline-block;
    color: var(--text-body);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--rd-sm);
    transition: var(--ease);
    background: var(--bg-white);
    border: 1px solid var(--border);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.rlw-zone-links a:hover {
    background: var(--rail-blue);
    color: var(--bg-white);
    border-color: var(--rail-blue);
    box-shadow: var(--blue-glow);
}

.rlw-zone-links a.active {
    background: var(--rail-blue);
    color: var(--bg-white);
    border-color: var(--rail-blue-dark);
    font-weight: 700;
    box-shadow: var(--blue-glow);
}

/* ════════════════════════════════════
   SEARCH BAR
════════════════════════════════════ */
.rlw-searchbar {
    background: var(--bg-white);
    border-radius: var(--rd);
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.rlw-searchbar form {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.rlw-searchbar input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: 9px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--rd-sm);
    background: var(--bg-strip);
    color: var(--text-dark);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
    font-family: inherit;
}

.rlw-searchbar input[type="text"]:focus {
    border-color: var(--rail-blue);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(46,127,193,0.1);
}

.rlw-searchbar input[type="text"]::placeholder { color: var(--text-dim); }

/* 普通按钮：蓝色 */
.rlw-searchbar button {
    padding: 9px 18px;
    border: none;
    border-radius: var(--rd-sm);
    background: var(--rail-blue);
    color: var(--bg-white);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.rlw-searchbar button:hover {
    background: var(--rail-blue-dark);
    box-shadow: var(--blue-glow);
}

/* 视频/磁力搜索按钮：橙色 */
.rlw-searchbar button[value="1"],
.rlw-searchbar button[value="2"] {
    background: var(--rail-orange);
    color: var(--bg-white);
}

.rlw-searchbar button[value="1"]:hover,
.rlw-searchbar button[value="2"]:hover {
    background: var(--rail-orange-dark);
    box-shadow: var(--orange-glow);
}

/* ════════════════════════════════════
   HOT TAGS
════════════════════════════════════ */
.rlw-taglist {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px 12px;
    background: var(--bg-white);
    border-radius: var(--rd);
    margin-bottom: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.rlw-tag {
    padding: 4px 12px;
    background: var(--bg-strip);
    border-radius: var(--rd-sm);
    color: var(--text-body);
    text-decoration: none;
    font-size: 12px;
    transition: var(--ease);
    border: 1px solid var(--border);
}

.rlw-tag:hover {
    background: var(--rail-blue-light);
    color: var(--rail-blue-dark);
    border-color: var(--rail-blue-mid);
}

/* ════════════════════════════════════
   SECTION HEADING — 左竖线 + 橙色底线
════════════════════════════════════ */
.rlw-section { margin-bottom: 18px; }

.rlw-sec-head {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-soft);
    position: relative;
    display: flex;
    align-items: center;
}

/* 底部橙色强调线 */
.rlw-sec-head::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 52px;
    height: 2px;
    background: var(--rail-orange);
    border-radius: 2px;
}

.rlw-sec-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: var(--text-dark);
    border-left: 4px solid var(--rail-blue);
    padding-left: 10px;
    line-height: 1.3;
}

.rlw-sec-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--ease);
}

.rlw-sec-title a:hover { color: var(--rail-blue); }

/* ════════════════════════════════════
   FILM CARD GRID
════════════════════════════════════ */
.rlw-filmgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
}

.rlw-filmgrid li {
    background: var(--bg-card);
    border-radius: var(--rd);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    transition: var(--ease);
}

.rlw-filmgrid li:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--rail-blue-mid);
}

.rlw-filmcover {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 600 / 350;
    background: var(--bg-strip);
}

.rlw-filmcover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s ease;
    display: block;
}

.rlw-filmcover:hover img { transform: scale(1.06); }

.rlw-filmcover::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--bg-white);
    background: rgba(46,127,193,0.52);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.rlw-filmcover:hover::after { opacity: 1; }

.rlw-filminfo { padding: 8px 10px 10px; }

.rlw-filminfo h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.rlw-filminfo h5 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--ease);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rlw-filminfo h5 a:hover { color: var(--rail-blue); }

/* ════════════════════════════════════
   VIDEO PLAYER
════════════════════════════════════ */
.MacPlayer {
    background: #000;
    border-radius: var(--rd);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: var(--shadow-md);
}

.video-container {
    width: 100%;
    height: 600px;
    max-height: 600px;
    margin-bottom: 14px;
    background: #000;
    border-radius: var(--rd);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
}

.video-container iframe,
.video-container video,
.video-container #video-container {
    width: 100%;
    height: 100%;
    border: none;
}

/* ════════════════════════════════════
   DETAIL TITLE
════════════════════════════════════ */
.rlw-detail-head {
    line-height: 1.8;
    text-align: center;
    padding: 13px 18px;
    font-size: 16px;
    margin: 10px 0;
    word-break: break-all;
    background: var(--bg-white);
    border-radius: var(--rd);
    border: 1px solid var(--border);
    border-top: 3px solid var(--rail-blue);
    box-shadow: var(--shadow-xs);
}

.rlw-detail-head a {
    color: var(--rail-blue);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
}

/* ════════════════════════════════════
   INFO PANEL
════════════════════════════════════ */
.rlw-infobox {
    font-size: 14px;
    line-height: 2;
    padding: 18px 22px;
    background: var(--bg-white);
    border-radius: var(--rd);
    margin: 12px 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    border-top: 3px solid var(--rail-blue);
}

/* ════════════════════════════════════
   TORRENT CAPTURE
════════════════════════════════════ */
.rlw-preview img,
.rlw-preview .img_item img {
    width: 100%;
    height: auto;
    border-radius: var(--rd-sm);
    border: 1px solid var(--border);
    display: block;
}

.rlw-preview .img_item { width: 100%; }

/* ════════════════════════════════════
   DOWNLOAD BUTTONS — 橙色主色
════════════════════════════════════ */
.rlw-dlzone {
    text-align: center;
    padding: 16px;
    background: var(--bg-white);
    border-radius: var(--rd);
    margin: 12px 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
}

.rlw-dlbtn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--rail-orange);
    color: var(--bg-white);
    text-decoration: none;
    border-radius: var(--rd-sm);
    font-weight: 700;
    font-size: 14px;
    transition: var(--ease);
    border: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
}

.rlw-dlbtn:hover {
    background: var(--rail-orange-dark);
    box-shadow: var(--orange-glow);
}

/* ════════════════════════════════════
   SHARE SECTION
════════════════════════════════════ */
.share-section {
    background: var(--bg-white);
    border-radius: var(--rd);
    padding: 13px 16px;
    margin: 12px 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-url-display {
    background: var(--bg-strip);
    border: 1px solid var(--border);
    border-radius: var(--rd-sm);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.share-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--rail-blue);
    white-space: nowrap;
    flex-shrink: 0;
}

.share-url {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-copy-btn {
    padding: 9px 18px;
    background: var(--rail-orange);
    color: var(--bg-white);
    border: none;
    border-radius: var(--rd-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.share-copy-btn:hover {
    background: var(--rail-orange-dark);
    box-shadow: var(--orange-glow);
}

.share-icon { font-size: 15px; }

/* ════════════════════════════════════
   PAGINATION
════════════════════════════════════ */
.page_info_div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.a_page_info,
.page_info_focus {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--rd-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    min-width: 34px;
    text-align: center;
}

.a_page_info {
    background: var(--bg-white);
    color: var(--text-body);
    border: 1px solid var(--border);
}

.a_page_info:hover {
    background: var(--rail-blue);
    border-color: var(--rail-blue);
    color: var(--bg-white);
}

.page_info_focus {
    background: var(--rail-orange);
    color: var(--bg-white);
    border: 1px solid var(--rail-orange-dark);
    cursor: default;
}

/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
.rlw-footer {
    padding: 22px 0;
    text-align: center;
    background: var(--bg-white);
    border-top: 3px solid var(--rail-blue);
    margin-top: 24px;
}

.rlw-footer p {
    margin: 5px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.rlw-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--ease);
}

.rlw-footer a:hover { color: var(--rail-blue); }

/* ════════════════════════════════════
   FRIEND LINKS
════════════════════════════════════ */
.rlw-flinks {
    padding: 12px 14px;
    background: var(--bg-white);
    border-radius: var(--rd);
    border: 1px solid var(--border);
}

.rlw-flinks dl { margin: 0; }
.rlw-flinks dd { display: inline-block; margin: 3px 5px; }

.rlw-flinks a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--ease);
    font-size: 13px;
}

.rlw-flinks a:hover { color: var(--rail-blue); }

/* ════════════════════════════════════
   UTILITIES
════════════════════════════════════ */
.clearfix::after { content: ""; display: table; clear: both; }

.hide-mobile { display: block; }
.hide-pc { display: block; }

@media (max-width: 768px)  { .hide-mobile { display: none !important; } }
@media (min-width: 769px)  { .hide-pc     { display: none !important; } }

img[data-original] { background: var(--bg-strip); }

/* ════════════════════════════════════
   RESPONSIVE ≤ 768px
════════════════════════════════════ */
@media (max-width: 768px) {

    .rlwwrap { padding: 0 8px; }

    .rlw-topbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 8px; }
    .rlw-logo-icon    { width: 34px; height: 34px; }
    .rlw-logo-icon::after { font-size: 18px; }
    .rlw-sitename     { font-size: 18px; }
    .rlw-domain-row   { padding: 3px 10px; gap: 5px; }
    .rlw-domain-lbl   { font-size: 10px; }
    .rlw-domain-val   { font-size: 12px; }

    .rlwpad { padding: 6px 0; }

    /* Mobile nav */
    .rlw-catrow { display: flex; align-items: stretch; }

    .rlw-zone-lbl {
        width: 13%;
        min-width: 34px;
        font-size: 10px;
        padding: 4px 2px;
        letter-spacing: 0;
        border-right-width: 1px;
    }

    .rlw-zone-links {
        width: 87%;
        gap: 4px;
        padding: 5px 6px;
    }

    .rlw-zone-links a {
        font-size: 14px;
        padding: 6px 2px;
        width: calc((100% - 12px) / 4);
    }

    /* 2-column grid */
    .rlw-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .rlw-filminfo       { padding: 6px 8px 8px; }
    .rlw-filminfo h5    { font-size: 12px; }
    .rlw-sec-title      { font-size: 16px; padding-left: 8px; }

    .video-container    { height: 56.25vw; max-height: 380px; }

    .rlw-taglist  { padding: 8px 10px; gap: 5px; }
    .rlw-tag      { padding: 3px 10px; font-size: 12px; }

    .rlw-searchbar      { padding: 8px 10px; }
    .rlw-searchbar form { gap: 6px; }
    .rlw-searchbar input[type="text"] { min-width: 80px; padding: 8px 12px; font-size: 13px; }
    .rlw-searchbar button             { padding: 8px 12px; font-size: 12px; }

    .rlw-dlzone { padding: 12px 8px; gap: 8px; }
    .rlw-dlbtn  { padding: 9px 14px; font-size: 12px; }

    .share-section      { padding: 10px 12px; gap: 8px; }
    .share-url-display  { padding: 7px 12px; gap: 6px; }
    .share-label        { font-size: 11px; }
    .share-url          { font-size: 11px; }
    .share-copy-btn     { padding: 8px 12px; font-size: 12px; }

    .rlw-section  { margin-bottom: 14px; }
    .rlw-sec-head { margin-bottom: 10px; }
    .rlw-infobox  { padding: 14px 16px; font-size: 13px; }
}

/* ════════════════════════════════════
   RESPONSIVE ≤ 480px
════════════════════════════════════ */
@media (max-width: 480px) {

    .rlw-sitename { font-size: 15px; }

    .rlw-zone-lbl {
        width: 13%;
        min-width: 30px;
        font-size: 9px;
        padding: 3px 1px;
    }

    .rlw-zone-links {
        width: 87%;
        gap: 3px;
        padding: 4px 4px;
    }

    .rlw-zone-links a {
        font-size: 13px;
        padding: 5px 1px;
        width: calc((100% - 9px) / 4);
    }

    .rlw-filmgrid   { gap: 8px; }
    .rlw-dlbtn      { padding: 8px 10px; font-size: 11px; }
    .rlw-dlzone     { padding: 10px 4px; gap: 5px; }
    .share-section  { padding: 8px; gap: 6px; }
    .share-copy-btn { padding: 8px 10px; font-size: 11px; }
    .video-container { height: 56.25vw; max-height: 280px; }
}
