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

:root {
    --bg: #ffffff;
    --bg-soft: #f6f8fb;
    --bg-muted: #edf1f7;
    --bg-tint: #f0f6f0;
    --blue: #1e6ebf;
    --blue-dk: #155499;
    --blue-mid: #2176c7;
    --blue-light: #e8f2fc;
    --blue-bdr: #b3d1f5;
    --teal: #1a8a7e;
    --teal-bg: #e5f4f2;
    --ink: #1a2e44;
    --ink2: #354d66;
    --ink3: #8096b0;
    --bdr: #dce5ef;
    --bdr2: #c8d6e8;
    --sh1: 0 1px 4px rgba(26,46,68,.07);
    --sh2: 0 3px 12px rgba(26,46,68,.1);
    --sh3: 0 6px 24px rgba(26,46,68,.14);
    --rad: 8px;
    --rad2: 5px;
    --rad3: 12px;
    --pill: 28px;
}

html { font-size: 15px; }

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

a { color: var(--blue); text-decoration: none; transition: color .16s; }
a:hover { color: var(--blue-dk); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.bs-cf::after { content: ''; display: table; clear: both; }

/* ===== WRAPPER ===== */
.bs-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* ===== SITE HEADER ===== */
.bs-header {
    background: var(--bg);
    border-bottom: 1px solid var(--bdr);
    padding: 9px 0;
    box-shadow: var(--sh1);
}

.bs-header .bs-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

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

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

.bs-sitename {
    font-size: 1.34rem;
    font-weight: 900;
    color: var(--ink);
    font-style: normal;
    letter-spacing: -.3px;
    text-decoration: none;
    border-bottom: none;
}

/* Domain badge: ghost outline style like BugSnag's "Get a Demo" button */
.bs-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1.5px solid var(--blue);
    border-radius: var(--pill);
    padding: 4px 15px;
}

.bs-domain-badge .dbg-lbl {
    font-size: 0.67rem;
    color: var(--ink3);
    white-space: nowrap;
}

.bs-domain-badge .dbg-val {
    font-size: 1.06rem;
    font-weight: 800;
    color: var(--blue);
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.bs-nav-panel {
    background: var(--bg);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.bs-nav-strip {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--bdr);
    min-height: 38px;
}

.bs-nav-strip:last-child { border-bottom: none; }

.bs-zone-tag {
    background: var(--blue);
    color: rgba(255,255,255,.92);
    font-size: .68rem;
    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,.15);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.bs-link-row a {
    font-size: .82rem;
    color: var(--ink2);
    padding: 3px 6px;
    border-radius: var(--rad2);
    transition: all .16s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.bs-link-row a:hover {
    background: var(--blue-light);
    color: var(--blue);
    border-color: var(--blue-bdr);
}

.bs-link-row a.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.bs-search-zone {
    background: var(--bg);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.bs-search-zone input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--bdr2);
    border-radius: var(--rad2);
    padding: 0 12px;
    font-size: .88rem;
    color: var(--ink);
    background: var(--bg-soft);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.bs-search-zone input[type="text"]:focus {
    border-color: var(--blue);
    background: var(--bg);
    box-shadow: 0 0 0 3px rgba(30,110,191,.12);
}

.bs-search-zone button {
    height: 36px;
    padding: 0 12px;
    border: 1.5px solid var(--bdr2);
    border-radius: var(--rad2);
    background: var(--bg-soft);
    color: var(--ink2);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .16s;
    flex-shrink: 0;
}

.bs-search-zone button:hover {
    background: var(--bg-muted);
    border-color: var(--ink3);
    color: var(--ink);
}

/* Solid blue CTA — like BugSnag "Try Free" */
.bs-search-zone button[value="1"] {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.bs-search-zone button[value="1"]:hover {
    background: var(--blue-dk);
    border-color: var(--blue-dk);
}

/* Ghost outline — like BugSnag "Get a Demo" */
.bs-search-zone button[value="2"] {
    background: transparent;
    color: var(--blue);
    border-color: var(--blue);
}
.bs-search-zone button[value="2"]:hover {
    background: var(--blue-light);
    color: var(--blue-dk);
}

/* ===== HOT TAGS ===== */
.bs-hot-block {
    background: var(--bg);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.bs-hot-block h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 5px;
}

.bs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bs-tags .bstag {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--ink2);
    border: 1px solid var(--bdr);
    border-radius: var(--pill);
    padding: 2px 10px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .16s;
}

.bs-tags .bstag:hover {
    background: var(--blue-light);
    color: var(--blue);
    border-color: var(--blue-bdr);
}

/* ===== CONTENT SECTION ===== */
.bs-block {
    background: var(--bg);
    border: 1px solid var(--bdr);
    border-radius: var(--rad3);
    padding: 13px 13px 10px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

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

.bs-block-hd::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 38px;
    height: 2px;
    background: var(--blue);
    border-radius: 2px;
}

.bs-block-hd h3 {
    font-size: .98rem;
    font-weight: 800;
    color: var(--ink);
}

.bs-block-hd h3 a { color: var(--ink); }
.bs-block-hd h3 a:hover { color: var(--blue); }

.bs-block-hd h4 {
    font-size: .95rem;
    font-weight: 800;
    color: var(--ink);
}

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

.bs-filmgrid li {
    border-radius: var(--rad);
    overflow: hidden;
    border: 1px solid var(--bdr);
    background: var(--bg-soft);
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.bs-filmgrid li:hover {
    box-shadow: var(--sh3);
    transform: translateY(-2px);
    border-color: var(--blue-bdr);
}

.bs-cover {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--bg-muted);
}

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

.bs-cover:hover img { transform: scale(1.04); }

.bs-filmfoot {
    padding: 5px 7px 7px;
}

.bs-filmfoot h5 {
    font-size: .78rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bs-filmfoot h5 a { color: var(--ink); }
.bs-filmfoot h5 a:hover { color: var(--blue); }

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

.bs-pg-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.bs-pg-row a.bspg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--bg);
    border: 1.5px solid var(--bdr2);
    border-radius: var(--rad2);
    font-size: .84rem;
    color: var(--ink2);
    text-decoration: none;
    transition: all .16s;
}

.bs-pg-row a.bspg:hover {
    background: var(--blue-light);
    border-color: var(--blue);
    color: var(--blue);
}

.bs-pg-row a.bspg-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--blue);
    border: 1.5px solid var(--blue);
    border-radius: var(--rad2);
    font-size: .84rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
}

