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

:root {
    --fw-purple: #7b2ff7;
    --fw-purple-dk: #5e1fd4;
    --fw-magenta: #c040e8;
    --fw-grad: linear-gradient(135deg, #7b2ff7 0%, #c040e8 100%);
    --fw-grad-lt: linear-gradient(135deg, rgba(123,47,247,.12) 0%, rgba(192,64,232,.12) 100%);
    --fw-purple-bg: #f5eeff;
    --fw-purple-lt: #e8d5ff;
    --fw-dark: #1a0840;
    --fw-dark2: #2a1060;
    --fw-text: #1a0840;
    --fw-text2: #3a2060;
    --fw-text3: #8070a8;
    --fw-surface: #ffffff;
    --fw-body: #f8f6ff;
    --fw-muted: #f0ebff;
    --fw-border: #e2d8f8;
    --fw-border2: #d0c0f0;
    --fw-sh1: 0 1px 4px rgba(123,47,247,.08);
    --fw-sh2: 0 3px 12px rgba(123,47,247,.12);
    --fw-sh3: 0 6px 24px rgba(123,47,247,.18);
    --fw-r: 6px;
    --fw-r2: 4px;
    --fw-r3: 10px;
    --fw-pill: 22px;
}

html { font-size: 15px; }

body {
    background: var(--fw-body);
    color: var(--fw-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(--fw-purple); text-decoration: none; transition: color .16s; }
a:hover { color: var(--fw-purple-dk); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.fwc::after { content: ''; display: table; clear: both; }

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

/* ===== HEADER ===== */
.fw-navbar {
    background: var(--fw-surface);
    border-bottom: 2px solid var(--fw-purple);
    padding: 10px 0;
    box-shadow: var(--fw-sh1);
}

.fw-navbar .fw-box {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

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

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

.fw-sitename {
    font-size: 1.42rem;
    font-weight: 900;
    font-style: normal;
    letter-spacing: -.5px;
    text-decoration: none;
    border-bottom: none;
    background: var(--fw-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fw-domainbadge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--fw-purple-bg);
    border: 1.5px solid var(--fw-purple-lt);
    border-radius: var(--fw-pill);
    padding: 4px 13px;
}

.fw-domainbadge .fdb-lbl {
    font-size: 0.67rem;
    color: var(--fw-purple);
    white-space: nowrap;
    font-weight: 600;
}

.fw-domainbadge .fdb-url {
    font-size: 1.07rem;
    font-weight: 800;
    color: var(--fw-purple-dk);
    white-space: nowrap;
}

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

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

.fw-navboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--fw-grad);
}

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

.fw-navrow:last-child { border-bottom: none; }

.fw-navlbl {
    background: var(--fw-dark);
    color: rgba(255,255,255,.75);
    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,.08);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

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

.fw-navlinks a:hover {
    background: var(--fw-purple-bg);
    color: var(--fw-purple);
    border-color: var(--fw-purple-lt);
}

.fw-navlinks a.active {
    background: var(--fw-grad);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}

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

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

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

.fw-searchpanel input[type="text"]:focus {
    border-color: var(--fw-purple);
    box-shadow: 0 0 0 3px rgba(123,47,247,.13);
    background: var(--fw-surface);
}

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

.fw-searchpanel button:hover { background: var(--fw-dark2); }

.fw-searchpanel button[value="1"] {
    background: var(--fw-grad);
}
.fw-searchpanel button[value="1"]:hover { background: var(--fw-purple-dk); }

.fw-searchpanel button[value="2"] {
    background: var(--fw-magenta);
}
.fw-searchpanel button[value="2"]:hover { background: var(--fw-purple); }

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

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

.fw-tagline {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.fw-tagline .fw-tglnk {
    display: inline-block;
    background: var(--fw-muted);
    color: var(--fw-text2);
    border: 1px solid var(--fw-border2);
    border-radius: var(--fw-pill);
    padding: 2px 11px;
    font-size: .76rem;
    text-decoration: none;
    transition: all .15s;
}

.fw-tagline .fw-tglnk:hover {
    background: var(--fw-purple-bg);
    color: var(--fw-purple);
    border-color: var(--fw-purple-lt);
}

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

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

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

.fw-sect-hd h3 {
    font-size: .97rem;
    font-weight: 700;
    color: var(--fw-text);
}

.fw-sect-hd h3 a { color: var(--fw-text); }
.fw-sect-hd h3 a:hover { color: var(--fw-purple); }

.fw-sect-hd h4 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--fw-text);
}

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

.fw-mediagrid li {
    border-radius: var(--fw-r);
    overflow: hidden;
    border: 1px solid var(--fw-border);
    background: var(--fw-muted);
    transition: box-shadow .18s, transform .18s;
    min-width: 0;
}

.fw-mediagrid li:hover {
    box-shadow: var(--fw-sh3);
    transform: translateY(-2px);
}

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

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

.fw-mediacover:hover img { transform: scale(1.05); }

.fw-mediatxt {
    padding: 5px 7px 7px;
    border-top: 2px solid transparent;
    transition: border-top-color .15s;
}

.fw-mediagrid li:hover .fw-mediatxt { border-top-color: var(--fw-purple); }

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

.fw-mediatxt h5 a { color: var(--fw-text); }
.fw-mediatxt h5 a:hover { color: var(--fw-purple); }

/* ===== PAGINATION ===== */
.fw-pgnav {
    margin: 12px 0 5px;
    display: flex;
    justify-content: center;
}

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

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

.fw-pgrow a.fw-pgbtn:hover {
    background: var(--fw-purple-bg);
    border-color: var(--fw-purple);
    color: var(--fw-purple);
}

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

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

.fw-flnkset {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.fw-flnkset dd { display: inline; }

.fw-flnkset a {
    display: inline-block;
    font-size: .77rem;
    color: var(--fw-text3);
    padding: 2px 9px;
    border-radius: var(--fw-pill);
    border: 1px solid var(--fw-border);
    background: var(--fw-muted);
    text-decoration: none;
    transition: all .15s;
}

.fw-flnkset a:hover { color: var(--fw-purple); border-color: var(--fw-purple); background: var(--fw-purple-bg); }

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

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

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

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

.fw-prevframe {
    display: block;
    width: 100%;
    margin-top: 10px;
}

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

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

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

.fw-opbtn:hover {
    opacity: .88;
    color: #fff;
    transform: translateY(-1px);
}

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

.fw-clihint a { color: var(--fw-dark); font-weight: 600; }
.fw-clihint a:hover { color: var(--fw-purple); }

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

.fw-sharebar .fsb-lbl { font-size: .77rem; color: var(--fw-text3); white-space: nowrap; }
.fw-sharebar .fsb-url { font-size: .79rem; color: var(--fw-text2); flex: 1; min-width: 0; word-break: break-all; }

.fw-sharebar .fsb-cpbtn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    background: var(--fw-grad);
    color: #fff;
    border: none;
    border-radius: var(--fw-pill);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    flex-shrink: 0;
}

.fw-sharebar .fsb-cpbtn:hover { opacity: .85; }

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

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

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

    .fw-sitename { font-size: 1.12rem; }
    .fw-domainbadge .fdb-url { font-size: .9rem; }

    .fw-navrow { align-items: stretch; }

    .fw-navlbl {
        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;
    }

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

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

    .fw-searchpanel form {
        flex-wrap: nowrap;
        gap: 4px;
    }

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

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

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

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

@media (min-width: 481px) and (max-width: 768px) {
    .fw-navlbl { font-size: 10px; }
    .fw-navlinks a { font-size: 13px; }
}

@media (max-width: 380px) {
    .fw-navlbl { font-size: 10px; }
    .fw-navlinks a { font-size: 12px; }
    .fw-searchpanel button { padding: 0 5px; font-size: .68rem; }
}
