/* Portal Style Template - Blue Grey Clean Design */

:root {
    --sky: #3a8fd4;
    --sky-deep: #2775b6;
    --sky-pale: #e8f3fc;
    --sky-mist: #f0f7fd;
    --steel: #5a7fa0;
    --ink: #333344;
    --ink-mid: #555566;
    --ink-soft: #999aaa;
    --chrome: #e0e4ea;
    --chrome-lt: #eef0f4;
    --chrome-xlt: #f5f6f8;
    --surface: #ffffff;
    --strip: #f2f4f7;
    --line: #dde1e8;
    --line-lt: #eceef2;
    --glow: rgba(58, 143, 212, 0.18);
    --glow-lg: rgba(58, 143, 212, 0.30);
    --sweep: linear-gradient(135deg, var(--sky) 0%, #5aaee8 100%);
    --card-r: 4px;
    --btn-r: 3px;
    --ease: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --page-bg: #f0f2f5;
    --card-bg: #ffffff;
}

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

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

/* ===================== HEADER ===================== */
.portal-header {
    background: var(--surface);
    border-bottom: 2px solid var(--sky);
    padding: 0.65rem 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

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

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

.portal-logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--ease);
}

.portal-logo:hover {
    opacity: 0.82;
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: var(--sweep);
    border-radius: var(--card-r);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    flex-shrink: 0;
}

.logo-wordmark {
    font-size: 26px;
    font-weight: 700;
    color: var(--sky-deep);
    letter-spacing: 0.5px;
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

.domain-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: var(--sky-mist);
    border-radius: 3px;
    border: 1px solid var(--sky);
}

.badge-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--surface);
    background: var(--sky);
    padding: 1px 6px;
    border-radius: 2px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-url {
    font-size: 14px;
    font-weight: 700;
    color: var(--sky-deep);
    font-family: 'Courier New', 'Consolas', monospace;
}

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

.block-gap {
    padding: 12px 0;
}

/* ===================== NAV PANEL ===================== */
.category-nav {
    background: var(--card-bg);
    border-radius: var(--card-r);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.cat-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--line-lt);
}

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

.zone-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--surface);
    background: var(--sky);
    white-space: nowrap;
    width: 10%;
    min-width: 52px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 5px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    border-right: 1px solid var(--sky-deep);
}

.cat-links {
    font-size: 13px;
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 9px 10px;
    align-items: center;
    background: var(--chrome-xlt);
}

.cat-links a {
    display: inline-block;
    color: var(--ink-mid);
    text-decoration: none;
    padding: 4px 4px;
    border-radius: var(--btn-r);
    transition: var(--ease);
    background: var(--surface);
    border: 1px solid var(--line);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 12px;
}

.cat-links a:hover {
    background: var(--sky);
    color: #fff;
    border-color: var(--sky);
    box-shadow: 0 2px 8px var(--glow);
}

.cat-links a.active {
    background: var(--sky);
    color: #fff;
    border-color: var(--sky-deep);
    box-shadow: 0 2px 8px var(--glow);
    font-weight: 600;
}

/* ===================== SEARCH ===================== */
.query-bar {
    background: var(--card-bg);
    border-radius: var(--card-r);
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.query-bar form {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: nowrap;
}

.query-bar input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 9px 14px;
    border: 1px solid var(--chrome);
    border-radius: var(--btn-r);
    background: var(--chrome-xlt);
    color: var(--ink);
    font-size: 13px;
    transition: var(--ease);
    outline: none;
}

.query-bar input[type="text"]:focus {
    border-color: var(--sky);
    background: #fff;
    box-shadow: 0 0 0 3px var(--glow);
}

.query-bar input[type="text"]::placeholder {
    color: var(--ink-soft);
}

