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

:root {
    --page-bg: #eaeded;
    --page-soft: #f3f3f3;
    --page-dim: #e3e6e6;
    --panel: #ffffff;
    --header-bg: #131921;
    --header-sub: #232f3e;
    --header-hover: #37475a;
    --prime: #f0c14b;
    --prime-dk: #c7981e;
    --prime-glow: rgba(240,193,75,.32);
    --prime-wash: #fdf7e6;
    --prime-rim: #e8b84b;
    --action: #ff6f00;
    --hyperlink: #007185;
    --hyperlink-hover: #c45500;
    --body-txt: #0f1111;
    --body2: #333333;
    --muted-txt: #565959;
    --dim-txt: #888888;
    --divider: #d5d9d9;
    --divider2: #c0c4c4;
    --elev1: 0 2px 5px rgba(15,17,17,.1);
    --elev2: 0 3px 14px rgba(15,17,17,.14);
    --rd: 4px;
    --rd2: 3px;
    --rd3: 8px;
}

html { font-size: 15px; }

body {
    background: var(--page-bg);
    color: var(--body-txt);
    font-family: 'PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;
    line-height: 1.6;
}

a { color: var(--hyperlink); text-decoration: none; transition: color .15s; }
a:hover { color: var(--hyperlink-hover); text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.fix::after { content: ''; display: table; clear: both; }

/* ===== PAGE WRAPPER ===== */
.am-frame {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ===== TOP HEADER ===== */
.am-topbar {
    background: var(--header-bg);
    padding: 8px 0;
}

.am-topbar .am-frame {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.am-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.am-logo-anchor {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--rd2);
    padding: 2px 4px;
    transition: border-color .15s;
}

.am-logo-anchor:hover { border-color: rgba(255,255,255,.6); text-decoration: none; }

.am-site-title {
    font-size: 1.26rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -.2px;
    border-bottom: none;
    text-decoration: none;
    font-style: normal;
}

.am-addr-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--prime);
    border: 1px solid var(--prime-dk);
    border-radius: var(--rd2);
    padding: 2px 11px;
}

.am-addr-pill .aap-caption {
    font-size: 0.64rem;
    color: rgba(0,0,0,.46);
    white-space: nowrap;
}

.am-addr-pill .aap-domain {
    font-size: 1.08rem;
    font-weight: 900;
    color: var(--body-txt);
    white-space: nowrap;
    letter-spacing: .1px;
}

/* ===== AD BANNER ===== */
.am-banner {
    margin: 4px 0 3px;
}
.am-banner img { border-radius: var(--rd); width: 100%; }

/* ===== CATEGORY NAV TABLE ===== */
.am-nav-table {
    background: var(--panel);
    border: 1px solid var(--divider);
    border-radius: var(--rd);
    overflow: hidden;
    margin: 3px 0;
    box-shadow: var(--elev1);
}

.am-nav-stripe {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--divider);
    min-height: 36px;
}

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

.am-zone-marker {
    background: var(--header-sub);
    color: #ffffff;
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 2px solid var(--prime);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .2px;
    flex-shrink: 0;
}

.am-cat-cells {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: center;
    padding: 3px 8px;
    gap: 3px;
    flex: 1;
}

.am-cat-cells a {
    font-size: .81rem;
    color: var(--body2);
    padding: 3px 4px;
    border-radius: var(--rd2);
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.am-cat-cells a:hover {
    background: var(--prime-wash);
    color: var(--action);
    border-color: var(--prime-rim);
    text-decoration: none;
}

.am-cat-cells a.on {
    background: var(--prime);
    color: var(--body-txt);
    border-color: var(--prime-dk);
    font-weight: 700;
}

/* ===== SEARCH BAR ===== */
.am-searchbar {
    background: var(--panel);
    border: 1px solid var(--divider);
    border-radius: var(--rd);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--elev1);
}

.am-searchbar form {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.am-searchbar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--divider2);
    border-radius: var(--rd2) 0 0 var(--rd2);
    padding: 0 12px;
    font-size: .87rem;
    color: var(--body-txt);
    background: #fff;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.am-searchbar input[type="text"]::placeholder { color: var(--dim-txt); }

.am-searchbar input[type="text"]:focus {
    border-color: var(--prime-dk);
    box-shadow: 0 0 0 3px var(--prime-glow);
}

.am-searchbar button {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--divider2);
    border-radius: var(--rd2);
    background: var(--page-soft);
    color: var(--body2);
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    flex-shrink: 0;
}

