/* Media Portal - SHEIN Style Theme: Clean White + Pink/Coral */

:root {
    --pk-main: #e8506a;
    --pk-deep: #d03a54;
    --pk-light: #fde8ec;
    --pk-soft: #fff0f3;
    --pk-orange: #f97050;
    --clr-text: #1a1a2e;
    --clr-sub: #555577;
    --clr-muted: #999bb5;
    --clr-surface: #ffffff;
    --clr-base: #f7f7fb;
    --clr-border: #ebebf5;
    --clr-border-soft: #f3f3f8;
    --clr-shadow: rgba(30, 20, 60, 0.06);
    --clr-shadow-md: rgba(30, 20, 60, 0.12);
    --grad-main: linear-gradient(135deg, #e8506a 0%, #f97050 100%);
    --grad-btn: linear-gradient(135deg, #e8506a 0%, #d03a54 100%);
    --grad-soft: linear-gradient(135deg, #fde8ec 0%, #fef3e8 100%);
    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --ease: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: var(--clr-base);
    color: var(--clr-text);
    line-height: 1.55;
    font-size: 14px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== SITE HEADER ===== */
.site-topbar {
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    padding: 0.5rem 0;
    box-shadow: 0 2px 8px var(--clr-shadow);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.logo-anchor {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.logo-text {
    font-size: 28px;
    font-weight: 900;
    background: var(--grad-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    font-style: normal;
    border-bottom: none;
    text-decoration: none;
    line-height: 1.2;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--grad-soft);
    border: 1.5px solid rgba(232, 80, 106, 0.25);
    border-radius: var(--r-xl);
    padding: 5px 14px;
}

.domain-badge .badge-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--pk-main);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.domain-badge .badge-url {
    font-size: 16px;
    font-weight: 800;
    color: var(--clr-text);
    letter-spacing: 0.2px;
}

/* ===== LAYOUT WRAPPER ===== */
.page-wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.row-gap {
    padding: 8px 0;
}

/* ===== CATEGORY NAVIGATION ===== */
.nav-panel {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px var(--clr-shadow);
}

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

.nav-strip:last-child {
    border-bottom: none;
}

.zone-tag {
    font-weight: 700;
    font-size: 13px;
    color: var(--clr-surface);
    background: var(--grad-main);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 4px;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.link-cluster {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px;
    align-items: center;
    background: var(--clr-surface);
}

.link-cluster a {
    display: inline-block;
    color: var(--clr-sub);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--r-xs);
    transition: var(--ease);
    background: var(--clr-base);
    border: 1px solid var(--clr-border);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.link-cluster a:hover,
.link-cluster a.active {
    background: var(--grad-btn);
    color: #fff;
    border-color: var(--pk-main);
    box-shadow: 0 2px 8px rgba(232, 80, 106, 0.28);
    font-weight: 600;
}

/* ===== SEARCH BAR ===== */
.search-unit {
    background: var(--clr-surface);
    border-radius: var(--r-md);
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid var(--clr-border);
    box-shadow: 0 2px 6px var(--clr-shadow);
}

.search-unit form {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
}

.search-unit input[type="text"] {
    flex: 1;
    min-width: 60px;
    padding: 9px 13px;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-sm);
    background: var(--clr-base);
    color: var(--clr-text);
    font-size: 14px;
    outline: none;
    transition: var(--ease);
    font-family: inherit;
}

.search-unit input[type="text"]:focus {
    border-color: var(--pk-main);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232, 80, 106, 0.1);
}

.search-unit input[type="text"]::placeholder {
    color: var(--clr-muted);
}

.search-unit button {
    padding: 9px 13px;
    border: none;
    border-radius: var(--r-sm);
    background: var(--grad-btn);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.search-unit button:hover {
    background: linear-gradient(135deg, #d03a54 0%, #b02040 100%);
    box-shadow: 0 4px 12px rgba(232, 80, 106, 0.3);
}

/* ===== HOT KEYWORD TAGS ===== */
.keyword-cloud {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 10px 12px;
    background: var(--clr-surface);
    border-radius: var(--r-md);
    margin-bottom: 8px;
    border: 1px solid var(--clr-border);
    box-shadow: 0 2px 6px var(--clr-shadow);
}

.keyword-cloud a {
    padding: 5px 12px;
    background: var(--pk-soft);
    border-radius: 20px;
    color: var(--pk-main);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    border: 1px solid rgba(232, 80, 106, 0.15);
    font-weight: 500;
}

.keyword-cloud a:hover {
    background: var(--grad-btn);
    color: #fff;
    border-color: var(--pk-main);
    box-shadow: 0 2px 8px rgba(232, 80, 106, 0.2);
}

/* ===== SECTION BLOCKS ===== */
.content-block {
    margin-bottom: 12px;
}

.block-header {
    margin-bottom: 10px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--clr-border);
    position: relative;
}

.block-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 44px;
    height: 2px;
    background: var(--grad-main);
    border-radius: 2px;
}

.block-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--clr-text);
    letter-spacing: -0.3px;
}

.block-title a {
    color: var(--clr-text);
    text-decoration: none;
    transition: var(--ease);
}

.block-title a:hover {
    color: var(--pk-main);
}

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

.card-grid li {
    position: relative;
    animation: popIn 0.45s ease backwards;
}

.card-grid li:nth-child(1) { animation-delay: 0.03s; }
.card-grid li:nth-child(2) { animation-delay: 0.06s; }
.card-grid li:nth-child(3) { animation-delay: 0.09s; }
.card-grid li:nth-child(4) { animation-delay: 0.12s; }
.card-grid li:nth-child(5) { animation-delay: 0.15s; }
.card-grid li:nth-child(6) { animation-delay: 0.18s; }
.card-grid li:nth-child(7) { animation-delay: 0.21s; }
.card-grid li:nth-child(8) { animation-delay: 0.24s; }

@keyframes popIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-cover {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r-sm);
    aspect-ratio: 600 / 350;
    background: var(--pk-soft);
    border: 1px solid var(--clr-border);
    box-shadow: 0 2px 6px var(--clr-shadow);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.42s ease;
}

.card-cover:hover {
    box-shadow: 0 6px 18px rgba(232, 80, 106, 0.18);
    border-color: rgba(232, 80, 106, 0.3);
}

.card-cover:hover img {
    transform: scale(1.07);
}

.card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 10, 30, 0.6) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-cover:hover::after {
    opacity: 1;
}

