/* Warm Content Platform — Tomato/Fanshu Inspired */

:root {
    --ora: #f26522;          /* tomato orange primary */
    --ora2: #e05515;         /* deeper orange */
    --ora3: #fff3ed;         /* orange tint bg */
    --ora4: #fde8da;         /* orange card tint */
    --yel: #f5a623;          /* warm yellow accent */
    --bg: #ffffff;
    --bg2: #f7f7f7;
    --bg3: #f2f2f2;
    --bg4: #ebebeb;
    --sur: #ffffff;
    --bdr: #e8e8e8;
    --bdr2: #d0d0d0;
    --txt: #1a1a1a;
    --txt2: #555555;
    --txt3: #999999;
    --wht: #ffffff;
    --shadow: 0 1px 6px rgba(0,0,0,0.08);
    --shadow2: 0 2px 12px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-sm: 5px;
    --radius-lg: 12px;
    --ease: all 0.2s ease;
    --maxw: 1060px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    background: var(--bg2);
    color: var(--txt);
    line-height: 1.55;
    font-size: 14px;
    overflow-x: hidden;
}

/* ===================== HEADER ===================== */
.tm-header {
    background: var(--bg);
    border-bottom: 1px solid var(--bdr);
    padding: 0.5rem 0;
    box-shadow: var(--shadow);
}

.tm-hd-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tm-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
    justify-content: center;
}

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

.tm-logo-lnk::before {
    content: '🍅';
    font-size: 20px;
    flex-shrink: 0;
}

.tm-site-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--ora);
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
    letter-spacing: 0.3px;
}

.tm-domain-strip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    background: var(--ora3);
    border: 1px solid rgba(242,101,34,0.3);
    border-radius: 20px;
}

.tm-domain-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--ora);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.tm-domain-val {
    font-size: 17px;
    font-weight: 700;
    color: var(--txt);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ===================== LAYOUT ===================== */
.tm-wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 14px;
}

.tm-sec {
    padding: 7px 0;
}

/* ===================== PROMO BANNER ===================== */
.tm-banner {
    margin: 5px 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tm-banner img {
    display: block;
    width: 100%;
}

/* ===================== CATEGORY NAV ===================== */
.tm-catbox {
    background: var(--sur);
    border: 1px solid var(--bdr);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 7px;
    box-shadow: var(--shadow);
}

.tm-catrow {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--bdr);
}

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

.tm-zone-tag {
    width: 10%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--ora);
    padding: 9px 4px;
    border-right: 1px solid var(--bdr);
    background: var(--ora3);
    white-space: nowrap;
}

.tm-zone-items {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 8px;
    align-items: center;
}

.tm-zone-items a {
    display: inline-block;
    color: var(--txt2);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--bdr);
    background: var(--bg2);
    font-size: 13px;
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    transition: var(--ease);
}

.tm-zone-items a:hover,
.tm-zone-items a.active {
    background: var(--ora);
    color: var(--wht);
    border-color: var(--ora);
    box-shadow: 0 2px 8px rgba(242,101,34,0.25);
    font-weight: 600;
}

/* ===================== SEARCH ===================== */
.tm-srch {
    background: var(--sur);
    border: 1px solid var(--bdr);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 7px;
    box-shadow: var(--shadow);
}

.tm-srch form {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
}

.tm-srch input[type="text"] {
    flex: 1;
    min-width: 80px;
    padding: 9px 13px;
    border: 1px solid var(--bdr2);
    border-radius: var(--radius-sm);
    background: var(--bg2);
    color: var(--txt);
    font-size: 14px;
    outline: none;
    transition: var(--ease);
}

.tm-srch input[type="text"]:focus {
    border-color: var(--ora);
    background: var(--bg);
    box-shadow: 0 0 0 3px rgba(242,101,34,0.1);
}

.tm-srch input[type="text"]::placeholder { color: var(--txt3); }

.tm-srch button {
    padding: 9px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--ora);
    color: var(--wht);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.tm-srch button:hover {
    background: var(--ora2);
    box-shadow: 0 3px 10px rgba(242,101,34,0.3);
    transform: translateY(-1px);
}

.tm-srch button:active { transform: translateY(0); }

/* ===================== TAG CLOUD ===================== */
.tm-tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px 12px;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    margin-bottom: 7px;
    box-shadow: var(--shadow);
}

.tm-tagcloud a {
    padding: 4px 12px;
    background: var(--bg2);
    border-radius: 20px;
    color: var(--txt2);
    text-decoration: none;
    font-size: 12px;
    border: 1px solid var(--bdr);
    transition: var(--ease);
}

.tm-tagcloud a:hover {
    background: var(--ora);
    color: var(--wht);
    border-color: var(--ora);
}