.query-bar button {
    padding: 9px 16px;
    border: none;
    border-radius: var(--btn-r);
    background: var(--sweep);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.query-bar button:hover {
    background: linear-gradient(135deg, var(--sky-deep) 0%, var(--sky) 100%);
    box-shadow: 0 3px 10px var(--glow-lg);
}

/* ===================== TAG CLOUD ===================== */
.keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 10px 12px;
    background: var(--card-bg);
    border-radius: var(--card-r);
    margin-bottom: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.kw-item {
    padding: 4px 12px;
    background: var(--strip);
    border-radius: 2px;
    color: var(--ink-mid);
    text-decoration: none;
    font-size: 12px;
    transition: var(--ease);
    border: 1px solid var(--line-lt);
}

.kw-item:hover {
    background: var(--sky);
    color: #fff;
    border-color: var(--sky);
    box-shadow: 0 2px 6px var(--glow);
}

/* ===================== SECTION HEADING ===================== */
.content-block {
    margin-bottom: 20px;
}

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

.block-head::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 52px;
    height: 2px;
    background: var(--sky);
}

.block-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}

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

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

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

.works-grid li {
    animation: fadeSlide 0.45s ease backwards;
}

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

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

.work-cover {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--card-r);
    aspect-ratio: 600 / 350;
    background: var(--chrome-lt);
    border: 1px solid var(--line);
    box-shadow: 0 1px 5px rgba(0,0,0,0.08);
    transition: var(--ease);
}

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

.work-cover:hover {
    box-shadow: 0 6px 18px rgba(58,143,212,0.2);
    border-color: var(--sky);
}

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

