/* Film Portal — Gradient SaaS Theme (Upsellit-inspired) */

:root {
    /* gradient core */
    --up-pink:       #d63da8;
    --up-purple:     #7b3fb5;
    --up-blue:       #4169e1;
    --grad-hero:     linear-gradient(135deg, #d63da8 0%, #9b3db8 50%, #7b3fb5 100%);
    --grad-btn:      linear-gradient(90deg, #4169e1 0%, #7b3fb5 100%);
    --grad-btn-h:    linear-gradient(90deg, #3355c8 0%, #6930a0 100%);
    --grad-accent:   linear-gradient(135deg, #d63da8 0%, #7b3fb5 100%);
    --grad-soft:     linear-gradient(135deg, rgba(214,61,168,0.07) 0%, rgba(123,63,181,0.07) 100%);

    /* neutral */
    --bg-root:       #ffffff;
    --bg-section:    #f8f7fc;
    --bg-card:       #ffffff;
    --bg-input:      #f4f3f9;
    --bg-muted:      #eeecf7;

    --ink-dark:      #1a1040;
    --ink-mid:       #3a2d6a;
    --ink-soft:      #7068a0;
    --ink-faint:     #b0a8d0;

    --line:          #e6e2f4;
    --line-mid:      #d4ceee;

    --radius-xs:     4px;
    --radius-sm:     8px;
    --radius-md:     14px;
    --radius-lg:     20px;
    --radius-xl:     28px;
    --radius-pill:   50px;

    --shadow-xs:     0 1px 4px rgba(123,63,181,0.07);
    --shadow-sm:     0 2px 10px rgba(123,63,181,0.1);
    --shadow-md:     0 4px 20px rgba(123,63,181,0.14);
    --shadow-lg:     0 8px 32px rgba(123,63,181,0.18);
    --shadow-card:   0 2px 16px rgba(123,63,181,0.09);

    --ease: all 0.22s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-root);
    color: var(--ink-dark);
    line-height: 1.55;
    font-size: 15px;
    overflow-x: hidden;
}

/* ===================== HEADER ===================== */
.up-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
    padding: 0.65rem 0;
    box-shadow: var(--shadow-xs);
}

.up-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.up-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.up-logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--ease);
}

.up-logo-link:hover { opacity: 0.85; }

.up-site-name {
    font-size: 26px;
    font-weight: 900;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
}

.up-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: var(--grad-btn);
    border-radius: var(--radius-pill);
    transition: var(--ease);
    border: none;
    box-shadow: 0 2px 10px rgba(65,105,225,0.22);
}

.up-domain-badge:hover {
    background: var(--grad-btn-h);
    box-shadow: 0 4px 16px rgba(65,105,225,0.32);
    transform: translateY(-1px);
}

.up-domain-tag {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.82);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.up-domain-url {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: -0.1px;
}

/* ===================== LAYOUT ===================== */
.up-wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.up-row {
    padding: 8px 0;
}

/* ===================== BANNER ===================== */
.up-banner {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin: 2px 0;
    border: 1px solid var(--line);
}

.up-banner a { display: block; line-height: 0; }
.up-banner img { width: 100%; display: block; border-radius: var(--radius-md); }

/* ===================== NAV ===================== */
.up-navbox {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.up-navline {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
}

.up-navline:last-child { border-bottom: none; }

.up-navzone {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: var(--grad-accent);
    width: 10%;
    min-width: 52px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    flex-shrink: 0;
    border-right: none;
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.up-navitems {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px 10px;
    align-items: center;
    background: var(--bg-card);
}

.up-navitems a {
    display: inline-block;
    color: var(--ink-mid);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-sm);
    transition: var(--ease);
    background: var(--bg-input);
    border: 1px solid var(--line);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 42px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 13px;
    font-weight: 500;
}

.up-navitems a:hover {
    background: var(--grad-btn);
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(123,63,181,0.2);
}

.up-navitems a.active {
    background: var(--grad-btn);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(123,63,181,0.2);
}

/* ===================== SEARCH ===================== */
.up-searchbar {
    background: var(--bg-section);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.up-searchbar form {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.up-searchbar input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 10px 16px;
    border: 1.5px solid var(--line-mid);
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    color: var(--ink-dark);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
    font-family: inherit;
}

.up-searchbar input[type="text"]:focus {
    border-color: var(--up-purple);
    box-shadow: 0 0 0 3px rgba(123,63,181,0.1);
}

.up-searchbar input[type="text"]::placeholder { color: var(--ink-faint); }

.up-searchbar button {
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--grad-btn);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(65,105,225,0.2);
}

.up-searchbar button:hover {
    background: var(--grad-btn-h);
    box-shadow: 0 4px 14px rgba(65,105,225,0.3);
    transform: translateY(-1px);
}

/* ===================== TAG CLOUDS ===================== */
.up-tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 11px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.up-tagchip {
    padding: 4px 14px;
    background: var(--bg-muted);
    border-radius: var(--radius-pill);
    color: var(--ink-mid);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--ease);
    border: 1px solid var(--line-mid);
}