.card-info {
    padding: 7px 0 2px;
}

.card-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--clr-text);
}

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

.card-info h5 a:hover {
    color: var(--pk-main);
}

/* ===== VIDEO PLAYER ===== */
.video-stage {
    width: 100%;
    background: #0d0d0d;
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 4px 18px var(--clr-shadow-md);
    height: 600px;
    max-height: 600px;
    position: relative;
}

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

.MacPlayer {
    background: #0d0d0d;
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 5px 20px var(--clr-shadow-md);
}

/* ===== TORRENT CAPTURE ===== */
.preview-frame {
    width: 100%;
}

.preview-frame img,
.preview-frame .img_item img {
    width: 100%;
    height: auto;
    border-radius: var(--r-sm);
    border: 1px solid var(--clr-border);
    display: block;
}

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

/* ===== ACTION BUTTONS ===== */
.btn-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 14px;
    background: var(--clr-surface);
    border-radius: var(--r-md);
    border: 1px solid var(--clr-border);
    box-shadow: 0 2px 6px var(--clr-shadow);
    margin: 12px 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background: var(--grad-btn);
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-xl);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--ease);
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
    box-shadow: 0 3px 10px rgba(232, 80, 106, 0.25);
}

.action-btn:hover {
    background: linear-gradient(135deg, #d03a54 0%, #b02040 100%);
    box-shadow: 0 5px 16px rgba(232, 80, 106, 0.38);
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
}

/* ===== SHARE STRIP ===== */
.share-ribbon {
    background: var(--clr-surface);
    border-radius: var(--r-md);
    padding: 12px 14px;
    margin: 12px 0;
    border: 1px solid var(--clr-border);
    box-shadow: 0 2px 6px var(--clr-shadow);
    display: flex;
    align-items: center;
    gap: 10px;
}

.url-display {
    background: var(--clr-base);
    border: 1.5px solid var(--clr-border);
    border-radius: var(--r-sm);
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.url-caption {
    font-weight: 700;
    font-size: 12px;
    color: var(--pk-main);
    white-space: nowrap;
    flex-shrink: 0;
}

.url-text {
    font-size: 12px;
    color: var(--clr-sub);
    word-break: break-all;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-trigger {
    padding: 9px 16px;
    background: var(--grad-btn);
    color: #fff;
    border: none;
    border-radius: var(--r-xl);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(232, 80, 106, 0.22);
}

.copy-trigger:hover {
    box-shadow: 0 5px 14px rgba(232, 80, 106, 0.35);
    transform: translateY(-1px);
}

.copy-trigger:active {
    transform: translateY(0);
}

.icon-clip {
    font-size: 14px;
}

/* ===== DETAIL INFO BOX ===== */
.detail-heading {
    line-height: 1.8;
    text-align: center;
    padding: 14px 18px;
    font-size: 16px;
    margin: 12px 0;
    word-break: break-all;
    background: var(--grad-soft);
    border-radius: var(--r-md);
    border: 1px solid rgba(232, 80, 106, 0.15);
}

.detail-heading a {
    color: var(--pk-main);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
    transition: var(--ease);
}

.detail-heading a:hover {
    color: var(--pk-deep);
}

.detail-specs {
    font-size: 15px;
    line-height: 1.85;
    padding: 18px 20px;
    background: var(--clr-surface);
    border-radius: var(--r-md);
    border: 1px solid var(--clr-border);
    margin: 12px 0;
    box-shadow: 0 2px 6px var(--clr-shadow);
}

/* ===== PAGINATION ===== */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.pager-btn {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--r-xl);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
    background: var(--clr-surface);
    color: var(--clr-text);
    border: 1px solid var(--clr-border);
}

.pager-btn:hover {
    background: var(--grad-btn);
    border-color: var(--pk-main);
    color: #fff;
    box-shadow: 0 2px 8px rgba(232, 80, 106, 0.22);
}

.pager-now {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--r-xl);
    background: var(--grad-btn);
    color: #fff;
    border: 1px solid var(--pk-main);
    cursor: default;
    font-weight: 700;
    font-size: 13px;
    min-width: 36px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(232, 80, 106, 0.22);
}

/* ===== FRIEND LINKS ===== */
.friend-links {
    padding: 10px 12px;
    background: var(--clr-surface);
    border-radius: var(--r-md);
    border: 1px solid var(--clr-border);
}

.friend-links dl {
    margin: 0;
}

.friend-links dd {
    display: inline-block;
    margin: 3px 4px;
}

.friend-links a {
    color: var(--clr-sub);
    text-decoration: none;
    transition: var(--ease);
    font-size: 13px;
}

.friend-links a:hover {
    color: var(--pk-main);
}

/* ===== SITE FOOTER ===== */
.foot-bar {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--clr-border);
    margin-top: 16px;
    background: var(--clr-surface);
}

