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

:root {
    /* Warm orange palette */
    --og:           #f97316;
    --og-dk:        #ea6010;
    --og-lt:        #fb923c;
    --og-pale:      #fff7ed;
    --og-soft:      #fed7aa;
    --og-bg:        rgba(249,115,22,.09);
    --og-bdr:       rgba(249,115,22,.22);
    /* Page surfaces */
    --pg-bg:        #f7f7f7;
    --surface:      #ffffff;
    --surface-off:  #fafafa;
    --surface-warm: #fffbf8;
    --surface-mute: #f0f0f0;
    /* Text */
    --txt:          #1a1a1a;
    --txt2:         #333333;
    --txt3:         #666666;
    --txt4:         #aaaaaa;
    --txt-og:       #c05010;
    /* Borders */
    --line:         #e8e8e8;
    --line2:        #d8d8d8;
    --line-warm:    #f0e0d0;
    /* Shadows */
    --shd-xs:       0 1px 3px rgba(0,0,0,.06);
    --shd-sm:       0 2px 8px rgba(0,0,0,.08);
    --shd-md:       0 4px 16px rgba(0,0,0,.10);
    --shd-og:       0 3px 12px rgba(249,115,22,.20);
    /* Radii */
    --r:            6px;
    --rsm:          4px;
    --rlg:          10px;
}

html { font-size: 15px; }

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

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

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

/* ===== SITE HEADER ===== */
.ft-header {
    background: var(--surface);
    border-bottom: 2px solid var(--og);
    padding: 0;
    box-shadow: var(--shd-xs);
}

.ft-header .ft-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    height: 50px;
}

.ft-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-right: 16px;
    border-right: 1px solid var(--line);
    height: 100%;
}

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

/* Tomato icon decoration */
.ft-logo-lk::before {
    content: '🍅';
    font-size: 1.2rem;
    line-height: 1;
}

.ft-sitename {
    font-size: 1.26rem;
    font-weight: 800;
    color: var(--txt);
    font-style: normal;
    letter-spacing: -.2px;
    text-decoration: none;
    border-bottom: none;
}

.ft-sitename em {
    color: var(--og);
    font-style: normal;
}

.ft-domain-card {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--og-pale);
    border: 1px solid var(--og-bdr);
    border-radius: var(--r);
    padding: 4px 12px;
    margin-left: 12px;
}

.ft-domain-card .dc-lbl {
    font-size: 0.65rem;
    color: var(--txt3);
    white-space: nowrap;
    letter-spacing: .3px;
}

.ft-domain-card .dc-url {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--og);
    white-space: nowrap;
}

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

/* ===== CATEGORY NAV ===== */
.ft-nav-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    margin: 4px 0;
    box-shadow: var(--shd-xs);
}

.ft-nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
    min-height: 38px;
}

.ft-nav-row:last-child { border-bottom: none; }

.ft-zone-nm {
    background: var(--og);
    color: #ffffff;
    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,.2);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

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

.ft-cat-links a {
    font-size: .82rem;
    color: var(--txt2);
    padding: 3px 5px;
    border-radius: var(--rsm);
    transition: all .17s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.ft-cat-links a:hover {
    background: var(--og-bg);
    color: var(--og);
    border-color: var(--og-bdr);
}

.ft-cat-links a.active {
    background: var(--og);
    color: #fff;
    border-color: var(--og-dk);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.ft-search {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 8px 12px;
    margin: 4px 0;
    box-shadow: var(--shd-xs);
}

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

.ft-search input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 1.5px solid var(--line2);
    border-radius: 18px;
    padding: 0 14px;
    font-size: .87rem;
    color: var(--txt);
    background: var(--surface-off);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.ft-search input[type="text"]::placeholder { color: var(--txt4); }

.ft-search input[type="text"]:focus {
    border-color: var(--og);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(249,115,22,.10);
}

.ft-search button {
    height: 36px;
    padding: 0 12px;
    border: 1.5px solid var(--line2);
    border-radius: 18px;
    background: var(--surface);
    color: var(--txt2);
    font-size: .81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .17s;
    flex-shrink: 0;
}

.ft-search button:hover {
    border-color: var(--og);
    color: var(--og);
    background: var(--og-pale);
}

.ft-search button[value="1"] {
    background: var(--og);
    color: #fff;
    border-color: var(--og-dk);
    font-weight: 700;
    box-shadow: var(--shd-og);
}

.ft-search button[value="1"]:hover {
    background: var(--og-dk);
}

.ft-search button[value="2"] {
    background: var(--surface-warm);
    color: var(--txt-og);
    border-color: var(--og-bdr);
}

.ft-search button[value="2"]:hover {
    background: var(--og-pale);
    color: var(--og);
}

/* ===== HOT TAGS ===== */
.ft-hotbox {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 4px 0;
    box-shadow: var(--shd-xs);
}

.ft-hotbox h4 {
    font-size: .78rem;
    font-weight: 700;
    color: var(--og);
    margin-bottom: 5px;
}

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

.ft-tags .ft-tag {
    display: inline-block;
    background: var(--surface-off);
    color: var(--txt2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 2px 10px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .17s;
}

.ft-tags .ft-tag:hover {
    background: var(--og-pale);
    color: var(--og);
    border-color: var(--og-bdr);
}

/* ===== CONTENT SECTION ===== */
.ft-sect {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--rlg);
    padding: 13px 13px 10px;
    margin: 5px 0;
    box-shadow: var(--shd-xs);
}

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

.ft-sect-hd::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 8px;
    width: 3px;
    background: var(--og);
    border-radius: 2px;
    margin-bottom: 0;
}

.ft-sect-hd h3 {
    font-size: .97rem;
    font-weight: 800;
    color: var(--txt);
    padding-left: 10px;
}

.ft-sect-hd h3 a { color: var(--txt); }
.ft-sect-hd h3 a:hover { color: var(--og); }

.ft-sect-hd h4 {
    font-size: .94rem;
    font-weight: 800;
    color: var(--txt);
    padding-left: 10px;
}

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

.ft-grid li {
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-off);
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.ft-grid li:hover {
    box-shadow: var(--shd-md);
    transform: translateY(-2px);
    border-color: var(--og-soft);
}

.ft-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--surface-mute);
}

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