/* ===================== SECTION BLOCKS ===================== */
.tm-blk { margin-bottom: 12px; }

.tm-blk-hd {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bdr);
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tm-blk-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--ora);
    border-radius: 2px;
}

.tm-blk-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--txt);
}

.tm-blk-title a {
    color: var(--txt);
    text-decoration: none;
    transition: var(--ease);
}

.tm-blk-title a:hover { color: var(--ora); }

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

.tm-filmgrid li {
    animation: tmSlideUp 0.4s ease backwards;
    background: var(--sur);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--bdr);
    transition: var(--ease);
}

.tm-filmgrid li:hover {
    box-shadow: var(--shadow2);
    transform: translateY(-2px);
    border-color: var(--bdr2);
}

.tm-filmgrid li:nth-child(1) { animation-delay: 0.03s; }
.tm-filmgrid li:nth-child(2) { animation-delay: 0.06s; }
.tm-filmgrid li:nth-child(3) { animation-delay: 0.09s; }
.tm-filmgrid li:nth-child(4) { animation-delay: 0.12s; }
.tm-filmgrid li:nth-child(5) { animation-delay: 0.15s; }
.tm-filmgrid li:nth-child(6) { animation-delay: 0.18s; }
.tm-filmgrid li:nth-child(7) { animation-delay: 0.21s; }
.tm-filmgrid li:nth-child(8) { animation-delay: 0.24s; }

@keyframes tmSlideUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tm-poster {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 12 / 7;
    background: var(--bg3);
}

.tm-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tm-poster:hover img { transform: scale(1.06); }

.tm-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.tm-poster:hover::after { opacity: 1; }

.tm-card-foot {
    padding: 7px 8px;
}

.tm-card-foot h5 {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--txt2);
}

.tm-card-foot h5 a {
    color: var(--txt2);
    text-decoration: none;
    transition: var(--ease);
}

.tm-card-foot h5 a:hover { color: var(--ora); }

/* ===================== DETAIL ===================== */
.tm-detail-bar {
    line-height: 1.8;
    text-align: center;
    padding: 15px 18px;
    font-size: 16px;
    margin: 8px 0;
    word-break: break-all;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    border-left: 3px solid var(--ora);
    box-shadow: var(--shadow);
}

.tm-detail-bar a {
    color: var(--ora);
    text-decoration: none;
    font-weight: 700;
    margin-right: 7px;
}

.tm-info-panel {
    font-size: 14px;
    line-height: 1.9;
    padding: 18px 20px;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    margin: 7px 0;
    box-shadow: var(--shadow);
    color: var(--txt2);
}

.tm-preview-box { margin-top: 12px; }

.tm-preview-box picture { display: block; width: 100%; }

.tm-preview-box picture img,
.tm-preview-box img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--bdr);
}

/* ===================== ACTION BUTTONS ===================== */
.tm-btnrow {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 14px 8px;
    margin: 7px 0;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    flex-wrap: wrap;
    box-shadow: var(--shadow);
}

.tm-act-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--ora);
    color: var(--wht);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--ease);
    box-shadow: 0 3px 10px rgba(242,101,34,0.25);
}

.tm-act-btn:hover {
    background: var(--ora2);
    box-shadow: 0 5px 16px rgba(242,101,34,0.35);
    transform: translateY(-1px);
    color: var(--wht);
}

.tm-act-btn:active { transform: translateY(0); }

/* ===================== SHARE ===================== */
.tm-share {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    margin: 7px 0;
    flex-wrap: nowrap;
    box-shadow: var(--shadow);
}

.tm-share-url-box {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
    background: var(--bg2);
    border-radius: var(--radius-sm);
    padding: 7px 11px;
    border: 1px solid var(--bdr);
    overflow: hidden;
}

.tm-share-lbl {
    font-size: 11px;
    color: var(--txt3);
    white-space: nowrap;
    font-weight: 600;
}

.tm-share-url {
    font-size: 12px;
    color: var(--ora);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.tm-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    background: var(--ora);
    color: var(--wht);
    border: none;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
}

.tm-share-btn:hover {
    background: var(--ora2);
    box-shadow: 0 3px 10px rgba(242,101,34,0.25);
}

.tm-share-ico { font-size: 14px; }

/* ===================== FRIENDLY LINKS ===================== */
.tm-flinks {
    padding: 10px 12px;
    background: var(--sur);
    border-radius: var(--radius);
    border: 1px solid var(--bdr);
    box-shadow: var(--shadow);
}

.tm-flinks dl { margin: 0; }

.tm-flinks dd { display: inline-block; margin: 3px 4px; }

.tm-flinks a { color: var(--txt3); text-decoration: none; transition: var(--ease); font-size: 13px; }