.am-searchbar button:hover { background: var(--page-dim); color: var(--body-txt); }

.am-searchbar button[value="1"] {
    background: var(--prime);
    color: var(--body-txt);
    border-color: var(--prime-dk);
    font-weight: 700;
    border-radius: 0 var(--rd2) var(--rd2) 0;
    padding: 0 16px;
}
.am-searchbar button[value="1"]:hover { background: var(--prime-dk); }

.am-searchbar button[value="2"] {
    background: var(--header-sub);
    color: #fff;
    border-color: var(--header-hover);
    font-weight: 600;
}
.am-searchbar button[value="2"]:hover { background: var(--header-hover); }

/* ===== KEYWORD CLOUD ===== */
.am-keyword-box {
    background: var(--panel);
    border: 1px solid var(--divider);
    border-radius: var(--rd);
    padding: 6px 12px;
    margin: 3px 0;
    box-shadow: var(--elev1);
}

.am-keyword-box h4 {
    font-size: .77rem;
    font-weight: 700;
    color: var(--muted-txt);
    margin-bottom: 5px;
}

.am-kw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.am-kw-list .am-kw {
    display: inline-block;
    background: var(--page-soft);
    color: var(--hyperlink);
    border: 1px solid var(--divider);
    border-radius: var(--rd2);
    padding: 2px 9px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .15s;
}

.am-kw-list .am-kw:hover {
    background: var(--prime-wash);
    color: var(--action);
    border-color: var(--prime-rim);
    text-decoration: none;
}

/* ===== CONTENT MODULE ===== */
.am-module {
    background: var(--panel);
    border: 1px solid var(--divider);
    border-radius: var(--rd3);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--elev1);
}

.am-module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--divider);
    position: relative;
}

.am-module-head::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 34px;
    height: 2px;
    background: var(--prime-dk);
    border-radius: 2px;
}

.am-module-head h3 {
    font-size: .97rem;
    font-weight: 900;
    color: var(--body-txt);
    letter-spacing: .1px;
}

.am-module-head h3 a { color: var(--body-txt); text-decoration: none; }
.am-module-head h3 a:hover { color: var(--action); text-decoration: none; }

.am-module-head h4 {
    font-size: .94rem;
    font-weight: 900;
    color: var(--body-txt);
}

/* ===== MEDIA TILES ===== */
.am-tile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.am-tile-grid li {
    border-radius: var(--rd);
    overflow: hidden;
    border: 1px solid var(--divider);
    background: var(--page-soft);
    transition: box-shadow .18s, transform .18s;
}

.am-tile-grid li:hover {
    box-shadow: var(--elev2);
    transform: translateY(-2px);
}

.am-tile-img {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--page-dim);
}

.am-tile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.am-tile-img:hover img { transform: scale(1.05); }

.am-tile-desc {
    padding: 5px 7px 7px;
    border-top: 1px solid var(--divider);
}

.am-tile-desc h5 {
    font-size: .77rem;
    font-weight: 500;
    color: var(--body2);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.am-tile-desc h5 a { color: var(--hyperlink); text-decoration: none; }
.am-tile-desc h5 a:hover { color: var(--action); text-decoration: underline; }

/* ===== PAGE NAV ===== */
.am-pagenav {
    margin: 12px 0 5px;
    display: flex;
    justify-content: center;
}

.am-pagenav-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.am-pagenav-inner a.am-pn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--panel);
    border: 1px solid var(--divider2);
    border-radius: var(--rd2);
    font-size: .83rem;
    color: var(--hyperlink);
    text-decoration: none;
    transition: all .15s;
}

.am-pagenav-inner a.am-pn:hover {
    background: var(--prime-wash);
    border-color: var(--prime-rim);
    color: var(--action);
    text-decoration: none;
}

.am-pagenav-inner a.am-pn-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--prime);
    border: 1px solid var(--prime-dk);
    border-radius: var(--rd2);
    font-size: .83rem;
    font-weight: 700;
    color: var(--body-txt);
    cursor: default;
}

/* ===== FOOTER LINKS ===== */
.am-site-links {
    background: var(--panel);
    border: 1px solid var(--divider);
    border-radius: var(--rd);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--elev1);
}

.am-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.am-link-row dd { display: inline; }

.am-link-row a {
    display: inline-block;
    font-size: .76rem;
    color: var(--hyperlink);
    padding: 2px 9px;
    border-radius: var(--rd2);
    border: 1px solid var(--divider);
    background: var(--page-soft);
    text-decoration: none;
    transition: all .15s;
}

