/* Film Portal — Sports Media Theme (Red Bull-inspired) */

:root {
    --rb-red:        #d0021b;
    --rb-red-dark:   #a80016;
    --rb-red-dim:    rgba(208,2,27,0.1);
    --rb-yellow:     #ffd700;
    --rb-yellow-dim: rgba(255,215,0,0.12);

    --rb-black:      #0a0a0a;
    --rb-dark:       #111111;
    --rb-charcoal:   #1a1a1a;
    --rb-panel:      #212121;

    --bg-root:       #f5f5f5;
    --bg-card:       #ffffff;
    --bg-section:    #f0f0f0;
    --bg-input:      #ebebeb;
    --bg-muted:      #e3e3e3;

    --ink-dark:      #111111;
    --ink-mid:       #2d2d2d;
    --ink-soft:      #5a5a5a;
    --ink-faint:     #999999;
    --ink-white:     #ffffff;
    --ink-off:       rgba(255,255,255,0.82);

    --line:          #dedede;
    --line-mid:      #cccccc;

    --radius-xs:     2px;
    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --radius-pill:   50px;

    --shadow-xs:     0 1px 4px rgba(0,0,0,0.08);
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.11);
    --shadow-md:     0 4px 16px rgba(0,0,0,0.14);
    --shadow-lg:     0 8px 30px rgba(0,0,0,0.2);
    --shadow-card:   0 2px 12px rgba(0,0,0,0.09);

    --ease: all 0.2s 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 ===================== */
.rb-header {
    background: var(--rb-black);
    padding: 0;
}

.rb-header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.6rem 14px;
    max-width: 1060px;
    margin: 0 auto;
}

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

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

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

.rb-site-name {
    font-size: 26px;
    font-weight: 900;
    color: var(--ink-white);
    letter-spacing: -0.3px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
}

.rb-site-name em {
    color: var(--rb-red);
    font-style: normal;
}

.rb-domain-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: var(--rb-red);
    border-radius: var(--radius-pill);
    transition: var(--ease);
    border: none;
    box-shadow: 0 2px 12px rgba(208,2,27,0.3);
}

.rb-domain-pill:hover {
    background: var(--rb-red-dark);
    box-shadow: 0 4px 18px rgba(208,2,27,0.42);
    transform: translateY(-1px);
}

.rb-domain-tag {
    font-size: 10px;
    font-weight: 800;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.28);
    padding-right: 8px;
}

.rb-domain-url {
    font-size: 18px;
    font-weight: 900;
    color: var(--ink-white);
    white-space: nowrap;
    letter-spacing: -0.1px;
}

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

.rb-zone {
    padding: 8px 0;
}

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

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

/* ===================== NAV ===================== */
.rb-nav-panel {
    background: var(--rb-charcoal);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 8px;
    border: none;
    box-shadow: var(--shadow-sm);
}

.rb-nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

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

.rb-nav-zone {
    font-size: 14px;
    font-weight: 900;
    color: var(--rb-yellow);
    background: var(--rb-dark);
    width: 10%;
    min-width: 52px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    flex-shrink: 0;
    border-right: 2px solid var(--rb-red);
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.rb-nav-links {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 9px;
    align-items: center;
    background: var(--rb-charcoal);
}

.rb-nav-links a {
    display: inline-block;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--radius-sm);
    transition: var(--ease);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 42px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 13px;
    font-weight: 600;
}

.rb-nav-links a:hover {
    background: var(--rb-red);
    color: #fff;
    border-color: var(--rb-red);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(208,2,27,0.3);
}

.rb-nav-links a.active {
    background: var(--rb-red);
    color: #fff;
    border-color: var(--rb-red);
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(208,2,27,0.3);
}

/* ===================== SEARCH ===================== */
.rb-searchbox {
    background: var(--rb-panel);
    border-radius: var(--radius-md);
    padding: 11px;
    margin-bottom: 8px;
    border: none;
    box-shadow: var(--shadow-sm);
}

.rb-searchbox form {
    display: flex;
    gap: 7px;
    flex-wrap: nowrap;
    align-items: center;
}

.rb-searchbox input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 9px 14px;
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.08);
    color: var(--ink-white);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
    font-family: inherit;
}

.rb-searchbox input[type="text"]:focus {
    border-color: var(--rb-red);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px var(--rb-red-dim);
}

.rb-searchbox input[type="text"]::placeholder { color: rgba(255,255,255,0.35); }

.rb-searchbox button {
    padding: 9px 15px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--rb-red);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(208,2,27,0.25);
}