.up-tagchip:hover {
    background: var(--grad-btn);
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(123,63,181,0.18);
}

/* ===================== SECTIONS ===================== */
.up-panel {
    margin-bottom: 14px;
}

.up-panel-hd {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--line);
    position: relative;
    display: flex;
    align-items: center;
}

.up-panel-hd::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 0;
    width: 44px;
    height: 3px;
    background: var(--grad-accent);
    border-radius: 3px;
}

.up-panel-title {
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    color: var(--ink-dark);
    letter-spacing: -0.3px;
}

.up-panel-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--ease);
}

.up-panel-title a:hover {
    background: var(--grad-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.up-grid li {
    animation: up-pop 0.42s ease backwards;
}

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

@keyframes up-pop {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.up-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    aspect-ratio: 600 / 350;
    background: var(--bg-muted);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    transition: var(--ease);
}

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

.up-thumb:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}

.up-thumb:hover img { transform: scale(1.07); }

.up-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-hero);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--radius-md);
    mix-blend-mode: multiply;
}

.up-thumb:hover::after { opacity: 0.45; }

.up-captext {
    padding: 7px 0 0;
}

.up-captext h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--ink-mid);
}

.up-captext h5 a {
    color: inherit;
    text-decoration: none;
    transition: var(--ease);
}

.up-captext h5 a:hover { color: var(--up-purple); }

/* ===================== DETAIL PANELS ===================== */
.up-title-strip {
    line-height: 1.8;
    text-align: center;
    padding: 16px 20px;
    font-size: 16px;
    margin: 12px 0;
    word-break: break-all;
    background: var(--grad-soft);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--line-mid);
    position: relative;
    overflow: hidden;
}

.up-title-strip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-accent);
}

.up-title-strip a {
    color: var(--up-purple);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
}

.up-detail-card {
    font-size: 15px;
    line-height: 1.9;
    padding: 20px 22px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin: 10px 0;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    color: var(--ink-mid);
}

.up-preview-wrap {
    margin-top: 12px;
}

.up-preview-wrap picture {
    display: block;
    width: 100%;
}

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

/* ===================== ACTION BUTTONS ===================== */
.up-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 12px;
    margin: 10px 0;
    background: var(--grad-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.up-btn {
    display: inline-block;
    padding: 11px 26px;
    background: var(--grad-btn);
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: var(--ease);
    box-shadow: 0 3px 12px rgba(65,105,225,0.24);
    letter-spacing: 0.02em;
    font-family: inherit;
}

.up-btn:hover {
    background: var(--grad-btn-h);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(65,105,225,0.32);
}

/* ===================== CLIENT LINKS ===================== */
.up-client-pc,
.up-client-mb {
    text-align: center;
    padding: 14px;
}

.up-client-pc a,
.up-client-mb a {
    color: var(--up-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--ease);
}

.up-client-pc a:hover,
.up-client-mb a:hover { color: var(--up-purple); }

/* ===================== SHARE ===================== */
.up-sharebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin: 10px 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    flex-wrap: nowrap;
}

.share-url-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-mid);
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.share-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--up-purple);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-url {
    font-size: 12px;
    color: var(--ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
    font-family: 'Courier New', monospace;
}

.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 16px;
    background: var(--grad-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(214,61,168,0.22);
}

.share-copy-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(214,61,168,0.32);
}

.share-icon { font-size: 15px; line-height: 1; }

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

.up-pager-a,
.up-pager-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
    text-decoration: none;
}

.up-pager-a {
    background: var(--bg-card);
    color: var(--ink-mid);
    border: 1.5px solid var(--line-mid);
}

.up-pager-a:hover {
    background: var(--grad-btn);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px rgba(123,63,181,0.18);
}