.am-link-row a:hover { color: var(--action); border-color: var(--prime-rim); text-decoration: none; }

.am-copyright {
    text-align: center;
    padding: 7px 0 12px;
    color: var(--dim-txt);
    font-size: .74rem;
}

/* ===== DETAIL PAGES ===== */
.am-dtl-heading {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .97rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--panel);
    border: 1px solid var(--divider);
    border-left: 4px solid var(--prime);
    border-radius: var(--rd);
    box-shadow: var(--elev1);
}

.am-dtl-heading a {
    color: var(--hyperlink);
    font-weight: 700;
    margin-right: 6px;
    text-decoration: none;
}

.am-dtl-content {
    font-size: .9rem;
    line-height: 2;
    padding: 14px 18px;
    background: var(--panel);
    border: 1px solid var(--divider);
    border-radius: var(--rd);
    box-shadow: var(--elev1);
    margin: 4px 0;
    color: var(--body2);
}

.am-pic-block {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.am-pic-block picture,
.am-pic-block img {
    width: 100%;
    height: auto;
    border-radius: var(--rd2);
    display: block;
}

/* ===== DOWNLOAD BUTTONS ===== */
.am-btn-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.am-act-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 22px;
    background: var(--prime);
    color: var(--body-txt);
    border: 1px solid var(--prime-dk);
    border-radius: var(--rd2);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    text-decoration: none;
    letter-spacing: .2px;
}

.am-act-btn:hover {
    background: var(--prime-dk);
    color: var(--body-txt);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--prime-glow);
    text-decoration: none;
}

.am-hint-line {
    text-align: center;
    padding: 6px;
    font-size: .81rem;
}

.am-hint-line a { color: var(--hyperlink); font-weight: 600; text-decoration: none; }
.am-hint-line a:hover { color: var(--action); text-decoration: underline; }

/* ===== SHARE STRIP ===== */
.am-share-strip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--page-soft);
    border: 1px solid var(--divider);
    border-radius: var(--rd);
    padding: 7px 12px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.am-share-strip .ass-label { font-size: .76rem; color: var(--dim-txt); white-space: nowrap; }
.am-share-strip .ass-link  { font-size: .78rem; color: var(--hyperlink); flex: 1; min-width: 0; word-break: break-all; }

.am-share-strip .ass-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    background: var(--header-sub);
    color: #fff;
    border: 1px solid var(--header-hover);
    border-radius: var(--rd2);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
}

.am-share-strip .ass-copy:hover { background: var(--prime); color: var(--body-txt); border-color: var(--prime-dk); }

/* ===== VISIBILITY HELPERS ===== */
.am-desk { display: block; }
.am-mobi { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .am-tile-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .am-desk { display: none; }
    .am-mobi { display: block; }
}

@media (max-width: 768px) {
    html { font-size: 14px; }

    .am-site-title { font-size: 1.05rem; }
    .am-addr-pill .aap-domain { font-size: .93rem; }

    .am-nav-stripe { align-items: stretch; }

    .am-zone-marker {
        width: 15%;
        min-width: 15%;
        max-width: 15%;
        font-size: 10px;
        padding: 4px 2px;
        letter-spacing: 0;
        line-height: 1.4;
        word-break: break-all;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .am-cat-cells {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        padding: 4px 5px;
        align-items: center;
    }

    .am-cat-cells a {
        font-size: 12px;
        padding: 5px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .am-searchbar form {
        flex-wrap: nowrap;
        gap: 3px;
    }

    .am-searchbar input[type="text"] {
        height: 33px;
        font-size: .77rem;
        padding: 0 7px;
    }

    .am-searchbar button {
        height: 33px;
        padding: 0 7px;
        font-size: .72rem;
    }

    .am-searchbar button[value="1"] { padding: 0 10px; }

    .am-tile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .am-tile-img { aspect-ratio: 600 / 350; }
    .am-tile-desc h5 { font-size: .71rem; }
    .am-module { padding: 9px 9px 7px; }
    .am-act-btn { padding: 8px 14px; font-size: .83rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .am-zone-marker { font-size: 10px; }
    .am-cat-cells a { font-size: 13px; }
}

@media (max-width: 380px) {
    .am-zone-marker { font-size: 10px; }
    .am-cat-cells a { font-size: 12px; }
    .am-searchbar button { padding: 0 5px; font-size: .66rem; }
}
