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

:root {
    --at-cream: #f0ede6;
    --at-cream2: #e8e4db;
    --at-yellow: #f5e642;
    --at-yellow-dk: #d4c500;
    --at-yellow-bg: #fdfce8;
    --at-black: #111111;
    --at-black2: #1a1a1a;
    --at-dark: #2a2a2a;
    --at-text: #111111;
    --at-text2: #3a3a3a;
    --at-text3: #888888;
    --at-surface: #ffffff;
    --at-border: #e0dbd0;
    --at-border2: #ccc6ba;
    --at-sh1: 0 1px 4px rgba(0,0,0,.06);
    --at-sh2: 0 4px 16px rgba(0,0,0,.08);
    --at-sh3: 0 8px 30px rgba(0,0,0,.12);
    --at-r: 8px;
    --at-r2: 6px;
    --at-r3: 14px;
    --at-pill: 24px;
}

html { font-size: 15px; }

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

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

/* ===== CONTAINER ===== */
.at-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== HEADER ===== */
.at-header {
    padding: 10px 14px;
}

.at-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--at-surface);
    border-radius: var(--at-pill);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    box-shadow: var(--at-sh2);
}

.at-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.at-logolink {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.at-sitename {
    font-size: 1.42rem;
    font-weight: 900;
    color: var(--at-black);
    font-style: normal;
    letter-spacing: -.6px;
    text-decoration: none;
    border-bottom: none;
}

.at-domaintag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--at-yellow);
    border-radius: var(--at-pill);
    padding: 4px 13px;
}

.at-domaintag .adt-note {
    font-size: 0.67rem;
    color: var(--at-black);
    white-space: nowrap;
    font-weight: 700;
}

.at-domaintag .adt-url {
    font-size: 1.07rem;
    font-weight: 800;
    color: var(--at-black);
    white-space: nowrap;
}

/* ===== PROMO ===== */
.at-promo {
    margin: 4px 0 3px;
}
.at-promo img { border-radius: var(--at-r3); width: 100%; }

/* ===== CATEGORY NAV ===== */
.at-catpanel {
    background: var(--at-surface);
    border: 1px solid var(--at-border);
    border-radius: var(--at-r3);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--at-sh1);
}

.at-catrow {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--at-border);
    min-height: 38px;
}

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

.at-catzn {
    background: var(--at-black);
    color: rgba(255,255,255,.78);
    font-size: .67rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 2px;
    width: 62px;
    min-width: 62px;
    border-right: 1px solid rgba(255,255,255,.1);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.at-catlinks a {
    font-size: .82rem;
    color: var(--at-text2);
    padding: 4px 5px;
    border-radius: var(--at-pill);
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1.5px solid transparent;
    text-decoration: none;
    display: block;
}

.at-catlinks a:hover {
    background: var(--at-yellow);
    color: var(--at-black);
    border-color: var(--at-yellow-dk);
    text-decoration: none;
}

.at-catlinks a.active {
    background: var(--at-black);
    color: #fff;
    border-color: var(--at-black);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.at-searchbar {
    background: var(--at-surface);
    border: 1px solid var(--at-border);
    border-radius: var(--at-r3);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--at-sh1);
}

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

.at-searchbar input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 38px;
    border: 1.5px solid var(--at-border2);
    border-radius: var(--at-pill);
    padding: 0 16px;
    font-size: .88rem;
    color: var(--at-text);
    background: var(--at-cream);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.at-searchbar input[type="text"]:focus {
    border-color: var(--at-black);
    box-shadow: 0 0 0 3px rgba(17,17,17,.10);
    background: var(--at-surface);
}

.at-searchbar button {
    height: 38px;
    padding: 0 14px;
    border: none;
    border-radius: var(--at-pill);
    background: var(--at-black);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}

.at-searchbar button:hover { background: var(--at-dark); }

.at-searchbar button[value="1"] {
    background: var(--at-yellow);
    color: var(--at-black);
}
.at-searchbar button[value="1"]:hover { background: var(--at-yellow-dk); color: var(--at-black); }

.at-searchbar button[value="2"] {
    background: var(--at-black2);
    color: #fff;
}
.at-searchbar button[value="2"]:hover { background: #333; }

/* ===== HOT TAGS ===== */
.at-hotpanel {
    background: var(--at-surface);
    border: 1px solid var(--at-border);
    border-radius: var(--at-r3);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--at-sh1);
}

.at-hotpanel h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--at-black);
    margin-bottom: 5px;
    letter-spacing: .2px;
}

