/* Media Portal - Pixabay Style: Dark Header + White Body + Green Accent */

:root {
    --gn-main: #2ec06a;
    --gn-deep: #22a558;
    --gn-light: #eafaf1;
    --gn-soft: #f2fbf6;
    --clr-dark: #1a1a2a;
    --clr-dark2: #2c2c3e;
    --clr-text: #1c1c2e;
    --clr-sub: #4a4a6a;
    --clr-muted: #9898b8;
    --clr-surface: #ffffff;
    --clr-base: #f5f5fa;
    --clr-border: #e8e8f0;
    --clr-border-soft: #f0f0f8;
    --clr-shadow: rgba(20, 20, 50, 0.07);
    --clr-shadow-md: rgba(20, 20, 50, 0.14);
    --grad-green: linear-gradient(135deg, #2ec06a 0%, #1da855 100%);
    --grad-dark: linear-gradient(135deg, #1a1a2a 0%, #2c2c3e 100%);
    --grad-soft: linear-gradient(135deg, #eafaf1 0%, #e8f8ff 100%);
    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 22px;
    --ease: all 0.2s 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 - dark like Pixabay ===== */
.portal-header {
    background: var(--grad-dark);
    padding: 0.55rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: center;
}

.identity-block {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

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

.site-logo-text {
    font-size: 28px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    font-style: normal;
    border-bottom: none;
    text-decoration: none;
    line-height: 1.2;
}

.newest-domain {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(46, 192, 106, 0.45);
    border-radius: var(--r-xl);
    padding: 5px 14px;
}

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

.newest-domain .nd-url {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
}

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

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

/* ===== CATEGORY NAVIGATION ===== */
.category-nav {
    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-row-item {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--clr-border-soft);
}

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

.zone-label {
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    background: var(--grad-dark);
    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;
}

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

.nav-links-area 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;
}

.nav-links-area a:hover,
.nav-links-area a.active {
    background: var(--grad-green);
    color: #fff;
    border-color: var(--gn-main);
    box-shadow: 0 2px 8px rgba(46, 192, 106, 0.28);
    font-weight: 600;
}

/* ===== SEARCH BAR ===== */
.qry-wrapper {
    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);
}

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

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

.qry-wrapper input[type="text"]:focus {
    border-color: var(--gn-main);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 192, 106, 0.12);
}

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

.qry-wrapper button {
    padding: 9px 14px;
    border: none;
    border-radius: var(--r-xl);
    background: var(--grad-green);
    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;
}

.qry-wrapper button:hover {
    background: linear-gradient(135deg, #22a558 0%, #189040 100%);
    box-shadow: 0 4px 12px rgba(46, 192, 106, 0.32);
}

/* ===== HOT KEYWORD TAGS ===== */
.tag-cloud-list {
    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);
}

.tag-cloud-list a {
    padding: 5px 12px;
    background: var(--gn-soft);
    border-radius: 20px;
    color: var(--gn-deep);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    border: 1px solid rgba(46, 192, 106, 0.2);
    font-weight: 500;
}

.tag-cloud-list a:hover {
    background: var(--grad-green);
    color: #fff;
    border-color: var(--gn-main);
    box-shadow: 0 2px 8px rgba(46, 192, 106, 0.22);
}

/* ===== SECTION BLOCKS ===== */
.media-section {
    margin-bottom: 12px;
}

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

.section-top::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--grad-green);
    border-radius: 2px;
}

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

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

.section-heading a:hover {
    color: var(--gn-main);
}

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

.media-grid li {
    position: relative;
    animation: riseUp 0.4s ease backwards;
}

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

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

.media-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r-sm);
    aspect-ratio: 600 / 350;
    background: var(--clr-base);
    border: 1px solid var(--clr-border);
    box-shadow: 0 1px 5px var(--clr-shadow);
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.media-thumb:hover {
    box-shadow: 0 5px 16px rgba(46, 192, 106, 0.18);
    border-color: rgba(46, 192, 106, 0.35);
}

.media-thumb:hover img {
    transform: scale(1.06);
}

.media-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 20, 40, 0.65) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.media-thumb:hover::after {
    opacity: 1;
}

.media-caption {
    padding: 7px 0 2px;
}

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

.media-caption 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);
}

.media-caption h5 a:hover {
    color: var(--gn-main);
}

/* ===== VIDEO PLAYER ===== */
.player-box {
    width: 100%;
    background: #000;
    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;
}

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

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

/* ===== TORRENT CAPTURE ===== */
.capture-display {
    width: 100%;
}

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

.capture-display .img_item {
    width: 100%;
}

/* ===== ACTION BUTTONS ===== */
.dl-bar {
    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;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    background: var(--grad-green);
    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(46, 192, 106, 0.25);
}

.dl-btn:hover {
    background: linear-gradient(135deg, #22a558 0%, #189040 100%);
    box-shadow: 0 5px 16px rgba(46, 192, 106, 0.38);
    transform: translateY(-1px);
}

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

/* ===== SHARE STRIP ===== */
.share-bar {
    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;
}

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

.link-tag {
    font-weight: 700;
    font-size: 12px;
    color: var(--gn-deep);
    white-space: nowrap;
    flex-shrink: 0;
}

.link-val {
    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-btn {
    padding: 9px 18px;
    background: var(--grad-green);
    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(46, 192, 106, 0.22);
}

.copy-btn:hover {
    box-shadow: 0 5px 14px rgba(46, 192, 106, 0.35);
    transform: translateY(-1px);
}

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

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

/* ===== DETAIL INFO BOX ===== */
.info-banner {
    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(46, 192, 106, 0.18);
}

.info-banner a {
    color: var(--gn-deep);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
    transition: var(--ease);
}

.info-banner a:hover {
    color: var(--gn-main);
}

.spec-box {
    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 ===== */
.pg-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.pg-item {
    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);
}

.pg-item:hover {
    background: var(--grad-green);
    border-color: var(--gn-main);
    color: #fff;
    box-shadow: 0 2px 8px rgba(46, 192, 106, 0.22);
}

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

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

.ext-links dl {
    margin: 0;
}

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

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

.ext-links a:hover {
    color: var(--gn-main);
}

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

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

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

.bottom-bar a:hover {
    color: var(--gn-main);
}

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

.only-mobile {
    display: block;
}

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

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

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

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

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

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

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

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

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

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

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

    .nav-links-area {
        width: 85%;
        gap: 4px;
        padding: 7px 6px;
    }

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

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

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

    .qry-wrapper button {
        padding: 9px 10px;
        font-size: 12px;
    }

    .player-box {
        height: 56.25vw;
        max-height: 400px;
    }
}

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

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

    .portal-header {
        padding: 0.4rem 0;
    }

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

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

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

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

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

    .nav-links-area {
        width: 85%;
        gap: 3px;
        padding: 6px 4px;
    }

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

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

    .media-caption h5 {
        font-size: 12px;
    }

    .section-heading {
        font-size: 15px;
    }

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

    .qry-wrapper input[type="text"] {
        min-width: 50px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .qry-wrapper button {
        padding: 8px 7px;
        font-size: 11px;
    }

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

    .dl-bar {
        gap: 6px;
        padding: 10px 8px;
    }

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

    .link-preview {
        padding: 7px 10px;
    }

    .link-tag {
        font-size: 11px;
    }

    .link-val {
        font-size: 10px;
    }

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

    .player-box {
        height: 56.25vw;
        max-height: 300px;
    }

    .pg-item, .pg-active {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 30px;
    }
}
