@font-face {
    font-family: 'CustomFont';
    src: url('16ttf.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: 'CustomFont', 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    touch-action: manipulation;
    background-attachment: fixed;
}

:root {
    --bg-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color: #fff;
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #ff6b6b;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    /* 丰富的颜色变量 */
    --color-red: #ff4757;
    --color-pink: #ff6b81;
    --color-orange: #ffa502;
    --color-yellow: #ffd32a;
    --color-green: #26de81;
    --color-teal: #2bcbba;
    --color-cyan: #0fbcf9;
    --color-blue: #1e90ff;
    --color-indigo: #5f27cd;
    --color-purple: #a55eea;
    --color-gold: #ffd700;
    --color-silver: #c0c0c0;
    --color-bronze: #cd7f32;
    
    /* 渐变颜色 */
    --gradient-1: linear-gradient(45deg, #ff6b6b, #ffd700);
    --gradient-2: linear-gradient(45deg, #4ecdc4, #44a08d);
    --gradient-3: linear-gradient(45deg, #9d4edd, #ff6b6b);
    --gradient-4: linear-gradient(45deg, #667eea, #764ba2);
    --gradient-5: linear-gradient(45deg, #ffd700, #ffa500);
    --gradient-6: linear-gradient(45deg, #26de81, #20bf6b);
    --gradient-7: linear-gradient(45deg, #0fbcf9, #1e90ff);
    --gradient-8: linear-gradient(45deg, #a55eea, #5f27cd);
}

body.theme-dark {
    --bg-color: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    --text-color: #f0f0f0;
    --glass-bg: rgba(0, 0, 0, 0.25);
    --glass-border: rgba(255, 255, 255, 0.15);
}

body.theme-light {
    --bg-color: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    --text-color: #2c3e50;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
}

body.theme-cyber {
    --bg-color: linear-gradient(135deg, #0d0f1a 0%, #1a1f2e 50%, #0d0f1a 100%);
    --text-color: #00ff9d;
    --glass-bg: rgba(0, 255, 157, 0.1);
    --glass-border: rgba(0, 255, 157, 0.3);
}

body.theme-rainbow {
    --bg-color: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff);
    --text-color: #fff;
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.4);
}

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-effect:hover {
    backdrop-filter: blur(15px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* 顶部导航栏 */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--gradient-1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    background: linear-gradient(45deg, #ff6b6b, #ffd700, #4ecdc4, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% auto;
    animation: gradient 5s ease infinite;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    background: linear-gradient(45deg, #ff6b6b, #ffd700, #4ecdc4, #9d4edd);
    background-size: 300% auto;
    animation: gradient 3s ease infinite;
    padding: 2px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.user-avatar:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
}

.user-avatar:hover img {
    transform: scale(1.1);
}

.avatar-menu {
    position: fixed;
    top: 60px;
    right: 15px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    padding: 15px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(15px);
    border: 1px solid var(--gradient-1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    min-width: 300px;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-menu.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.avatar-menu-item {
    padding: 12px 16px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.avatar-menu-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
    border-color: var(--gradient-1);
}

.sign-in-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    padding: 8px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: bold;
    letter-spacing: 0.5px;
    font-size: 13px;
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.sign-in-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.6);
}

/* 搜索框 */
.search-container {
    display: flex;
    gap: 8px;
    margin: 70px 12px 12px;
    position: relative;
}

.search-box-wrapper {
    flex: 1;
    position: relative;
}

.search-box {
    width: 100%;
    padding: 8px 16px;
    border-radius: 25px;
    border: none;
    outline: none;
    font-size: 13px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    color: var(--text-color);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.search-box:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--gradient-1);
    padding-left: 20px;
}

.search-box::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    padding: 8px 16px;
    border-radius: 25px;
    border: none;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.search-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.search-btn:active {
    transform: translateY(-1px);
}

/* 搜索历史 */
.search-history {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin-top: 5px;
    padding: 10px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gradient-1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: none;
}

.search-history.active {
    display: block;
}

.search-history-item {
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-history-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.search-history-item:last-child {
    border-bottom: none;
}

.search-history-delete {
    color: #ff6b6b;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 5px;
    background: rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
}

.search-history-delete:hover {
    background: rgba(255, 107, 107, 0.4);
    transform: scale(1.1);
}

.search-history-clear {
    padding: 10px;
    text-align: center;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 12px;
    border-radius: 10px;
    margin-top: 5px;
    background: rgba(255, 107, 107, 0.1);
    transition: all 0.3s ease;
}

.search-history-clear:hover {
    background: rgba(255, 107, 107, 0.3);
}

/* 版本选择器 - 玻璃效果 */
.version-selector {
    margin: 8px 12px;
    padding: 8px;
    border-radius: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    align-items: center;
    transition: all 0.3s ease;
}

.version-selector::-webkit-scrollbar {
    display: none;
}

/* 版本项 - 透明玻璃效果 */
.version-item {
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    font-size: 12px;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

/* 版本项不同的颜色 - 透明版本 */
.version-item:nth-child(6n+1) {
    background: rgba(255, 107, 107, 0.25);
    border-color: rgba(255, 107, 107, 0.4);
}

.version-item:nth-child(6n+2) {
    background: rgba(255, 215, 0, 0.25);
    border-color: rgba(255, 215, 0, 0.4);
}

.version-item:nth-child(6n+3) {
    background: rgba(78, 205, 196, 0.25);
    border-color: rgba(78, 205, 196, 0.4);
}

.version-item:nth-child(6n+4) {
    background: rgba(157, 78, 221, 0.25);
    border-color: rgba(157, 78, 221, 0.4);
}

.version-item:nth-child(6n+5) {
    background: rgba(38, 222, 129, 0.25);
    border-color: rgba(38, 222, 129, 0.4);
}

.version-item:nth-child(6n+6) {
    background: rgba(15, 188, 249, 0.25);
    border-color: rgba(15, 188, 249, 0.4);
}

/* 悬停效果 */
.version-item:hover {
    transform: translateY(-3px) scale(1.05);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 激活状态 - 更明显但保持透明 */
.version-item.active {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

.version-item.active::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: 10px;
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* 版本项内的小字 - 资源计数 */
.version-item div:last-child {
    font-size: 10px;
    opacity: 0.9;
    margin-top: 3px;
    color: var(--text-color);
}

/* 资源选择器 */
.source-selector-wrapper {
    margin: 8px 12px;
    border-radius: 20px;
    background: var(--glass-bg);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sourceSelector {
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px;
    display: flex;
    align-items: center;
    flex: 1;
    scroll-behavior: smooth;
}

.sourceSelector::-webkit-scrollbar {
    height: 4px;
}

.sourceSelector::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.sourceSelector::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border-radius: 2px;
}

.source-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 8px;
    flex-shrink: 0;
    font-size: 12px;
    min-width: 65px;
    justify-content: center;
    font-weight: bold;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

/* 资源项不同的颜色 */
.source-item:nth-child(7n+1) {
    background: linear-gradient(45deg, #ff4757, #ff6b81);
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

.source-item:nth-child(7n+2) {
    background: linear-gradient(45deg, #ffa502, #ffd32a);
    box-shadow: 0 4px 10px rgba(255, 165, 2, 0.3);
}

.source-item:nth-child(7n+3) {
    background: linear-gradient(45deg, #26de81, #2bcbba);
    box-shadow: 0 4px 10px rgba(38, 222, 129, 0.3);
}

.source-item:nth-child(7n+4) {
    background: linear-gradient(45deg, #0fbcf9, #1e90ff);
    box-shadow: 0 4px 10px rgba(15, 188, 249, 0.3);
}

.source-item:nth-child(7n+5) {
    background: linear-gradient(45deg, #5f27cd, #a55eea);
    box-shadow: 0 4px 10px rgba(95, 39, 205, 0.3);
}

.source-item:nth-child(7n+6) {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.source-item:nth-child(7n+7) {
    background: linear-gradient(45deg, #cd84f1, #c56cf0);
    box-shadow: 0 4px 10px rgba(205, 132, 241, 0.3);
}

.source-item:hover {
    transform: translateY(-3px) scale(1.05);
    filter: brightness(1.2);
}

.source-item.active {
    transform: scale(1.08);
    border: 2px solid white;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.4);
}

.source-item.active::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: 10px;
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* 优化壁纸加载性能 */
body.wallpaper-mode {
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: cover !important;
    /* 使用 will-change 提示浏览器优化 */
    will-change: background;
    /* 防止背景闪烁 */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 添加一个半透明遮罩层，减少背景视觉干扰 */
body.wallpaper-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: -1;
}

/* 玻璃效果优化 */
.glass-effect {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* 使用 transform 开启硬件加速 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* 分类导航 */
.category-container {
    margin: 8px 12px;
    padding: 8px;
    border-radius: 20px;
    background: var(--glass-bg);
    overflow-x: auto;
    scrollbar-width: none;
    display: flex;
    align-items: center;
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.category-container::-webkit-scrollbar {
    display: none;
}

.category-nav {
    display: flex;
    gap: 8px;
}

.category-item {
    min-width: 70px;
    padding: 8px 12px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

/* 分类项不同的颜色 */
.category-item:nth-child(5n+1) {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

.category-item:nth-child(5n+2) {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.category-item:nth-child(5n+3) {
    background: linear-gradient(135deg, #4ecdc4, #45b7af);
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.4);
}

.category-item:nth-child(5n+4) {
    background: linear-gradient(135deg, #9d4edd, #b983ff);
    box-shadow: 0 4px 10px rgba(157, 78, 221, 0.4);
}

.category-item:nth-child(5n+5) {
    background: linear-gradient(135deg, #26de81, #32b67a);
    box-shadow: 0 4px 10px rgba(38, 222, 129, 0.4);
}

.category-item:hover {
    transform: translateY(-3px) scale(1.08);
    filter: brightness(1.2);
}

.category-item.active {
    transform: scale(1.1);
    border: 2px solid white;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.5);
}

.category-item.active::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: 10px;
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* 电影网格 */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin: 12px;
    padding-bottom: 70px;
}

.movie-card {
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    border: 3px solid;
    background: var(--glass-bg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* 电影卡片不同的边框颜色 */
.movie-card:nth-child(8n+1) {
    border-color: #ff4757;
}

.movie-card:nth-child(8n+2) {
    border-color: #ffa502;
}

.movie-card:nth-child(8n+3) {
    border-color: #ffd32a;
}

.movie-card:nth-child(8n+4) {
    border-color: #26de81;
}

.movie-card:nth-child(8n+5) {
    border-color: #2bcbba;
}

.movie-card:nth-child(8n+6) {
    border-color: #0fbcf9;
}

.movie-card:nth-child(8n+7) {
    border-color: #5f27cd;
}

.movie-card:nth-child(8n+8) {
    border-color: #ff6b6b;
}

.movie-card:hover {
    transform: translateY(-10px) scale(1.05) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
    filter: brightness(1.1);
}

.movie-poster {
    width: 100%;
    height: 130px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-card:hover .movie-poster {
    transform: scale(1.2);
}

.movie-info {
    padding: 8px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.movie-title {
    font-size: 12px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.movie-rating {
    font-size: 10px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 3px;
}

.vip-icon {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(45deg, #ffd700, #ffa500);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.3);
}

.source-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 3px 8px rgba(78, 205, 196, 0.3);
}

.short-video-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(45deg, #ff7675, #fd79a8);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 3px 8px rgba(255, 118, 117, 0.3);
}

.membership-icon {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    z-index: 2;
}

.membership-icon.normal {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.membership-icon.gold {
    background: linear-gradient(45deg, #ffd700, #ffa500);
}

.membership-icon.diamond {
    background: linear-gradient(45deg, #4ecdc4, #00b4d8);
}

.membership-icon.permanent {
    background: linear-gradient(45deg, #ff6b6b, #9d4edd);
    animation: pulse 2s infinite;
}

.membership-icon.author {
    background: linear-gradient(45deg, #9d4edd, #ff6b6b);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px 5px rgba(255, 215, 0, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* 加载更多按钮 */
.load-more {
    text-align: center;
    margin: 12px;
    padding: 12px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    border: none;
}

.load-more:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.6);
    filter: brightness(1.1);
}

.load-more:active {
    transform: translateY(-2px);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--gradient-1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 12px;
    border-radius: 20px;
    min-width: 55px;
    position: relative;
}

.nav-item:hover {
    transform: translateY(-5px) scale(1.1);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.nav-item.active {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffd700;
    box-shadow: 0 0 10px #ffd700;
}

.nav-text {
    font-size: 11px;
    font-weight: 600;
}

/* 页面内容 */
.page-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 推荐网格 */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin: 75px 12px 12px;
    padding-bottom: 70px;
}

#recommend-page h2 {
    text-align: center;
    margin: 85px 12px 12px;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(45deg, #ffd700, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.website-card {
    background: var(--glass-bg);
    border-radius: 20px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 3px solid;
    backdrop-filter: blur(8px);
    transform-style: preserve-3d;
}

/* 网站卡片不同的边框颜色 */
.website-card:nth-child(6n+1) {
    border-color: #ff4757;
    box-shadow: 0 8px 20px rgba(255, 71, 87, 0.3);
}

.website-card:nth-child(6n+2) {
    border-color: #ffa502;
    box-shadow: 0 8px 20px rgba(255, 165, 2, 0.3);
}

.website-card:nth-child(6n+3) {
    border-color: #26de81;
    box-shadow: 0 8px 20px rgba(38, 222, 129, 0.3);
}

.website-card:nth-child(6n+4) {
    border-color: #0fbcf9;
    box-shadow: 0 8px 20px rgba(15, 188, 249, 0.3);
}

.website-card:nth-child(6n+5) {
    border-color: #5f27cd;
    box-shadow: 0 8px 20px rgba(95, 39, 205, 0.3);
}

.website-card:nth-child(6n+6) {
    border-color: #ff6b6b;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.website-card:hover {
    transform: translateY(-10px) rotateY(5deg) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    filter: brightness(1.1);
}

.website-card-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(45deg, #ffd700, #ffa500);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.website-card img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    border-radius: 15px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.website-card:hover img {
    transform: scale(1.2) rotate(10deg);
}

/* 免费影视网格 */
.free-movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin: 85px 12px 12px;
    padding-bottom: 70px;
}

/* 个人中心 */
.profile-section {
    padding: 85px 12px 12px;
    text-align: center;
}

.profile-info-container {
    background: var(--glass-bg);
    border-radius: 25px;
    padding: 20px;
    margin: 12px;
    position: relative;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(15px);
    border: 2px solid var(--gradient-1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: block;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 4px solid;
    position: relative;
    overflow: hidden;
    animation: spin 8s linear infinite;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-avatar.normal {
    border-color: #667eea;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.profile-avatar.gold {
    border-color: #ffd700;
    background: linear-gradient(45deg, #ffd700, #ffa500);
}

.profile-avatar.diamond {
    border-color: #4ecdc4;
    background: linear-gradient(45deg, #4ecdc4, #00b4d8);
}

.profile-avatar.permanent {
    border-color: #ff6b6b;
    background: linear-gradient(45deg, #ff6b6b, #9d4edd);
    animation: spin 4s linear infinite;
}

.profile-avatar.author {
    border-color: #9d4edd;
    background: linear-gradient(45deg, #9d4edd, #ff6b6b);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-avatar:hover {
    transform: scale(1.15) rotate(360deg);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.profile-name {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--text-color);
}

.profile-status {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    margin: 0 auto 10px;
    display: inline-block;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.qq-info {
    background: linear-gradient(45deg, #667eea, #764ba2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    margin: 8px auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.wechat-info {
    background: linear-gradient(45deg, #1caf47, #2ecc71);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    margin: 8px auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(28, 175, 71, 0.4);
}

.profile-info {
    margin-top: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    margin: 8px 0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px) scale(1.02);
    border-color: var(--gradient-1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.info-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
}

.vip-upgrade-item {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #333;
    font-weight: bold;
    margin: 15px 0;
    border-radius: 20px;
    border: 2px solid #ffd700;
    animation: glow 2s infinite;
}

@keyframes glow {
    0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.9); }
    100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
}

.expiry-warning {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 12px 18px;
    border-radius: 20px;
    margin: 10px 0;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    animation: pulseWarning 1.5s infinite;
    cursor: pointer;
    border: 2px solid #ffd700;
}

@keyframes pulseWarning {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    padding: 15px;
}

.modal-overlay.active {
    opacity: 1;
    transform: scale(1);
}

.modal-content {
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 25px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    border: 2px solid var(--gradient-1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-title {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(45deg, #ffd700, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-buttons {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 12px 25px;
    border-radius: 25px;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 110px;
    letter-spacing: 0.5px;
}

.modal-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.modal-btn:active {
    transform: translateY(-2px);
}

.modal-btn.confirm {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.modal-btn.cancel {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

/* 会员卡片 */
.membership-cards {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    margin: 15px 0;
    padding: 10px;
    scrollbar-width: none;
}

.membership-cards::-webkit-scrollbar {
    display: none;
}

.membership-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 18px;
    min-width: 200px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 3px solid transparent;
    backdrop-filter: blur(8px);
}

.membership-card:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 50px rgba(255, 215, 0, 0.4);
}

.membership-card.active {
    border: 3px solid #ffd700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 20px 50px rgba(255, 215, 0, 0.6);
}

.membership-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #ffd700;
    font-weight: bold;
}

.membership-price {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.membership-desc {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.membership-privileges {
    font-size: 11px;
    margin-top: 10px;
    text-align: left;
    padding-left: 10px;
}

/* 强制更新模态框 - 玻璃效果透明版 */
.force-update-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.force-update-content {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 30px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.force-update-title {
    color: #ff6b6b;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.force-update-content-img {
    margin: 20px auto;
    max-width: 100%;
    border-radius: 15px;
    border: 3px solid #ffd700;
}

.force-update-content-img img {
    width: 100%;
    border-radius: 12px;
}

.force-update-version {
    color: #ffd700;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
}

.force-update-message {
    color: white;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
}

.force-update-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.4s ease;
}

.force-update-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.6);
}

/* 登录提示 */
.login-prompt {
    text-align: center;
    padding: 50px 20px;
}

.login-prompt h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.login-prompt p {
    font-size: 14px;
    margin-bottom: 25px;
    opacity: 0.8;
}

.login-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.login-btn {
    padding: 12px 30px;
    border-radius: 25px;
    border: none;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-btn.primary {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.login-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.login-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 新的Canvas触摸特效 */
#touchCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* 水波纹 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 作者徽章 */
.author-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #9d4edd, #ff6b6b);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    z-index: 3;
    animation: pulse 1.5s infinite;
}

/* 维护模式 */
.maintenance-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(15px);
}

.maintenance-box {
    background: rgba(0, 0, 0, 0.8);
    padding: 35px;
    border-radius: 30px;
    max-width: 500px;
    width: 100%;
    border: 3px solid #ff6b6b;
    box-shadow: 0 20px 60px rgba(255, 107, 107, 0.4);
    backdrop-filter: blur(20px);
}

.maintenance-title {
    color: #ff6b6b;
    font-size: 26px;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 0 2px 15px rgba(255, 107, 107, 0.5);
}

.maintenance-message {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.maintenance-qrcode {
    margin: 30px auto;
    width: 180px;
    height: 180px;
    border: 4px solid #ffd700;
    border-radius: 20px;
    padding: 10px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.maintenance-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.maintenance-contact {
    color: #4ecdc4;
    font-size: 14px;
    margin-top: 20px;
    font-weight: 600;
}

/* 选择文本样式 */
::selection {
    background: rgba(255, 215, 0, 0.4);
    color: #fff;
}

/* 响应式 */
@media (min-width: 768px) {
    .movies-grid, .recommendations-grid, .free-movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }
    
    .movie-poster {
        height: 160px;
    }
    
    .nav-item {
        min-width: 65px;
        padding: 10px 15px;
    }
    
    .nav-text {
        font-size: 12px;
    }
    
    .search-container {
        margin: 80px 15px 15px;
    }
    
    .search-box {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .search-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .movies-grid, .recommendations-grid, .free-movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 18px;
        margin: 15px;
    }
    
    .movie-poster {
        height: 180px;
    }
    
    .nav-item {
        min-width: 75px;
        padding: 12px 18px;
    }
    
    .nav-text {
        font-size: 13px;
    }
}