* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root {
    --primary: #00ccff;
    --secondary: #ff0080;
    --bg-dark: #0f0f1a;
    --bg-light: #1a1a2e;
    --bg-card: #16202c;
    --text: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 12px;
    --header-bg: rgba(15, 15, 26, 0.95);
}

body {
    background-color: var(--bg-dark);
    color: var(--text);
    line-height: 1.5;
}

body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.gradient-text {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-menu {
    position: absolute;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100%;
    background: var(--bg-light);
    border-right: 1px solid var(--border);
    padding: 20px;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.mobile-nav-overlay.show .mobile-nav-menu {
    left: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-header h3 {
    color: var(--primary);
    font-size: 18px;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.mobile-nav-list {
    list-style: none;
}

.mobile-nav-item {
    margin-bottom: 5px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    padding: 12px 15px;
    border-radius: var(--radius);
    transition: 0.2s;
    cursor: pointer;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    color: white;
}

.mobile-nav-link i {
    width: 24px;
    color: var(--primary);
}

.mobile-nav-link:hover i,
.mobile-nav-link.active i {
    color: white;
}

/* ===== 图片加载效果 ===== */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy-image.loaded {
    opacity: 1;
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(110deg, #2a2a3a 8%, #3a3a4a 18%, #2a2a3a 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: inherit;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #2a2a3a;
}

.image-container img {
    position: relative;
    z-index: 2;
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header .container {
        justify-content: space-between;
    }

    .header .container > div:last-child {
        display: flex;
        gap: 10px;
        align-items: center;
    }
}

.footer {
    background: var(--bg-card);
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.friend-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    padding: 10px 0;
}

.friend-links span {
    color: var(--text-muted);
    font-size: 14px;
}

.friend-links a {
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.friend-links a:hover {
    color: var(--primary);
}

@media (max-width: 480px) {
    .friend-links {
        gap: 10px;
        font-size: 12px;
    }

    .friend-links span,
    .friend-links a {
        font-size: 12px;
    }
}

.header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
}

body {
    padding-top: 70px !important;
}

/* ===== 收藏提示弹窗 ===== */
.bookmark-toast {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

.bookmark-toast-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16202c 100%);
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    max-width: 320px;
}

.bookmark-toast-content i {
    font-size: 28px;
    color: #ffc107;
    flex-shrink: 0;
}

.bookmark-toast-text {
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
    flex: 1;
}

.bookmark-toast-text strong {
    color: var(--primary);
    font-size: 14px;
}

.bookmark-toast-text span {
    font-size: 12px;
    color: var(--text-secondary);
}

.bookmark-toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}

.bookmark-toast-close:hover {
    color: var(--primary);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.bookmark-toast.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

/* 移动端样式 */
@media (max-width: 1024px) {
    .bookmark-toast {
        bottom: 80px;
        left: 20px;
        right: auto;
    }

    .bookmark-toast-content {
        max-width: 280px;
    }

    .bookmark-toast-text {
        font-size: 12px;
    }

    .bookmark-toast-text strong {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .bookmark-toast {
        bottom: 70px;
        left: 15px;
    }

    .bookmark-toast-content {
        max-width: 260px;
        padding: 10px 12px;
    }
}

.mobile-nav-item.has-submenu {
    position: relative;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.mobile-nav-link span:first-of-type {
    flex: 1;
}

.submenu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.mobile-nav-item.open .submenu-arrow {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-top: 8px;
}

.mobile-nav-item.open .mobile-submenu {
    max-height: 500px;
}

.mobile-submenu li {
    border-radius: 12px;
    margin: 4px 6px;
    overflow: hidden;
}

.mobile-submenu li a {
    display: block;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-radius: 12px;
}

.mobile-submenu li a:hover {
    color: var(--primary);
    background: rgba(0, 204, 255, 0.1);
}

.mobile-submenu li.active a {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    color: white;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.pc-search-wrapper {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}

.pc-search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 4px 4px 4px 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.pc-search-box:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.15);
}

.pc-search-input {
    width: 140px;
    background: transparent;
    border: none;
    padding: 6px 0;
    color: var(--text);
    font-size: 13px;
    outline: none;
}

.pc-search-input::placeholder {
    color: var(--text-muted);
    font-size: 12px;
}

.pc-search-btn {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    border: none;
    border-radius: 30px;
    padding: 5px 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
}

.pc-search-btn:hover {
    opacity: 0.9;
}

.hot-search-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hot-search-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hot-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.hot-search-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.hot-search-note {
    font-size: 10px;
    color: var(--text-muted);
}

.hot-search-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: none;
    overflow: visible;
}

.hot-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.hot-search-item:hover {
    background: rgba(0, 204, 255, 0.1);
}

.hot-rank {
    font-size: 12px;
    font-weight: bold;
    width: 24px;
    text-align: center;
}

.hot-keyword {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.hot-search-item:hover .hot-keyword {
    color: var(--primary);
}

/* 移动端按钮区域 */
.mobile-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.mobile-search-icon {
    color: var(--primary);
    font-size: 18px;
    cursor: pointer;
    display: none;
}

.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-search-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-search-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-radius: 0 0 20px 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    flex-wrap: nowrap;
}

.mobile-search-header i:first-child {
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 4px 8px;
    min-width: 0;
}

.mobile-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 6px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    min-width: 0;
}

.mobile-search-submit {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    border: none;
    border-radius: 30px;
    padding: 5px 12px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
}

.mobile-search-cancel {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.mobile-hot-search {
    padding: 12px 16px;
}

.mobile-hot-search-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.mobile-hot-search-header .hot-icon {
    font-size: 13px;
}

.mobile-hot-search-header .hot-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.mobile-hot-search-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-hot-search-list .hot-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.mobile-hot-search-list .hot-search-item:active {
    background: rgba(0, 204, 255, 0.2);
}

.mobile-hot-search-list .hot-rank {
    width: 24px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.mobile-hot-search-list .hot-keyword {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    /*.pc-search-wrapper {*/
    /*    display: none !important;*/
    /*}*/

    /*.mobile-search-icon {*/
    /*    display: block !important;*/
    /*}*/

    /*.nav-links {*/
    /*    display: none !important;*/
    /*}*/

    .header .container {
        gap: 10px;
    }

    .logo {
        font-size: 16px;
    }
}

/*@media (min-width: 1025px) {*/
/*    .mobile-search-icon {*/
/*        display: none !important;*/
/*    }*/

/*    .pc-search-wrapper {*/
/*        display: block !important;*/
/*    }*/
/*}*/

.page-mobile-selector {
    position: relative;
    display: inline-block;
}

.page-info {
    display: inline-block;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
    min-width: 60px;
    text-align: center;
    border: 1px solid var(--border);
}

.page-info:hover {
    background: rgba(0, 204, 255, 0.2);
    color: var(--primary);
}

.page-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    width: 280px;
    max-height: 300px;
    overflow-y: auto;
}

.page-dropdown-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

.page-dropdown-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.page-dropdown-item:hover {
    background: rgba(0, 204, 255, 0.2);
    color: var(--primary);
}

.page-dropdown-item.current {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    color: white;
}

.page-dropdown-close {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: none;
}

.page-dropdown-close.show {
    display: block;
}

@media (max-width: 1024px) {
    .pagination {
        position: relative;
    }
}

.movie-card,
.ranking-item,
.news-list-item,
.news-hot-item,
.hot-recommend-item,
.hot-search-item {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.movie-card:hover,
.ranking-item:hover,
.news-list-item:hover,
.news-hot-item:hover,
.hot-recommend-item:hover,
.hot-search-item:hover {
    color: inherit;
}

.hot-search-item:hover {
    background: rgba(0, 204, 255, 0.1);
}

.hot-search-item:hover .hot-keyword {
    color: var(--primary);
}

.hot-recommend-item:hover {
    transform: translateY(-5px);
}

.hot-recommend-item:hover .hot-recommend-poster img {
    transform: scale(1.05);
}

.gradient-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
}

.pc-search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 4px 4px 4px 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    gap: 8px;
}

.pc-history-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.pc-history-icon:hover {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    color: white;
}

/* ===== 二维码弹窗（移动端安装引导） ===== */
.qr-float {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    cursor: pointer;
    animation: qrFloatPulse 2s ease-in-out infinite;
}

.qr-float-trigger {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00ccff, #0066cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 204, 255, 0.4);
    transition: all 0.3s ease;
}

.qr-float-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 204, 255, 0.6);
}

.qr-float-trigger i {
    font-size: 28px;
    color: #fff;
}

.qr-float-content {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.qr-float:hover .qr-float-content {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

.qr-float-content::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #ffffff;
}

.qr-code-image {
    text-align: center;
    margin-bottom: 12px;
}

.qr-code-image img {
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.qr-text {
    text-align: center;
}

.qr-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
    display: block;
}

.qr-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    display: block;
}

.qr-platform {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.qr-platform span {
    font-size: 11px;
    color: #999;
}

/* 移动端显示，PC端隐藏 */
@media (min-width: 1025px) {
    .qr-float {
        display: flex;
    }
}

@media (max-width: 1024px) {
    .qr-float {
        display: flex;
    }
}

@media (max-width: 768px) {
    .qr-float-trigger {
        width: 50px;
        height: 50px;
    }

    .qr-float-trigger i {
        font-size: 24px;
    }

    .qr-float-content {
        width: 180px;
        padding: 12px;
    }

    .qr-code-image img {
        width: 100px;
        height: 100px;
    }

    .qr-title {
        font-size: 14px;
    }

    .qr-desc {
        font-size: 11px;
    }
}

@keyframes qrFloatPulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.05);
    }
}