.foot-bar p {
    margin: 5px 0;
    color: var(--clr-muted);
    font-size: 12px;
}

.foot-bar a {
    color: var(--clr-muted);
    text-decoration: none;
    transition: var(--ease);
}

.foot-bar a:hover {
    color: var(--pk-main);
}

/* ===== VISIBILITY HELPERS ===== */
.show-pc {
    display: block;
}

.show-mobile {
    display: block;
}

@media (max-width: 768px) {
    .show-pc {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .show-mobile {
        display: none !important;
    }
}

/* ===== CLEARFIX ===== */
.fx::after {
    content: "";
    display: table;
    clear: both;
}

/* ===== LAZY IMG ===== */
img[data-original] {
    background: var(--pk-soft);
}

/* ===================================================
   RESPONSIVE BREAKPOINTS
   =================================================== */

/* ── Large phones: 481px ~ 768px ── */
@media (min-width: 481px) and (max-width: 768px) {
    .page-wrap {
        padding: 0 10px;
    }

    .row-gap {
        padding: 6px 0;
    }

    .logo-text {
        font-size: 22px;
    }

    .domain-badge .badge-label {
        font-size: 10px;
    }

    .domain-badge .badge-url {
        font-size: 14px;
    }

    /* 导航: 左15% 区域名, 右85% 链接, 每行4个, 字体13px */
    .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 7px 2px;
    }

    .link-cluster {
        width: 85%;
        gap: 4px;
        padding: 7px 6px;
    }

    .link-cluster a {
        font-size: 13px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
    }

    /* 影片网格: 每行2个 */
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    /* 搜索同行不换行 */
    .search-unit form {
        flex-wrap: nowrap;
    }

    .search-unit button {
        padding: 9px 10px;
        font-size: 12px;
    }

    .video-stage {
        height: 56.25vw;
        max-height: 400px;
    }
}

/* ── Small phones: ≤480px ── */
@media (max-width: 480px) {
    .page-wrap {
        padding: 0 8px;
    }

    .row-gap {
        padding: 5px 0;
    }

    .site-topbar {
        padding: 0.4rem 0;
    }

    .logo-text {
        font-size: 20px;
    }

    .domain-badge {
        padding: 4px 10px;
        gap: 5px;
    }

    .domain-badge .badge-label {
        font-size: 10px;
    }

    .domain-badge .badge-url {
        font-size: 13px;
    }

    /* 导航: 左15% 区域名, 右85% 链接, 每行4个, 字体12px */
    .zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

    .link-cluster {
        width: 85%;
        gap: 3px;
        padding: 6px 4px;
    }

    .link-cluster a {
        font-size: 12px;
        padding: 4px 1px;
        width: calc((100% - 9px) / 4);
    }

    /* 影片网格: 每行2个 */
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .card-info h5 {
        font-size: 12px;
    }

    .block-title {
        font-size: 15px;
    }

    /* 搜索同行不换行 */
    .search-unit form {
        flex-wrap: nowrap;
    }

    .search-unit input[type="text"] {
        min-width: 50px;
        padding: 8px 9px;
        font-size: 12px;
    }

    .search-unit button {
        padding: 8px 7px;
        font-size: 11px;
    }

    .action-btn {
        padding: 9px 14px;
        font-size: 12px;
    }

    .btn-row {
        gap: 6px;
        padding: 10px 8px;
    }

    .share-ribbon {
        padding: 9px 10px;
        gap: 7px;
        flex-wrap: nowrap;
    }

    .url-display {
        padding: 7px 9px;
    }

    .url-caption {
        font-size: 11px;
    }

    .url-text {
        font-size: 10px;
    }

    .copy-trigger {
        padding: 8px 10px;
        font-size: 11px;
    }

    .video-stage {
        height: 56.25vw;
        max-height: 300px;
    }

    .pager-btn, .pager-now {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 30px;
    }
}
