/* Game Navigation Portal — hao123 Blue & Orange Inspired */

:root {
    --blu: #3566b0;
    --blu2: #2a55a0;
    --blu3: #1e4490;
    --blu-light: #eaf0fb;
    --blu-mid: #b8ccee;
    --ora: #f56b00;
    --ora2: #e05f00;
    --ora-light: #fff4ed;
    --bg: #f0f2f6;
    --bg2: #f8f9fb;
    --bg3: #e8eaf0;
    --sur: #ffffff;
    --topbar: #3566b0;
    --bdr: #dde2ee;
    --bdr2: #c8d0e0;
    --txt: #1a1f2e;
    --txt2: #445068;
    --txt3: #8895a8;
    --wht: #ffffff;
    --shadow: 0 1px 5px rgba(53,102,176,0.08);
    --shadow2: 0 3px 14px rgba(53,102,176,0.14);
    --radius: 5px;
    --radius-sm: 3px;
    --radius-lg: 8px;
    --ease: all 0.18s ease;
    --maxw: 1060px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--txt);
    line-height: 1.55;
    font-size: 14px;
    overflow-x: hidden;
}

/* ===================== HEADER ===================== */
.hn-header {
    background: var(--sur);
    border-bottom: 3px solid var(--blu);
    padding: 0.45rem 0;
    box-shadow: var(--shadow);
}

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

.hn-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    justify-content: center;
}

.hn-logo-lnk {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hn-logo-lnk::before {
    content: '▶';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--ora);
    color: var(--wht);
    font-size: 10px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    padding-left: 2px;
    box-shadow: 0 2px 6px rgba(245,107,0,0.3);
}

.hn-site-name {
    font-size: 22px;
    font-weight: 900;
    color: var(--blu);
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    letter-spacing: 0.2px;
}

.hn-domain-strip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: var(--blu-light);
    border: 1px solid var(--blu-mid);
    border-radius: var(--radius);
}

.hn-domain-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--blu);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.hn-domain-val {
    font-size: 17px;
    font-weight: 700;
    color: var(--txt);
    white-space: nowrap;
}

/* ===================== LAYOUT ===================== */
.hn-wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 14px;
}

.hn-sec {
    padding: 6px 0;
}

/* ===================== PROMO BANNER ===================== */
.hn-banner {
    margin: 5px 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hn-banner img {
    display: block;
    width: 100%;
}

/* ===================== CATEGORY NAV ===================== */
.hn-catbox {
    background: var(--sur);
    border: 1px solid var(--bdr);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 6px;
    box-shadow: var(--shadow);
}

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

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

.hn-zone-tag {
    width: 10%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--wht);
    padding: 9px 4px;
    border-right: 1px solid rgba(255,255,255,0.2);
    background: var(--blu);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.hn-zone-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 8px;
    align-items: center;
    background: var(--bg2);
}

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

.hn-zone-links a:hover,
.hn-zone-links a.active {
    background: var(--ora);
    color: var(--wht);
    border-color: var(--ora);
    box-shadow: 0 2px 8px rgba(245,107,0,0.25);
    font-weight: 600;
}

/* ===================== SEARCH ===================== */
.hn-srch {
    background: var(--sur);
    border: 1px solid var(--bdr);
    border-radius: var(--radius);
    padding: 9px 12px;
    margin-bottom: 6px;
    box-shadow: var(--shadow);
}

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

.hn-srch input[type="text"] {
    flex: 1;
    min-width: 80px;
    padding: 8px 13px;
    border: 1px solid var(--bdr2);
    border-radius: var(--radius-sm);
    background: var(--bg2);
    color: var(--txt);
    font-size: 14px;
    outline: none;
    transition: var(--ease);
}

.hn-srch input[type="text"]:focus {
    border-color: var(--blu);
    background: var(--sur);
    box-shadow: 0 0 0 2px rgba(53,102,176,0.1);
}

.hn-srch input[type="text"]::placeholder { color: var(--txt3); }

.hn-srch button {
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--ora);
    color: var(--wht);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.hn-srch button:hover {
    background: var(--ora2);
    box-shadow: 0 2px 8px rgba(245,107,0,0.3);
}

/* ===================== TAG CLOUD ===================== */
.hn-tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 9px 12px;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    margin-bottom: 6px;
    box-shadow: var(--shadow);
}

.hn-tagcloud a {
    padding: 4px 11px;
    background: var(--blu-light);
    border-radius: var(--radius-sm);
    color: var(--blu2);
    text-decoration: none;
    font-size: 12px;
    border: 1px solid var(--blu-mid);
    transition: var(--ease);
}

