/* ============================================================
   CSS Variables
   ============================================================ */
:root {
    --rc-red:       #c0392b;
    --rc-red-dk:    #a93226;
    --rc-green:     #27ae60;
    --rc-green-dk:  #1e8449;
    --rc-dark:      #1a1a1a;
    --rc-dark2:     #2d2d2d;
    --rc-body:      #f5f5f5;
    --rc-surface:   #ffffff;
    --rc-border:    #e5e5e5;
    --rc-text:      #1a1a1a;
    --rc-text2:     #555;
    --rc-text3:     #999;
    --rc-radius:    8px;
    --rc-shadow:    0 2px 6px rgba(0,0,0,0.07);
    --rc-shadow-md: 0 5px 20px rgba(0,0,0,0.12);
    --rc-font:      'PingFang SC','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;
    --rc-ease:      0.18s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
    font-family: var(--rc-font);
    background: var(--rc-body);
    color: var(--rc-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--rc-red); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ===== Layout ===== */
.gw {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

.clearfix::after { content: ''; display: table; clear: both; }

/* ===== SITE HEADER ===== */
.pg-header {
    background: var(--rc-dark);
    color: #fff;
    padding: 9px 0;
}

.pg-header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.pg-brand {
    font-size: 1.42rem;
    font-weight: 800;
    color: #fff;
    font-style: normal;
    text-decoration: none;
    border: none;
    letter-spacing: -0.2px;
    white-space: nowrap;
    flex-shrink: 0;
}
.pg-brand:hover { color: rgba(255,255,255,0.82); }

.pg-domain-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 18px;
    padding: 3px 11px;
}
.pg-domain-lbl {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}
.pg-domain-val {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

/* ===== CATEGORY NAV ===== */
.pg-nav-block {
    background: var(--rc-surface);
    border-bottom: 1px solid var(--rc-border);
}

.pg-nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--rc-border);
    min-height: 36px;
}
.pg-nav-row:last-child { border-bottom: none; }

.pg-zone-lbl {
    width: 70px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rc-dark);
    color: rgba(255,255,255,0.82);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    flex-shrink: 0;
    padding: 4px 2px;
    line-height: 1.2;
}

.pg-zone-items {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 3px 6px;
    gap: 2px;
}

.pg-zone-items a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    border-radius: 5px;
    font-size: 0.83rem;
    color: var(--rc-text2);
    transition: background var(--rc-ease), color var(--rc-ease);
    white-space: nowrap;
    flex: 1;
    text-align: center;
    min-width: 0;
}
.pg-zone-items a:hover {
    background: var(--rc-red);
    color: #fff;
}
.pg-zone-items a.active {
    background: var(--rc-red);
    color: #fff;
    font-weight: 600;
}

/* ===== SEARCH BAR ===== */
.pg-search-bar {
    background: var(--rc-surface);
    padding: 9px 0;
    border-bottom: 1px solid var(--rc-border);
}

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

.pg-search-form input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 13px;
    border: 1.5px solid var(--rc-border);
    border-radius: var(--rc-radius);
    font-size: 0.88rem;
    font-family: var(--rc-font);
    color: var(--rc-text);
    background: var(--rc-body);
    outline: none;
    transition: border-color var(--rc-ease);
}
.pg-search-form input[type="text"]:focus {
    border-color: var(--rc-red);
}

.pg-search-form button {
    padding: 8px 11px;
    border: none;
    border-radius: var(--rc-radius);
    font-size: 0.82rem;
    font-family: var(--rc-font);
    cursor: pointer;
    white-space: nowrap;
    transition: opacity var(--rc-ease);
    flex-shrink: 0;
}
.pg-search-form button:not([value]) {
    background: var(--rc-dark);
    color: #fff;
}
.pg-search-form button[value="1"] {
    background: var(--rc-red);
    color: #fff;
}
.pg-search-form button[value="2"] {
    background: var(--rc-green);
    color: #fff;
}
.pg-search-form button:hover { opacity: 0.85; }