.at-tagstrip {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.at-tagstrip .at-taglnk {
    display: inline-block;
    background: var(--at-cream);
    color: var(--at-text2);
    border: 1.5px solid var(--at-border2);
    border-radius: var(--at-pill);
    padding: 2px 11px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .15s;
    font-weight: 500;
}

.at-tagstrip .at-taglnk:hover {
    background: var(--at-yellow);
    color: var(--at-black);
    border-color: var(--at-yellow-dk);
    text-decoration: none;
}

/* ===== CONTENT SECTION ===== */
.at-section {
    background: var(--at-surface);
    border: 1px solid var(--at-border);
    border-radius: var(--at-r3);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--at-sh1);
}

.at-sect-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--at-cream);
    position: relative;
}

.at-sect-hd::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 36px;
    height: 2px;
    background: var(--at-yellow);
    border-radius: 2px;
}

.at-sect-hd h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--at-black);
    letter-spacing: -.3px;
}

.at-sect-hd h3 a { color: var(--at-black); text-decoration: none; }
.at-sect-hd h3 a:hover { color: var(--at-dark); text-decoration: underline; }

.at-sect-hd h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--at-black);
}

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

.at-filmgrid li {
    border-radius: var(--at-r2);
    overflow: hidden;
    border: 1.5px solid var(--at-border);
    background: var(--at-cream);
    transition: box-shadow .18s, transform .18s;
    min-width: 0;
}

.at-filmgrid li:hover {
    box-shadow: var(--at-sh3);
    transform: translateY(-3px);
}

.at-filmthumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--at-border);
}

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

.at-filmthumb:hover img { transform: scale(1.05); }

.at-filmtxt {
    padding: 6px 8px 8px;
    border-top: 2px solid transparent;
    transition: border-color .15s;
}

.at-filmgrid li:hover .at-filmtxt { border-top-color: var(--at-yellow); }

.at-filmtxt h5 {
    font-size: .78rem;
    font-weight: 600;
    color: var(--at-text);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.at-filmtxt h5 a { color: var(--at-text); text-decoration: none; }
.at-filmtxt h5 a:hover { color: var(--at-dark); text-decoration: underline; }

/* ===== PAGINATION ===== */
.at-pgzone {
    margin: 13px 0 5px;
    display: flex;
    justify-content: center;
}

.at-pgrow {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.at-pgrow a.at-pgbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--at-surface);
    border: 1.5px solid var(--at-border2);
    border-radius: var(--at-pill);
    font-size: .84rem;
    font-weight: 600;
    color: var(--at-text2);
    text-decoration: none;
    transition: all .15s;
}

.at-pgrow a.at-pgbtn:hover {
    background: var(--at-yellow);
    border-color: var(--at-yellow-dk);
    color: var(--at-black);
    text-decoration: none;
}

.at-pgrow a.at-pgon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--at-black);
    border: 1.5px solid var(--at-black);
    border-radius: var(--at-pill);
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.at-footlinks {
    background: var(--at-surface);
    border: 1px solid var(--at-border);
    border-radius: var(--at-r3);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--at-sh1);
}