.hn-tagcloud a:hover {
    background: var(--ora);
    color: var(--wht);
    border-color: var(--ora);
}

/* ===================== SECTION BLOCKS ===================== */
.hn-blk { margin-bottom: 11px; }

.hn-blk-hd {
    margin-bottom: 9px;
    position: relative;
}

.hn-blk-title-wrap {
    display: flex;
    align-items: stretch;
    border-bottom: 2px solid var(--blu);
    padding-bottom: 0;
    margin-bottom: 9px;
}

.hn-blk-title {
    display: inline-block;
    font-size: 15px;
    font-weight: 800;
    color: var(--wht);
    background: var(--blu);
    padding: 6px 16px 6px 12px;
    margin: 0;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
    letter-spacing: 0.2px;
    position: relative;
}

.hn-blk-title a {
    color: var(--wht);
    text-decoration: none;
}

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

.hn-filmgrid li {
    animation: hnFade 0.35s ease backwards;
    background: var(--sur);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--bdr);
    transition: var(--ease);
}

.hn-filmgrid li:hover {
    box-shadow: var(--shadow2);
    transform: translateY(-2px);
    border-color: var(--blu-mid);
}

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

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

.hn-img-lnk {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 12 / 7;
    background: var(--bg3);
}

.hn-img-lnk img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.hn-img-lnk:hover img { transform: scale(1.05); }

.hn-img-lnk::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 34px;
    height: 34px;
    background: rgba(245,107,0,0.9);
    color: var(--wht);
    font-size: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--ease);
    z-index: 2;
    line-height: 34px;
    text-align: center;
    padding-left: 2px;
}

.hn-img-lnk:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.hn-card-body {
    padding: 7px 8px;
    border-top: 1px solid var(--bdr);
}

.hn-card-body h5 {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--txt2);
}

.hn-card-body h5 a {
    color: var(--txt2);
    text-decoration: none;
    transition: var(--ease);
}

.hn-card-body h5 a:hover { color: var(--ora); }

/* ===================== DETAIL PAGES ===================== */
.hn-detail-bar {
    text-align: center;
    padding: 13px 18px;
    font-size: 15px;
    margin: 7px 0;
    word-break: break-all;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    border-left: 3px solid var(--blu);
    box-shadow: var(--shadow);
    line-height: 1.7;
}

.hn-detail-bar a {
    color: var(--blu);
    text-decoration: none;
    font-weight: 700;
    margin-right: 7px;
}

.hn-info-panel {
    font-size: 14px;
    line-height: 1.9;
    padding: 16px 18px;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    margin: 6px 0;
    box-shadow: var(--shadow);
    color: var(--txt2);
}

.hn-preview-area { margin-top: 12px; }

.hn-preview-area picture { display: block; width: 100%; }

.hn-preview-area picture img,
.hn-preview-area img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--bdr);
}

/* ===================== ACTION BUTTONS ===================== */
.hn-btnrow {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 13px 8px;
    margin: 6px 0;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}

.hn-act-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--ora);
    color: var(--wht);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--ease);
    box-shadow: 0 2px 6px rgba(245,107,0,0.25);
}

.hn-act-btn:hover {
    background: var(--ora2);
    box-shadow: 0 4px 12px rgba(245,107,0,0.35);
    transform: translateY(-1px);
    color: var(--wht);
}

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

/* ===================== SHARE ===================== */
.hn-share {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    margin: 6px 0;
    flex-wrap: nowrap;
    box-shadow: var(--shadow);
}

.hn-share-url-box {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
    background: var(--bg2);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    border: 1px solid var(--bdr);
    overflow: hidden;
}

.hn-share-lbl {
    font-size: 11px;
    color: var(--txt3);
    white-space: nowrap;
    font-weight: 600;
}

.hn-share-url {
    font-size: 12px;
    color: var(--blu);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.hn-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 13px;
    background: var(--ora);
    color: var(--wht);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.hn-share-btn:hover { background: var(--ora2); }

.hn-share-ico { font-size: 13px; }

/* ===================== FRIENDLY LINKS ===================== */
.hn-flinks {
    padding: 10px 12px;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    box-shadow: var(--shadow);
}

.hn-flinks dl { margin: 0; }

.hn-flinks dd { display: inline-block; margin: 3px 4px; }

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

.hn-flinks a:hover { color: var(--ora); }

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

.hn-pgbtn,
.hn-pgcur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: var(--ease);
    min-width: 34px;
    text-align: center;
    text-decoration: none;
}