.tm-flinks a:hover { color: var(--ora); }

/* ===================== PAGINATION ===================== */
.tm-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 14px 0;
    align-items: center;
    justify-content: center;
}

.tm-pgbtn,
.tm-pgcur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
    text-decoration: none;
}

.tm-pgbtn {
    background: var(--sur);
    color: var(--txt2);
    border: 1px solid var(--bdr);
}

.tm-pgbtn:hover {
    background: var(--ora);
    border-color: var(--ora);
    color: var(--wht);
}

.tm-pgcur {
    background: var(--ora);
    color: var(--wht);
    border: 1px solid var(--ora);
    cursor: default;
    font-weight: 700;
}

/* ===================== FOOTER ===================== */
.tm-footer {
    padding: 18px 0;
    text-align: center;
    border-top: 1px solid var(--bdr);
    margin-top: 18px;
    background: var(--sur);
}

.tm-footer p { margin: 6px 0; color: var(--txt3); font-size: 13px; }

.tm-footer a { color: var(--txt3); text-decoration: none; transition: var(--ease); }

.tm-footer a:hover { color: var(--ora); }

/* ===================== UTILITIES ===================== */
.tm-clear::after { content:""; display:table; clear:both; }

.hide-desk { display: block; }
.hide-mob2  { display: block; }

img[data-original] { background: var(--bg3); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .tm-wrap { padding: 0 8px; }
    .tm-header { padding: 0.45rem 0; }
    .tm-brand { gap: 10px; }
    .tm-site-name { font-size: 18px; }
    .tm-domain-val { font-size: 15px; }
    .tm-domain-tag { font-size: 10px; }
    .tm-sec { padding: 5px 0; }

    /* Cat nav mobile: label 15%, links 85%, 4 per row (2 rows) */
    .tm-catrow { flex-wrap: nowrap; }
    .tm-zone-tag {
        width: 15%;
        font-size: 10px;
        padding: 7px 2px;
        letter-spacing: 0;
    }
    .tm-zone-items {
        width: 85%;
        gap: 4px;
        padding: 7px 4px;
    }
    .tm-zone-items a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
    }

    /* Film grid: 2 per row on mobile */
    .tm-filmgrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .tm-card-foot h5 { font-size: 12px; }

    .tm-blk { margin-bottom: 10px; }
    .tm-blk-title { font-size: 16px; }

    .tm-tagcloud { padding: 8px 10px; gap: 5px; }
    .tm-tagcloud a { padding: 4px 10px; font-size: 12px; }

    .tm-srch { padding: 8px 10px; }
    .tm-srch form { gap: 5px; flex-wrap: nowrap; }
    .tm-srch input[type="text"] { min-width: 60px; font-size: 13px; padding: 8px 10px; }
    .tm-srch button { padding: 8px 10px; font-size: 12px; }

    .tm-btnrow { padding: 11px 6px; gap: 8px; }
    .tm-act-btn { padding: 10px 18px; font-size: 13px; }

    .tm-share { padding: 9px 10px; gap: 6px; }
    .tm-share-url-box { padding: 7px 9px; }
    .tm-share-btn { padding: 8px 12px; font-size: 12px; }

    .tm-pager { padding: 10px 0; gap: 4px; }
    .tm-pgbtn, .tm-pgcur { padding: 6px 11px; font-size: 12px; min-width: 32px; }

    .tm-footer { padding: 14px 0; margin-top: 14px; }

    .hide-desk { display: none !important; }
}

@media (max-width: 480px) {
    .tm-site-name { font-size: 16px; }
    .tm-domain-val { font-size: 14px; }
    .tm-domain-strip { padding: 3px 10px; gap: 5px; }
    .tm-logo-lnk::before { font-size: 17px; }

    .tm-zone-tag { width: 15%; font-size: 10px; padding: 6px 2px; }
    .tm-zone-items { width: 85%; gap: 3px; padding: 6px 3px; }
    .tm-zone-items a { font-size: 12px; padding: 3px 1px; width: calc((100% - 9px) / 4); }

    .tm-filmgrid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
    .tm-card-foot h5 { font-size: 11px; }
    .tm-blk-title { font-size: 14px; }

    .tm-srch input[type="text"] { font-size: 12px; padding: 7px 8px; }
    .tm-srch button { padding: 7px 8px; font-size: 11px; }

    .tm-act-btn { padding: 9px 15px; font-size: 12px; }
    .tm-detail-bar { font-size: 14px; padding: 12px 14px; }
    .tm-info-panel { padding: 14px 16px; font-size: 13px; }
}

@media (min-width: 769px) {
    .hide-mob2 { display: none !important; }
    .tm-filmgrid { grid-template-columns: repeat(4, 1fr); }
}