.at-flnklist {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.at-flnklist dd { display: inline; }

.at-flnklist a {
    display: inline-block;
    font-size: .77rem;
    color: var(--at-text3);
    padding: 2px 9px;
    border-radius: var(--at-pill);
    border: 1.5px solid var(--at-border);
    background: var(--at-cream);
    text-decoration: none;
    transition: all .15s;
    font-weight: 500;
}

.at-flnklist a:hover { color: var(--at-black); border-color: var(--at-black); background: var(--at-yellow); text-decoration: none; }

.at-footcr {
    text-align: center;
    padding: 8px 0 13px;
    color: var(--at-text3);
    font-size: .76rem;
}

/* ===== DETAIL ===== */
.at-dtl-title {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .97rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--at-surface);
    border: 1.5px solid var(--at-border);
    border-left: 4px solid var(--at-black);
    border-radius: var(--at-r2);
    box-shadow: var(--at-sh1);
}

.at-dtl-title a {
    color: var(--at-black);
    font-weight: 800;
    margin-right: 6px;
}

.at-dtl-body {
    font-size: .9rem;
    line-height: 2;
    padding: 14px 17px;
    background: var(--at-surface);
    border: 1.5px solid var(--at-border);
    border-radius: var(--at-r2);
    box-shadow: var(--at-sh1);
    margin: 4px 0;
}

.at-previewwrap {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.at-previewwrap picture,
.at-previewwrap img {
    width: 100%;
    height: auto;
    border-radius: var(--at-r2);
    display: block;
}

/* ===== BUTTONS ===== */
.at-opbtnrow {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 11px 0;
}

.at-opbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--at-black);
    color: #fff;
    border: none;
    border-radius: var(--at-pill);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .13s;
    text-decoration: none;
}

.at-opbtn:hover {
    background: var(--at-yellow);
    color: var(--at-black);
    transform: translateY(-1px);
    text-decoration: none;
}

.at-clientip {
    text-align: center;
    padding: 7px;
    font-size: .82rem;
}

.at-clientip a { color: var(--at-black); font-weight: 700; }
.at-clientip a:hover { color: var(--at-dark); }

/* ===== SHARE ===== */
.at-shareline {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--at-cream);
    border: 1.5px solid var(--at-border);
    border-radius: var(--at-r3);
    padding: 8px 13px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.at-shareline .asl-lbl { font-size: .77rem; color: var(--at-text3); white-space: nowrap; font-weight: 600; }
.at-shareline .asl-url { font-size: .79rem; color: var(--at-text2); flex: 1; min-width: 0; word-break: break-all; }

.at-shareline .asl-cpbtn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    background: var(--at-black);
    color: #fff;
    border: none;
    border-radius: var(--at-pill);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

.at-shareline .asl-cpbtn:hover { background: var(--at-yellow); color: var(--at-black); }

/* ===== VISIBILITY ===== */
.at-pc { display: block; }
.at-mb { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .at-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .at-pc { display: none; }
    .at-mb { display: block; }
}

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

    .at-sitename { font-size: 1.12rem; }
    .at-domaintag .adt-url { font-size: .9rem; }
    .at-header-inner { border-radius: 16px; padding: 8px 14px; }

    .at-catrow { align-items: stretch; }

    .at-catzn {
        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;
    }

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

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

    .at-searchbar form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .at-searchbar input[type="text"] {
        height: 34px;
        font-size: .79rem;
        padding: 0 8px;
    }

    .at-searchbar button {
        height: 34px;
        padding: 0 7px;
        font-size: .74rem;
    }

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

    .at-filmthumb { aspect-ratio: 600 / 350; }
    .at-filmtxt h5 { font-size: .72rem; }
    .at-section { padding: 9px 9px 7px; }
    .at-opbtn { padding: 9px 14px; font-size: .84rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .at-catzn { font-size: 10px; }
    .at-catlinks a { font-size: 13px; }
}

@media (max-width: 380px) {
    .at-catzn { font-size: 10px; }
    .at-catlinks a { font-size: 12px; }
    .at-searchbar button { padding: 0 5px; font-size: .68rem; }
}