.rb-searchbox button:hover {
    background: var(--rb-red-dark);
    box-shadow: 0 4px 14px rgba(208,2,27,0.36);
    transform: translateY(-1px);
}

/* ===================== TAG CLOUDS ===================== */
.rb-tagstrip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 10px 11px;
    background: var(--rb-panel);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: none;
    box-shadow: var(--shadow-sm);
}

.rb-tagitem {
    padding: 4px 13px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-pill);
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--ease);
    border: 1px solid rgba(255,255,255,0.1);
}

.rb-tagitem:hover {
    background: var(--rb-red);
    color: #fff;
    border-color: var(--rb-red);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(208,2,27,0.25);
}

/* ===================== SECTIONS ===================== */
.rb-module {
    margin-bottom: 14px;
}

.rb-module-hd {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 0;
}

.rb-module-title {
    font-size: 22px;
    font-weight: 900;
    margin: 0;
    color: var(--ink-dark);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rb-module-title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 1.15em;
    background: var(--rb-red);
    border-radius: 3px;
    flex-shrink: 0;
}

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

.rb-module-title a:hover { color: var(--rb-red); }

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

.rb-filmgrid li {
    animation: rb-rise 0.4s ease backwards;
}

.rb-filmgrid li:nth-child(1) { animation-delay: 0.02s; }
.rb-filmgrid li:nth-child(2) { animation-delay: 0.05s; }
.rb-filmgrid li:nth-child(3) { animation-delay: 0.08s; }
.rb-filmgrid li:nth-child(4) { animation-delay: 0.11s; }
.rb-filmgrid li:nth-child(5) { animation-delay: 0.14s; }
.rb-filmgrid li:nth-child(6) { animation-delay: 0.17s; }
.rb-filmgrid li:nth-child(7) { animation-delay: 0.20s; }
.rb-filmgrid li:nth-child(8) { animation-delay: 0.23s; }

@keyframes rb-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rb-thumb-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    aspect-ratio: 600 / 350;
    background: var(--rb-dark);
    border: none;
    box-shadow: var(--shadow-card);
    transition: var(--ease);
}

.rb-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.42s ease;
    opacity: 0.92;
}

.rb-thumb-wrap:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px) scale(1.01);
}

.rb-thumb-wrap:hover img {
    transform: scale(1.08);
    opacity: 1;
}

.rb-thumb-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,10,0.72) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--radius-md);
}

.rb-thumb-wrap:hover::after { opacity: 1; }

/* Red corner accent on hover */
.rb-thumb-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--rb-red);
    transition: width 0.3s ease;
    z-index: 3;
    border-radius: 0;
}

.rb-thumb-wrap:hover::before { width: 100%; }

.rb-film-meta {
    padding: 7px 0 0;
}

.rb-film-meta h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.42;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--ink-mid);
}

.rb-film-meta h5 a {
    color: inherit;
    text-decoration: none;
    transition: var(--ease);
}

.rb-film-meta h5 a:hover { color: var(--rb-red); }

/* ===================== DETAIL PANELS ===================== */
.rb-title-badge {
    background: var(--rb-charcoal);
    color: var(--ink-white);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.8;
    word-break: break-all;
    text-align: center;
    border-top: 3px solid var(--rb-red);
    box-shadow: var(--shadow-sm);
}

.rb-title-badge a {
    color: var(--rb-yellow);
    text-decoration: none;
    font-weight: 800;
    margin-right: 8px;
}

.rb-title-badge b { color: var(--ink-white); }

.rb-spec-panel {
    font-size: 15px;
    line-height: 1.9;
    padding: 20px 22px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin: 10px 0;
    border: none;
    box-shadow: var(--shadow-card);
    color: var(--ink-mid);
    border-left: 4px solid var(--rb-red);
}

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

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

.rb-preview-box picture img,
.rb-preview-box img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
    border: none;
}

/* ===================== ACTION BUTTONS ===================== */
.rb-action-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 12px;
    margin: 10px 0;
    background: var(--rb-charcoal);
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-sm);
}

.rb-cta {
    display: inline-block;
    padding: 11px 26px;
    background: var(--rb-red);
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: var(--ease);
    box-shadow: 0 3px 14px rgba(208,2,27,0.3);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: inherit;
}

.rb-cta:hover {
    background: var(--rb-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(208,2,27,0.4);
}

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

.rb-dl-pc a,
.rb-dl-mb a {
    color: var(--rb-red);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: var(--ease);
}

.rb-dl-pc a:hover,
.rb-dl-mb a:hover { color: var(--rb-red-dark); }

/* ===================== SHARE ===================== */
.rb-sharebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin: 10px 0;
    background: var(--rb-panel);
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-sm);
    flex-wrap: nowrap;
}