/* ===== HOT TAGS ===== */
.pg-hot-box {
    background: var(--rc-surface);
    border-radius: var(--rc-radius);
    border: 1px solid var(--rc-border);
    padding: 8px 12px;
    margin: 5px 0;
    box-shadow: var(--rc-shadow);
}
.pg-hot-ttl {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--rc-text);
    margin-bottom: 6px;
}
.pg-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
}
.pg-tag-lnk {
    display: inline-block;
    padding: 3px 10px;
    background: var(--rc-body);
    border: 1px solid var(--rc-border);
    border-radius: 18px;
    font-size: 0.77rem;
    color: var(--rc-text2);
    transition: all var(--rc-ease);
}
.pg-tag-lnk:hover {
    background: var(--rc-red);
    color: #fff;
    border-color: var(--rc-red);
}

/* ===== SECTION CARD ===== */
.pg-section {
    background: var(--rc-surface);
    border-radius: var(--rc-radius);
    border: 1px solid var(--rc-border);
    box-shadow: var(--rc-shadow);
    margin: 6px 0;
    overflow: hidden;
}

.pg-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border-bottom: 2px solid var(--rc-border);
}

.pg-sec-title {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--rc-text);
    padding-left: 9px;
    position: relative;
}
.pg-sec-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1em;
    background: var(--rc-red);
    border-radius: 2px;
}
.pg-sec-title a { color: inherit; }
.pg-sec-title a:hover { color: var(--rc-red); }

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

.pg-film-item {
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    overflow: hidden;
    background: var(--rc-body);
    border: 1px solid var(--rc-border);
    transition: transform var(--rc-ease), box-shadow var(--rc-ease);
}
.pg-film-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--rc-shadow-md);
}

.pg-film-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    background: #ddd;
    aspect-ratio: 600 / 350;
}
.pg-film-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
}
.pg-film-item:hover .pg-film-thumb img {
    transform: scale(1.05);
}