.hn-pgbtn {
    background: var(--sur);
    color: var(--txt2);
    border: 1px solid var(--bdr);
}

.hn-pgbtn:hover {
    background: var(--blu);
    border-color: var(--blu);
    color: var(--wht);
}

.hn-pgcur {
    background: var(--ora);
    color: var(--wht);
    border: 1px solid var(--ora);
    cursor: default;
    font-weight: 700;
}

/* ===================== FOOTER ===================== */
.hn-footer {
    padding: 16px 0;
    text-align: center;
    border-top: 3px solid var(--blu);
    margin-top: 16px;
    background: var(--topbar);
}

.hn-footer p { margin: 5px 0; color: rgba(255,255,255,0.65); font-size: 12px; }

.hn-footer a { color: rgba(255,255,255,0.65); text-decoration: none; transition: var(--ease); }

.hn-footer a:hover { color: var(--wht); }

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

.hn-pconly  { display: block; }
.hn-mobonly { display: block; }

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

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .hn-wrap { padding: 0 8px; }
    .hn-header { padding: 0.4rem 0; }
    .hn-brand { gap: 10px; }
    .hn-site-name { font-size: 18px; }
    .hn-domain-val { font-size: 15px; }
    .hn-domain-lbl { font-size: 10px; }
    .hn-sec { padding: 5px 0; }
    .hn-logo-lnk::before { width: 22px; height: 22px; font-size: 9px; }

    /* Cat nav: label 15%, links 85%, 4 per row × 2 rows */
    .hn-catrow { flex-wrap: nowrap; }
    .hn-zone-tag { width: 15%; font-size: 10px; padding: 7px 2px; letter-spacing: 0; }
    .hn-zone-links { width: 85%; gap: 4px; padding: 7px 4px; }
    .hn-zone-links a { font-size: 12px; padding: 4px 2px; width: calc((100% - 12px) / 4); }

    /* Film grid: 2 per row on mobile */
    .hn-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .hn-card-body h5 { font-size: 12px; }

    .hn-blk { margin-bottom: 9px; }
    .hn-blk-title { font-size: 13px; padding: 5px 12px 5px 10px; }

    .hn-tagcloud { padding: 8px 10px; gap: 5px; }
    .hn-tagcloud a { padding: 4px 9px; font-size: 12px; }

    /* Search: force no-wrap single line */
    .hn-srch { padding: 8px 10px; }
    .hn-srch form { gap: 5px; flex-wrap: nowrap; }
    .hn-srch input[type="text"] { min-width: 60px; font-size: 13px; padding: 7px 10px; }
    .hn-srch button { padding: 7px 10px; font-size: 12px; }

    .hn-btnrow { padding: 10px 6px; gap: 8px; }
    .hn-act-btn { padding: 9px 16px; font-size: 13px; }

    .hn-share { padding: 8px 10px; gap: 6px; }
    .hn-share-url-box { padding: 6px 8px; }
    .hn-share-btn { padding: 7px 11px; font-size: 12px; }

    .hn-pager { padding: 9px 0; gap: 4px; }
    .hn-pgbtn, .hn-pgcur { padding: 6px 10px; font-size: 12px; min-width: 30px; }

    .hn-footer { padding: 13px 0; margin-top: 13px; }

    .hn-pconly { display: none !important; }
}

@media (max-width: 480px) {
    .hn-site-name { font-size: 16px; }
    .hn-domain-val { font-size: 14px; }
    .hn-domain-strip { padding: 3px 10px; gap: 5px; }
    .hn-logo-lnk::before { width: 20px; height: 20px; font-size: 8px; }

    .hn-zone-tag { width: 15%; font-size: 10px; padding: 6px 2px; }
    .hn-zone-links { width: 85%; gap: 3px; padding: 6px 3px; }
    .hn-zone-links a { font-size: 12px; padding: 3px 1px; width: calc((100% - 9px) / 4); }

    .hn-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .hn-card-body h5 { font-size: 11px; }
    .hn-blk-title { font-size: 12px; }

    .hn-srch input[type="text"] { font-size: 12px; padding: 7px 8px; }
    .hn-srch button { padding: 7px 8px; font-size: 11px; }

    .hn-act-btn { padding: 9px 14px; font-size: 12px; }
    .hn-detail-bar { font-size: 13px; padding: 11px 13px; }
    .hn-info-panel { padding: 13px 14px; font-size: 13px; }
}

@media (min-width: 769px) {
    .hn-mobonly { display: none !important; }
    .hn-filmgrid { grid-template-columns: repeat(4, 1fr); }
}