.up-pager-cur {
    background: var(--grad-btn);
    color: #fff;
    border: 1.5px solid transparent;
    cursor: default;
    box-shadow: 0 3px 10px rgba(123,63,181,0.2);
}

/* ===================== FOOTER ===================== */
.up-extlinks {
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.up-extlinks dl { margin: 0; }

.up-extlinks dd {
    display: inline-block;
    margin: 4px;
}

.up-extlinks a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
}

.up-extlinks a:hover { color: var(--up-purple); }

.pd5 { padding: 3px 6px; }

.up-footer {
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--line);
    margin-top: 16px;
    background: var(--bg-section);
}

.up-footer p {
    margin: 5px 0;
    color: var(--ink-soft);
    font-size: 13px;
}

.up-footer a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: var(--ease);
}

.up-footer a:hover { color: var(--up-purple); }

/* ===================== UTILS ===================== */
.clearfix::after { content: ""; display: table; clear: both; }

.vis-pc { display: block; }
.vis-mb { display: block; }

@media (max-width: 768px) { .vis-pc { display: none !important; } }
@media (min-width: 769px) { .vis-mb { display: none !important; } }

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

/* ===================== RESPONSIVE ===================== */

@media (max-width: 768px) {
    .up-wrap  { padding: 0 8px; }

    .up-header { padding: 0.5rem 0; }
    .up-brand  { gap: 10px; }

    .up-site-name    { font-size: 20px; }
    .up-domain-badge { padding: 5px 12px; gap: 6px; }
    .up-domain-tag   { font-size: 10px; }
    .up-domain-url   { font-size: 16px; }

    .up-row { padding: 6px 0; }

    /* Mobile nav: zone 15% / links 85% / 2×4 grid */
    .up-navzone {
        width: 15%;
        font-size: 10px;
        padding: 8px 2px;
        white-space: normal;
        word-break: break-all;
        overflow: visible;
    }

    .up-navitems {
        width: 85%;
        gap: 4px;
        padding: 8px 5px;
    }

    .up-navitems a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .up-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .up-panel-title { font-size: 17px; }
    .up-captext h5  { font-size: 12px; }

    .up-searchbar { padding: 10px; }
    .up-searchbar form { gap: 6px; }
    .up-searchbar input[type="text"] { min-width: 90px; padding: 9px 12px; font-size: 13px; }
    .up-searchbar button { padding: 9px 10px; font-size: 12px; }

    .up-tagcloud { padding: 9px 10px; gap: 6px; }
    .up-tagchip  { padding: 4px 11px; font-size: 12px; }

    .up-actions { padding: 12px 8px; gap: 8px; }
    .up-btn     { padding: 9px 18px; font-size: 13px; }

    .up-sharebar       { padding: 10px; gap: 8px; margin: 8px 0; }
    .share-url-display { padding: 8px 10px; gap: 6px; }
    .share-label       { font-size: 10px; }
    .share-url         { font-size: 10px; }
    .share-copy-btn    { padding: 8px 11px; font-size: 12px; }
    .share-icon        { font-size: 14px; }

    .up-pager-a,
    .up-pager-cur { padding: 6px 11px; font-size: 12px; min-width: 30px; }

    .up-panel { margin-bottom: 10px; }

    .up-title-strip { padding: 13px 14px; font-size: 14px; margin: 10px 0; }
    .up-detail-card { padding: 14px 13px; font-size: 14px; margin: 8px 0; }
}

@media (max-width: 480px) {
    .up-header { padding: 0.4rem 0; }

    .up-site-name    { font-size: 18px; }
    .up-domain-badge { padding: 4px 10px; }
    .up-domain-tag   { font-size: 9px; }
    .up-domain-url   { font-size: 15px; }

    .up-navzone {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

    .up-navitems {
        width: 85%;
        gap: 3px;
        padding: 6px 4px;
    }

    .up-navitems a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }

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

    .up-searchbar input[type="text"] { min-width: 70px; padding: 8px 9px; font-size: 12px; }
    .up-searchbar button { padding: 8px 8px; font-size: 11px; }

    .up-panel-title { font-size: 15px; }
    .up-btn { padding: 8px 14px; font-size: 12px; }

    .up-sharebar    { padding: 8px; gap: 6px; }
    .share-copy-btn { padding: 7px 10px; font-size: 11px; }
}

@media (min-width: 769px) {
    .up-grid     { grid-template-columns: repeat(4, 1fr); }
    .up-navzone  { font-size: 14px; }
    .up-navitems a { font-size: 13px; }
}