.work-cover::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    background: rgba(42, 110, 168, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.work-info {
    padding: 8px 0 2px;
}

.work-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

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

.work-info h5 a:hover {
    color: var(--sky);
}

/* ===================== DETAIL PAGE ===================== */
.detail-banner {
    line-height: 1.8;
    text-align: center;
    padding: 16px 20px;
    font-size: 17px;
    margin: 16px 0;
    word-break: break-all;
    background: linear-gradient(135deg, var(--sky-mist) 0%, #fff 100%);
    border-radius: var(--card-r);
    border-left: 4px solid var(--sky);
    border-right: 1px solid var(--line);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.detail-banner a {
    color: var(--sky);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
}

.resource-info {
    font-size: 14px;
    line-height: 1.9;
    padding: 20px 22px;
    background: var(--card-bg);
    border-radius: var(--card-r);
    margin: 14px 0;
    border: 1px solid var(--line);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.preview-wrapper {
    margin-top: 10px;
}

.preview-wrapper picture,
.preview-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--btn-r);
    border: 1px solid var(--line);
}

/* ===================== ACTION BUTTONS ===================== */
.btn-group {
    text-align: center;
    padding: 14px;
    background: var(--card-bg);
    border-radius: var(--card-r);
    margin: 12px 0;
    border: 1px solid var(--line);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.portal-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--sweep);
    color: #fff;
    text-decoration: none;
    border-radius: var(--btn-r);
    font-weight: 600;
    font-size: 13px;
    transition: var(--ease);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.portal-btn:hover {
    background: linear-gradient(135deg, var(--sky-deep) 0%, var(--sky) 100%);
    box-shadow: 0 4px 14px var(--glow-lg);
    transform: translateY(-1px);
}

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

/* ===================== SHARE SECTION ===================== */
.url-share {
    background: var(--card-bg);
    border-radius: var(--card-r);
    padding: 16px;
    margin: 14px 0;
    border: 1px solid var(--line);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.url-display {
    background: var(--strip);
    border: 1px solid var(--chrome);
    border-radius: var(--btn-r);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.url-flag {
    font-weight: 700;
    font-size: 11px;
    color: #fff;
    background: var(--sky);
    padding: 2px 7px;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.url-val {
    font-size: 12px;
    color: var(--ink-mid);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-trigger {
    padding: 10px 20px;
    background: var(--sweep);
    color: #fff;
    border: none;
    border-radius: var(--btn-r);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--ease);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-trigger:hover {
    background: linear-gradient(135deg, var(--sky-deep) 0%, var(--sky) 100%);
    box-shadow: 0 4px 12px var(--glow-lg);
}

.copy-trigger:active {
    transform: scale(0.98);
}

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

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

.page-num,
.page-on {
    display: inline-block;
    padding: 7px 13px;
    border-radius: var(--btn-r);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
}

.page-num {
    background: var(--card-bg);
    color: var(--ink);
    border: 1px solid var(--line);
}

.page-num:hover {
    background: var(--sky);
    border-color: var(--sky);
    color: #fff;
    box-shadow: 0 2px 8px var(--glow);
}

.page-on {
    background: var(--sweep);
    color: #fff;
    border: 1px solid var(--sky-deep);
    cursor: default;
}

/* ===================== FOOTER ===================== */
.footer-bar {
    padding: 22px 0;
    text-align: center;
    border-top: 1px solid var(--line);
    margin-top: 24px;
    background: var(--card-bg);
}

.footer-bar p {
    margin: 5px 0;
    color: var(--ink-soft);
    font-size: 12px;
}

.footer-bar a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: var(--ease);
}

.footer-bar a:hover {
    color: var(--sky);
}

.links-panel {
    padding: 10px 12px;
    background: var(--card-bg);
    border-radius: var(--card-r);
    border: 1px solid var(--line);
}

.links-panel dl {
    margin: 0;
}

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

.links-panel a {
    color: var(--steel);
    text-decoration: none;
    transition: var(--ease);
    font-size: 12px;
}

.links-panel a:hover {
    color: var(--sky);
}

.pd5 {
    padding: 0 5px;
}

/* ===================== CLIENT HINTS ===================== */
.client-tip {
    text-align: center;
    padding: 14px;
}

.client-tip a {
    color: var(--sky);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--ease);
}

.client-tip a:hover {
    color: var(--sky-deep);
    text-decoration: underline;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .shell {
        padding: 0 8px;
    }

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

    .identity-block {
        gap: 10px;
    }

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

    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

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

    .badge-label {
        font-size: 9px;
    }

    .badge-url {
        font-size: 12px;
    }

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

    .cat-row {
        display: flex;
        align-items: stretch;
    }

    .zone-label {
        width: 15%;
        min-width: 44px;
        font-size: 10px;
        padding: 7px 2px;
        text-align: center;
        word-break: break-all;
        line-height: 1.3;
    }

    .cat-links {
        width: 85%;
        font-size: 11px;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 7px 5px;
    }

    .cat-links a {
        padding: 4px 2px;
        font-size: 12px;
        text-align: center;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .work-info {
        padding: 6px 0 2px;
    }

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

    .content-block {
        margin-bottom: 14px;
    }

    .block-head {
        margin-bottom: 9px;
    }

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

    .keyword-cloud {
        padding: 8px 10px;
        gap: 5px;
    }

    .kw-item {
        padding: 3px 9px;
        font-size: 11px;
    }

    .btn-group {
        padding: 10px 6px;
        gap: 7px;
        flex-wrap: nowrap;
    }

    .portal-btn {
        padding: 9px 13px;
        font-size: 12px;
    }

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

    .url-display {
        padding: 8px 10px;
        gap: 6px;
        flex: 1;
        min-width: 0;
    }

    .url-flag {
        font-size: 9px;
    }

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

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

    .pages-row {
        padding: 12px 0;
        gap: 4px;
    }

    .page-num,
    .page-on {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 32px;
    }

    .detail-banner {
        font-size: 14px;
        padding: 12px 14px;
        margin: 10px 0;
    }

    .resource-info {
        padding: 14px 14px;
        font-size: 13px;
    }

    .query-bar {
        padding: 9px 10px;
    }

    .query-bar input[type="text"] {
        min-width: 90px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .query-bar button {
        padding: 8px 9px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .logo-wordmark {
        font-size: 17px;
    }

    .logo-icon {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .domain-badge {
        padding: 3px 8px;
    }

    .zone-label {
        width: 15%;
        min-width: 38px;
        font-size: 9px;
        padding: 5px 1px;
    }

    .cat-links {
        width: 85%;
        gap: 3px;
        padding: 5px 3px;
    }

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

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .work-info h5 {
        font-size: 11px;
    }

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

    .btn-group {
        padding: 8px 3px;
        gap: 5px;
    }

    .portal-btn {
        padding: 8px 9px;
        font-size: 11px;
    }

    .url-share {
        padding: 7px;
        gap: 4px;
    }

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

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

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

/* ===================== UTILITIES ===================== */
.hide-mob {
    display: block;
}

.hide-desk {
    display: block;
}

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

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

img[data-original] {
    background: var(--chrome-lt);
}

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