.pg-film-desc {
    padding: 5px 6px 5px;
}
.pg-film-desc h5 {
    font-size: 0.77rem;
    font-weight: 500;
    color: var(--rc-text);
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.pg-film-desc h5 a { color: inherit; }
.pg-film-desc h5 a:hover { color: var(--rc-red); }

/* ===== TORRENT / VIDEO TITLE BAR ===== */
.pg-title-strip {
    background: var(--rc-dark2);
    color: #fff;
    text-align: center;
    padding: 13px 16px;
    border-radius: var(--rc-radius);
    margin: 7px 0;
    font-size: 1rem;
    line-height: 1.75;
    word-break: break-all;
}
.pg-title-strip .pg-cat-ref {
    color: var(--rc-green);
    font-weight: 600;
    margin-right: 7px;
}
.pg-title-strip .pg-cat-ref:hover { color: #2ecc71; }

.pg-detail-box {
    background: var(--rc-surface);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    padding: 18px 20px;
    font-size: 0.92rem;
    line-height: 1.95;
    margin: 6px 0;
}

.pg-preview-grid { margin-top: 10px; }
.pg-preview-grid picture,
.pg-preview-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

/* ===== DOWNLOAD BUTTONS ===== */
.pg-dl-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0;
}
.pg-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 26px;
    border-radius: var(--rc-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--rc-font);
    transition: opacity var(--rc-ease);
    text-decoration: none;
}
.pg-dl-btn:hover { opacity: 0.87; }
.pg-btn-dark    { background: var(--rc-dark);  color: #fff; }
.pg-btn-red     { background: var(--rc-red);   color: #fff; }
.pg-btn-green   { background: var(--rc-green); color: #fff; }
.pg-btn-outline {
    background: transparent;
    color: var(--rc-red);
    border: 1.5px solid var(--rc-red);
}
.pg-btn-outline:hover { background: var(--rc-red); color: #fff; opacity: 1; }

/* ===== CLIENT DOWNLOAD ===== */
.pg-client-dl { text-align: center; padding: 8px 0; }
.pg-client-dl a { color: var(--rc-red); font-size: 0.85rem; font-weight: 600; }
.pg-client-dl a:hover { text-decoration: underline; }

/* ===== SHARE STRIP ===== */
.pg-share-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    background: var(--rc-body);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius);
    margin: 7px 0;
    flex-wrap: wrap;
}
.pg-share-url-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
}
.pg-share-ttl { font-size: 0.74rem; color: var(--rc-text3); white-space: nowrap; flex-shrink: 0; }
.pg-share-url-txt {
    font-size: 0.78rem;
    color: var(--rc-text2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pg-share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: var(--rc-dark);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--rc-font);
    transition: background var(--rc-ease);
    flex-shrink: 0;
}
.pg-share-copy-btn:hover { background: var(--rc-red); }

/* ===== PAGINATION ===== */
.pg-pager {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 13px 0 5px;
}
.pg-pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.84rem;
    background: var(--rc-surface);
    border: 1px solid var(--rc-border);
    color: var(--rc-text2);
    transition: all var(--rc-ease);
}
.pg-pg-btn:hover { background: var(--rc-red); border-color: var(--rc-red); color: #fff; }
.pg-pg-current {
    background: var(--rc-red);
    border-color: var(--rc-red);
    color: #fff;
    font-weight: 700;
    pointer-events: none;
}

/* ===== FOOTER LINKS ===== */
.pg-links-block {
    background: var(--rc-surface);
    border-radius: var(--rc-radius);
    border: 1px solid var(--rc-border);
    margin: 6px 0;
    overflow: hidden;
    box-shadow: var(--rc-shadow);
}
.pg-links-dl {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px;
    margin: 0;
}
.pg-links-dl dd { margin: 0; }
.pg-links-dl a {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.77rem;
    color: var(--rc-text2);
    border-radius: 4px;
    transition: all var(--rc-ease);
}
.pg-links-dl a:hover { background: var(--rc-red); color: #fff; }

/* ===== SITE FOOTER ===== */
.pg-footer {
    background: var(--rc-dark);
    color: rgba(255,255,255,0.48);
    padding: 12px 0;
    margin-top: 8px;
}
.pg-copyright {
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.75;
}

/* ===== VISIBILITY ===== */
.only-pc     { display: block; }
.only-mobile { display: none; }

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

/* Mobile ≤767px */
@media (max-width: 767px) {
    .only-pc     { display: none !important; }
    .only-mobile { display: block !important; }

    .pg-brand       { font-size: 1.05rem; }
    .pg-domain-val  { font-size: 0.85rem; }
    .pg-domain-lbl  { font-size: 0.62rem; }

    /* Zone nav: 15% label / 85% links */
    .pg-zone-lbl {
        width: 15%;
        min-width: 0;
        font-size: 10px;
        letter-spacing: 0;
        padding: 3px 1px;
        line-height: 1.2;
    }
    .pg-zone-items {
        width: 85%;
        flex: none;
        padding: 3px 3px;
        gap: 2px;
    }
    /* 4 per row in mobile */
    .pg-zone-items a {
        flex: 0 0 calc(25% - 2px);
        font-size: 12px;
        padding: 4px 1px;
        text-align: center;
    }

    /* Search: stay on one line */
    .pg-search-form { flex-wrap: nowrap; gap: 4px; }
    .pg-search-form input[type="text"] { font-size: 0.78rem; padding: 6px 8px; }
    .pg-search-form button { font-size: 0.72rem; padding: 6px 5px; flex-shrink: 0; }

    /* Film grid: 2 cols */
    .pg-film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
        padding: 8px;
    }
    .pg-film-desc h5 { font-size: 0.72rem; }
}

/* Large phones 480-767 */
@media (min-width: 480px) and (max-width: 767px) {
    .pg-zone-items a { font-size: 13px; }
}
@media (max-width: 479px) {
    .pg-zone-items a { font-size: 12px; }
}

/* PC ≥768px */
@media (min-width: 768px) {
    .pg-film-grid { grid-template-columns: repeat(4, 1fr); }
    .pg-zone-lbl  { width: 70px; font-size: 0.74rem; }
    .pg-zone-items { display: flex; flex-wrap: nowrap; }
    .pg-zone-items a { flex: 1; font-size: 0.86rem; }
}