.share-url-display {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    background: rgba(255,255,255,0.07);
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255,255,255,0.1);
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.share-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--rb-yellow);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-right: 1px solid rgba(255,255,255,0.18);
    padding-right: 7px;
}

.share-url {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    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(--rb-red);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(208,2,27,0.28);
}

.share-copy-btn:hover {
    background: var(--rb-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(208,2,27,0.38);
}

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

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

.rb-pg-btn,
.rb-pg-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
    text-decoration: none;
}

.rb-pg-btn {
    background: var(--bg-card);
    color: var(--ink-mid);
    border: 1.5px solid var(--line-mid);
}

.rb-pg-btn:hover {
    background: var(--rb-red);
    border-color: var(--rb-red);
    color: #fff;
    box-shadow: 0 3px 10px rgba(208,2,27,0.22);
}

.rb-pg-now {
    background: var(--rb-red);
    color: #fff;
    border: 1.5px solid var(--rb-red);
    cursor: default;
    box-shadow: 0 3px 10px rgba(208,2,27,0.25);
}

/* ===================== FOOTER ===================== */
.rb-ext-links {
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-xs);
}

.rb-ext-links dl { margin: 0; }

.rb-ext-links dd {
    display: inline-block;
    margin: 4px;
}

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

.rb-ext-links a:hover { color: var(--rb-red); }

.pd5 { padding: 3px 6px; }

.rb-footer {
    padding: 20px 0;
    text-align: center;
    background: var(--rb-black);
    border-top: 3px solid var(--rb-red);
    margin-top: 16px;
}

.rb-footer p {
    margin: 5px 0;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

.rb-footer a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: var(--ease);
}

.rb-footer a:hover { color: var(--rb-red); }

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

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

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

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

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

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

    .rb-header-bar { min-height: 44px; padding: 0.5rem 8px; }
    .rb-brand { gap: 10px; }

    .rb-site-name    { font-size: 19px; }
    .rb-domain-pill  { padding: 5px 12px; gap: 6px; }
    .rb-domain-tag   { font-size: 9px; padding-right: 6px; }
    .rb-domain-url   { font-size: 16px; }

    .rb-zone { padding: 6px 0; }

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

    .rb-nav-links {
        width: 85%;
        gap: 4px;
        padding: 7px 5px;
    }

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

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

    .rb-module-title  { font-size: 18px; }
    .rb-film-meta h5  { font-size: 12px; }

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

    .rb-tagstrip { padding: 9px 10px; gap: 5px; }
    .rb-tagitem  { padding: 4px 11px; font-size: 12px; }

    .rb-action-row { padding: 12px 8px; gap: 8px; }
    .rb-cta        { padding: 9px 18px; font-size: 13px; }

    .rb-sharebar       { padding: 10px; gap: 7px; margin: 8px 0; }
    .share-url-display { padding: 7px 10px; gap: 5px; }
    .share-label       { font-size: 9px; padding-right: 5px; }
    .share-url         { font-size: 10px; }
    .share-copy-btn    { padding: 8px 11px; font-size: 12px; }
    .share-icon        { font-size: 13px; }

    .rb-pg-btn,
    .rb-pg-now { padding: 6px 11px; font-size: 12px; min-width: 30px; }

    .rb-module { margin-bottom: 10px; }

    .rb-title-badge { padding: 13px 14px; font-size: 14px; margin: 8px 0; }
    .rb-spec-panel  { padding: 14px 13px; font-size: 14px; margin: 8px 0; }
}

@media (max-width: 480px) {
    .rb-header-bar { min-height: 38px; }

    .rb-site-name    { font-size: 17px; }
    .rb-domain-pill  { padding: 4px 10px; }
    .rb-domain-tag   { font-size: 9px; }
    .rb-domain-url   { font-size: 15px; }

    .rb-nav-zone {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

    .rb-nav-links {
        width: 85%;
        gap: 3px;
        padding: 6px 4px;
    }

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

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

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

    .rb-module-title { font-size: 16px; }
    .rb-cta { padding: 8px 14px; font-size: 12px; }

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

@media (min-width: 769px) {
    .rb-filmgrid  { grid-template-columns: repeat(4, 1fr); }
    .rb-nav-zone  { font-size: 14px; }
    .rb-nav-links a { font-size: 13px; }
}