.ft-thumb:hover img { transform: scale(1.05); }

.ft-cap {
    padding: 5px 7px 7px;
    background: var(--surface);
}

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

.ft-cap h5 a { color: var(--txt2); }
.ft-cap h5 a:hover { color: var(--og); }

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

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

.ft-pgrow a.fpb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--surface);
    border: 1px solid var(--line2);
    border-radius: 17px;
    font-size: .83rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .17s;
}

.ft-pgrow a.fpb:hover {
    background: var(--og);
    border-color: var(--og-dk);
    color: #fff;
    box-shadow: var(--shd-og);
}

.ft-pgrow a.fpb-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    background: var(--og);
    border: 1px solid var(--og-dk);
    border-radius: 17px;
    font-size: .83rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
    box-shadow: var(--shd-og);
}

/* ===== FOOTER LINKS ===== */
.ft-flink-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 9px 13px;
    margin: 5px 0;
    box-shadow: var(--shd-xs);
}

.ft-flinks {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ft-flinks dd { display: inline; }

.ft-flinks a {
    display: inline-block;
    font-size: .76rem;
    color: var(--txt3);
    padding: 2px 9px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface-off);
    text-decoration: none;
    transition: all .17s;
}

.ft-flinks a:hover {
    color: var(--og);
    border-color: var(--og-bdr);
    background: var(--og-pale);
}

.ft-cr {
    text-align: center;
    padding: 7px 0 13px;
    color: var(--txt4);
    font-size: .75rem;
}

/* ===== DETAIL PAGES ===== */
.ft-dtl-title {
    line-height: 1.8;
    text-align: center;
    padding: 12px 14px;
    font-size: .97rem;
    margin: 5px 0;
    word-break: break-all;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--og);
    border-radius: var(--r);
    box-shadow: var(--shd-xs);
    color: var(--txt);
}

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

.ft-dtl-info {
    font-size: .89rem;
    line-height: 1.95;
    padding: 14px 17px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shd-xs);
    margin: 5px 0;
    color: var(--txt2);
}

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

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

/* ===== ACTION BUTTONS ===== */
.ft-btnrow {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.ft-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    background: var(--og);
    color: #fff;
    border: 1.5px solid var(--og-dk);
    border-radius: 20px;
    font-size: .89rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .14s, box-shadow .2s;
    text-decoration: none;
    box-shadow: var(--shd-og);
}

.ft-btn:hover {
    background: var(--og-dk);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(249,115,22,.32);
}

.ft-cli-tip {
    text-align: center;
    padding: 6px;
    font-size: .81rem;
}

.ft-cli-tip a { color: var(--og); font-weight: 600; }
.ft-cli-tip a:hover { color: var(--og-dk); }

/* ===== SHARE BAR ===== */
.ft-sharebar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--og-pale);
    border: 1px solid var(--og-bdr);
    border-radius: var(--r);
    padding: 7px 12px;
    margin: 5px 0;
    flex-wrap: wrap;
}

.ft-sharebar .fsb-lbl { font-size: .76rem; color: var(--txt3); white-space: nowrap; }
.ft-sharebar .fsb-url { font-size: .78rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

.ft-sharebar .fsb-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    background: var(--og);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: .79rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .17s;
    flex-shrink: 0;
    box-shadow: var(--shd-og);
}

.ft-sharebar .fsb-btn:hover { background: var(--og-dk); }

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

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

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

    .ft-sitename { font-size: 1.04rem; }
    .ft-domain-card .dc-url { font-size: .9rem; }

    .ft-nav-row { align-items: stretch; }

    .ft-zone-nm {
        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;
    }

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

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

    /* Search: single row no wrap */
    .ft-search form {
        flex-wrap: nowrap;
        gap: 3px;
    }

    .ft-search input[type="text"] {
        height: 34px;
        font-size: .77rem;
        padding: 0 8px;
        border-radius: 17px;
    }

    .ft-search button {
        height: 34px;
        padding: 0 6px;
        font-size: .72rem;
        border-radius: 17px;
    }

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

    .ft-thumb { aspect-ratio: 600 / 350; }
    .ft-cap h5 { font-size: .71rem; }
    .ft-sect { padding: 9px 9px 7px; }
    .ft-btn { padding: 9px 14px; font-size: .83rem; }
}

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

@media (max-width: 380px) {
    .ft-zone-nm { font-size: 10px; }
    .ft-cat-links a { font-size: 12px; }
    .ft-search button { padding: 0 4px; font-size: .66rem; }
}
