/* MF 影视 — 前台视觉层（覆盖 style.css 中的列表/详情表现） */

:root {
    --bg: #eef1f4;
    --bg-deep: #dfe6ec;
    --surface: #ffffff;
    --surface-hover: #f4f7fa;
    --border: #d5dde5;
    --text: #15202b;
    --text-muted: #5b6b7c;
    --primary: #c45c26;
    --primary-hover: #a84a1c;
    --accent: #1f6f8b;
    --ink: #0c1520;
    --radius: 10px;
    --shadow: 0 8px 28px rgba(12, 21, 32, 0.08);
    --shadow-hover: 0 14px 36px rgba(196, 92, 38, 0.16);
    --header-bg: rgba(12, 21, 32, 0.92);
    --font-display: "Syne", "Noto Sans SC", sans-serif;
    --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    font-family: var(--font-body);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(31, 111, 139, 0.12), transparent 55%),
        radial-gradient(900px 420px at 90% 0%, rgba(196, 92, 38, 0.1), transparent 50%),
        linear-gradient(180deg, #e8edf2 0%, var(--bg) 40%, #e7ecf1 100%);
    color: var(--text);
}

.container {
    max-width: 1280px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.header-inner {
    min-height: 64px;
    gap: 20px;
    flex-wrap: nowrap;
}

.logo {
    color: #fff;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, #c45c26, #e3a05a);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 14px rgba(196, 92, 38, 0.35);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.header-nav::-webkit-scrollbar {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    width: 160px;
    border: 0;
    background: transparent;
    color: #fff;
    padding: 8px 12px 8px 14px;
    font-size: 0.88rem;
    outline: none;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.header-search button {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    padding: 8px 14px 8px 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.site-header .nav-link {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.site-header .nav-link-primary {
    background: var(--primary);
    color: #fff !important;
    border-radius: 999px;
    padding: 7px 14px;
}

.site-header .nav-link-primary:hover {
    background: var(--primary-hover);
}

/* Hero */
.hero-section,
.carousel-section {
    position: relative;
    background: var(--ink);
    border-bottom: none;
}

.hero,
.carousel {
    height: min(78vh, 640px);
    min-height: 420px;
}

.carousel-bg {
    filter: saturate(1.05) contrast(1.05);
}

.carousel-overlay {
    background:
        linear-gradient(90deg, rgba(8, 14, 22, 0.92) 0%, rgba(8, 14, 22, 0.55) 42%, rgba(8, 14, 22, 0.2) 100%),
        linear-gradient(0deg, rgba(8, 14, 22, 0.75) 0%, transparent 45%);
}

.carousel-content {
    max-width: 620px;
    padding-left: 24px;
    animation: heroIn 0.8s ease both;
}

.hero-brand {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
    line-height: 1;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.carousel-title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.carousel-subtitle {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    max-width: 420px;
}

.carousel-btn {
    box-shadow: 0 8px 24px rgba(196, 92, 38, 0.4);
}

.carousel-arrow {
    background: rgba(12, 21, 32, 0.55);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: none;
}

.carousel-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.carousel-dot {
    background: rgba(255, 255, 255, 0.35);
}

.carousel-dot.active,
.carousel-dot:hover {
    background: var(--primary);
}

.hero-fallback {
    min-height: 520px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-fallback-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, #0c1520 0%, #1a3040 45%, #2a1a12 100%),
        repeating-linear-gradient(-12deg, transparent 0 14px, rgba(255, 255, 255, 0.02) 14px 15px);
}

.hero-fallback .carousel-content {
    position: relative;
    z-index: 1;
    padding: 80px 20px;
    transform: none;
    top: auto;
}

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

/* Sections */
.filter-section {
    padding: 36px 0 8px;
}

.section-head {
    margin-bottom: 18px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.category-filter {
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-btn {
    border-radius: 8px;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: none;
    padding: 8px 14px;
}

.filter-btn:hover {
    color: var(--primary);
    border-color: rgba(196, 92, 38, 0.25);
    background: #fff;
}

.filter-btn.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    box-shadow: none;
}

.search-result-tip {
    margin-bottom: 8px;
}

.search-clear {
    color: var(--primary);
}

/* Poster grid */
.resource-section {
    padding: 8px 0 72px;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px 14px;
}

.resource-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.resource-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.card-cover {
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    background: #cbd5e1;
    box-shadow: var(--shadow);
}

.resource-card:hover .card-cover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.play-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(12, 21, 32, 0.28);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.play-badge::after {
    content: "";
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(196, 92, 38, 0.95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 22px no-repeat;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.resource-card:hover .play-badge {
    opacity: 1;
}

.category-badge {
    top: auto;
    bottom: 10px;
    left: 10px;
    background: rgba(12, 21, 32, 0.72);
    color: #fff;
    border: 0;
    backdrop-filter: blur(6px);
    box-shadow: none;
}

.category-badge.large {
    background: rgba(196, 92, 38, 0.12);
    color: var(--primary);
    border: 1px solid rgba(196, 92, 38, 0.2);
}

.card-body {
    padding: 10px 2px 0;
    gap: 6px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a:hover {
    color: var(--primary);
}

.card-intro {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    margin: 0;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    justify-content: space-between;
}

.card-actions {
    display: none;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    border-color: var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(196, 92, 38, 0.06);
}

/* Detail */
.detail-section {
    padding: 28px 0 72px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
    align-items: start;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: #cbd5e1;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.detail-content h2,
.detail-gallery-title,
.detail-recommend-title {
    font-family: var(--font-display);
    color: var(--ink);
}

.watch-box,
.download-box {
    background:
        linear-gradient(135deg, rgba(196, 92, 38, 0.1), rgba(31, 111, 139, 0.08)),
        #fff;
    border: 1px solid rgba(196, 92, 38, 0.22);
    border-radius: 14px;
    margin-top: 24px;
}

.detail-recommend-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px 14px;
}

.detail-recommend-card {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.gallery-thumbs {
    gap: 12px;
}

.thumb-btn {
    width: 120px;
    height: 80px;
    display: block;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-btn:hover,
.thumb-btn.active {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(196, 92, 38, 0.2);
}

/* Footer */
.site-footer {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0;
    border-top: none;
}

.footer-inner {
    text-align: center;
}

.footer-brand {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    margin-bottom: 10px;
}

.footer-desc {
    max-width: 520px;
    margin: 0 auto 14px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-copy {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
}

/* Auth / user surfaces inherit new tokens */
.logo-icon {
    background: linear-gradient(135deg, var(--primary), #e3a05a);
    box-shadow: 0 2px 8px rgba(196, 92, 38, 0.25);
}

.sidebar-avatar {
    background: linear-gradient(135deg, var(--primary), #1f6f8b);
}

.sidebar-link.active {
    background: rgba(196, 92, 38, 0.1);
    color: var(--primary);
}

@media (max-width: 1200px) {
    .resource-grid,
    .detail-recommend-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 992px) {
    .resource-grid,
    .detail-recommend-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .detail-layout {
        grid-template-columns: 220px 1fr;
        gap: 24px;
    }

    .header-search input {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 10px 0;
        gap: 12px;
    }

    .header-nav {
        order: 3;
        width: 100%;
        padding-bottom: 4px;
    }

    .header-actions {
        margin-left: auto;
    }

    .hero,
    .carousel,
    .hero-fallback {
        height: auto;
        min-height: 360px;
    }

    .carousel-content {
        top: auto;
        bottom: 36px;
        transform: none;
        max-width: 100%;
    }

    .hero-brand {
        font-size: 2rem;
    }

    .resource-grid,
    .detail-recommend-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px 10px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 220px;
        margin: 0 auto;
    }

    .detail-ads-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .resource-grid,
    .detail-recommend-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-search {
        display: none;
    }
}