/* ===== FOOTER ===== */
.bs-flinks-area {
    background: var(--bg);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    padding: 9px 13px;
    margin: 4px 0;
    box-shadow: var(--sh1);
}

.bs-flink-dl {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bs-flink-dl dd { display: inline; }

.bs-flink-dl a {
    display: inline-block;
    font-size: .77rem;
    color: var(--ink3);
    padding: 2px 9px;
    border-radius: var(--rad2);
    border: 1px solid var(--bdr);
    background: var(--bg-soft);
    text-decoration: none;
    transition: all .16s;
}

.bs-flink-dl a:hover { color: var(--blue); border-color: var(--blue-bdr); }

.bs-cr-bar {
    text-align: center;
    padding: 8px 0 13px;
    color: var(--ink3);
    font-size: .76rem;
}

/* ===== DETAIL PAGES ===== */
.bs-dtl-title {
    line-height: 1.8;
    text-align: center;
    padding: 12px 15px;
    font-size: .98rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--bg);
    border: 1px solid var(--bdr);
    border-left: 4px solid var(--blue);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
}

.bs-dtl-title a {
    color: var(--blue);
    font-weight: 700;
    margin-right: 6px;
}

.bs-dtl-content {
    font-size: .9rem;
    line-height: 1.95;
    padding: 14px 18px;
    background: var(--bg);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    box-shadow: var(--sh1);
    margin: 4px 0;
    color: var(--ink2);
}

.bs-preview-area {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.bs-preview-area picture,
.bs-preview-area img {
    width: 100%;
    height: auto;
    border-radius: var(--rad2);
    display: block;
}

/* ===== DL BUTTONS ===== */
.bs-action-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

/* Solid blue — BugSnag "Try for Free" style */
.bs-btn-solid {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--blue);
    color: #fff;
    border: 1.5px solid var(--blue);
    border-radius: var(--rad2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .14s;
    text-decoration: none;
}

.bs-btn-solid:hover {
    background: var(--blue-dk);
    border-color: var(--blue-dk);
    color: #fff;
    transform: translateY(-1px);
}

/* Ghost button for secondary actions */
.bs-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: transparent;
    color: var(--blue);
    border: 1.5px solid var(--blue);
    border-radius: var(--rad2);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    text-decoration: none;
}

.bs-btn-ghost:hover {
    background: var(--blue-light);
    color: var(--blue-dk);
    transform: translateY(-1px);
}

.bs-client-note {
    text-align: center;
    padding: 6px;
    font-size: .82rem;
}

.bs-client-note a { color: var(--ink2); font-weight: 600; }
.bs-client-note a:hover { color: var(--blue); }

/* ===== SHARE ===== */
.bs-share-area {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-soft);
    border: 1px solid var(--bdr);
    border-radius: var(--rad);
    padding: 8px 13px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.bs-share-area .sha-lbl { font-size: .77rem; color: var(--ink3); white-space: nowrap; }
.bs-share-area .sha-url { font-size: .79rem; color: var(--ink2); flex: 1; min-width: 0; word-break: break-all; }

.bs-share-area .sha-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: var(--rad2);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s;
    flex-shrink: 0;
}

.bs-share-area .sha-btn:hover { background: var(--blue-dk); }

/* ===== VIS HELPERS ===== */
.bs-pc { display: block; }
.bs-mb { display: none; }

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

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

    .bs-sitename { font-size: 1.06rem; }
    .bs-domain-badge .dbg-val { font-size: .9rem; }

    .bs-nav-strip { align-items: stretch; }

    .bs-zone-tag {
        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;
    }

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

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

    /* Search: all one row, no wrap */
    .bs-search-zone form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

    .bs-search-zone button {
        height: 34px;
        padding: 0 7px;
        font-size: .74rem;
    }

    /* Film grid: 2 cols */
    .bs-filmgrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .bs-cover { aspect-ratio: 600 / 350; }
    .bs-filmfoot h5 { font-size: .72rem; }
    .bs-block { padding: 9px 9px 7px; }
    .bs-btn-solid,
    .bs-btn-ghost { padding: 9px 15px; font-size: .84rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .bs-zone-tag { font-size: 10px; }
    .bs-link-row a { font-size: 13px; }
}

@media (max-width: 380px) {
    .bs-zone-tag { font-size: 10px; }
    .bs-link-row a { font-size: 12px; }
    .bs-search-zone button { padding: 0 5px; font-size: .68rem; }
}
