:root {
    /* 默认深色主题 */
    --primary-color: #1bb76e;
    --primary-hover: #1da462;
    --background-dark: #141518;
    --card-dark: #2c2f34;
    --header-dark: #1b1b1b;
    --text-primary: #ffffff;
    --text-secondary: #b4b9c2;
    --border-color: #41454c;
}

/* 绿色主题 */
[data-theme="green"] {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --background-dark: #064e3b;
    --card-dark: #065f46;
    --header-dark: #064e3b;
    --text-primary: #ffffff;
    --text-secondary: #a7f3d0;
    --border-color: #047857;
}

/* 蓝色主题 */
[data-theme="blue"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --background-dark: #1e3a8a;
    --card-dark: #1e40af;
    --header-dark: #1e3a8a;
    --text-primary: #ffffff;
    --text-secondary: #bfdbfe;
    --border-color: #3b82f6;
}

/* 紫色主题 */
[data-theme="purple"] {
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --background-dark: #4c1d95;
    --card-dark: #5b21b6;
    --header-dark: #4c1d95;
    --text-primary: #ffffff;
    --text-secondary: #ddd6fe;
    --border-color: #7c3aed;
}

/* 橙色主题 */
[data-theme="orange"] {
    --primary-color: #f97316;
    --primary-hover: #ea580c;
    --background-dark: #7c2d12;
    --card-dark: #9a3412;
    --header-dark: #7c2d12;
    --text-primary: #ffffff;
    --text-secondary: #fed7aa;
    --border-color: #ea580c;
}

/* 粉色主题 */
[data-theme="pink"] {
    --primary-color: #ec4899;
    --primary-hover: #db2777;
    --background-dark: #831843;
    --card-dark: #9d174d;
    --header-dark: #831843;
    --text-primary: #ffffff;
    --text-secondary: #fbcfe8;
    --border-color: #db2777;
}

/* 主题配色 */
[data-theme="emerald"] {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --background-dark: #064e3b;
    --card-dark: #065f46;
    --header-dark: #064e3b;
    --text-primary: #ffffff;
    --text-secondary: #a7f3d0;
    --border-color: #047857;
    --primary-color-rgb: 16, 185, 129;
}

[data-theme="ocean"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --background-dark: #1e3a8a;
    --card-dark: #1e40af;
    --header-dark: #1e3a8a;
    --text-primary: #ffffff;
    --text-secondary: #bfdbfe;
    --border-color: #3b82f6;
    --primary-color-rgb: 59, 130, 246;
}

[data-theme="amethyst"] {
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --background-dark: #4c1d95;
    --card-dark: #5b21b6;
    --header-dark: #4c1d95;
    --text-primary: #ffffff;
    --text-secondary: #ddd6fe;
    --border-color: #7c3aed;
    --primary-color-rgb: 139, 92, 246;
}

/* 浅色主题 */
[data-theme="light"] {
    --primary-color: #1bb76e;
    --primary-hover: #1da462;
    --background-dark: #f3f4f6;
    --card-dark: #ffffff;
    --header-dark: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --border-color: #e5e7eb;
    --primary-color-rgb: 27, 183, 110;
}

/* 浅色主题特殊处理 */
[data-theme="light"] .theme-menu,
[data-theme="light"] .sort-menu {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .settings-button {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #1f2937;
}

[data-theme="light"] .magnet-item {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #1f2937;
}

[data-theme="light"] .search-button,
[data-theme="light"] .copy-button {
    color: #ffffff;
}

[data-theme="light"] .theme-menu-item {
    color: #1f2937;
}

[data-theme="light"] .theme-menu-item:hover {
    color: #ffffff;
}

[data-theme="light"] .sort-menu .theme-menu-item {
    color: #1f2937;
}

[data-theme="light"] .sort-menu .theme-menu-item:hover {
    color: #ffffff;
}

[data-theme="light"] input {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #1f2937;
}

[data-theme="light"] .tab-button {
    color: #6b7280;
}

[data-theme="light"] .tab-button:hover {
    color: #374151;
}

[data-theme="light"] .tab-button.active {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
}

[data-theme="light"] .notification {
    background: var(--primary-color);
    color: #ffffff;
    border: 1px solid #e5e7eb;
}

body {
    background-color: var(--background-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

.bg-header {
    background-color: var(--header-dark);
}

.bg-card {
    background-color: var(--card-dark);
}

.magnet-item {
    transition: all 0.2s ease;
    background: var(--card-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

.magnet-item:hover {
    transform: translateY(-1px);
    border-color: var(--primary-color);
}

.search-button, .copy-button {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.search-button:hover, .copy-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.search-button:active, .copy-button:active {
    transform: translateY(0);
}

.copy-button {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.copy-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.copy-button:hover::before {
    left: 100%;
}

.copy-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 183, 110, 0.2);
}

.tab-container {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--card-dark);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tab-button {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.tag[data-type="hd"] {
    background: #3b82f6;
}

.tag[data-type="subtitle"] {
    background: #22c55e;
}

.tag[data-type="uncensored"] {
    background: #ef4444;
}

.tag[data-type="chinese"] {
    background: #a855f7;
}

.tag[data-type="leak"] {
    background: #f59e0b;
}

/* 确保语言切换按钮与主题切换按钮大小一致 */
#languageToggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 修改标签颜色 */
.tag[data-type="hd"] {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}

.tag[data-type="subtitle"] {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.2);
}

.tag[data-type="uncensored"] {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.tag[data-type="chinese"] {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border-color: rgba(168, 85, 247, 0.2);
}

.tag[data-type="leak"] {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

/* 亮色主题下的标签样式微调 */
[data-theme="light"] .tag {
    opacity: 0.9;
}

/* 设置区域样式 */
.settings-container {
    position: fixed;
    top: 16px;
    right: 5%;
    display: flex;
    gap: 8px;
    z-index: 1000;
}

/* 设置按钮样式 */
.settings-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    height: 40px;
    background: var(--card-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-button svg {
    width: 20px;
    height: 20px;
}

/* 语言切换按钮文字样式 */
.language-text {
    line-height: 20px;
}

/* 主题切换按钮样式 */
#themeToggle {
    padding: 8px;
    width: 40px;
}

/* 主题菜单样式 */
.theme-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    width: max-content;
    min-width: 100px;
    z-index: 1001;
}

.theme-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    width: 100%;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

/* 亮色主题下的菜单样式 */
[data-theme="light"] .theme-menu {
    background: #ffffff;
    border-color: #e5e7eb;
}

[data-theme="light"] .theme-menu-item {
    color: #1f2937;
}

[data-theme="light"] .theme-menu-item:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
}

/* 深色主题下的菜单样式 */
[data-theme="dark"] .theme-menu {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .theme-menu-item {
    color: #ffffff;
}

[data-theme="dark"] .theme-menu-item:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
}

/* 主题选项图标颜色 */
.theme-menu-item[data-theme="dark"] svg {
    color: #94a3b8;
}

.theme-menu-item[data-theme="light"] svg {
    color: #fbbf24;
}

.theme-menu-item[data-theme="emerald"] svg {
    color: #10b981;
}

.theme-menu-item[data-theme="ocean"] svg {
    color: #3b82f6;
}

.theme-menu-item[data-theme="amethyst"] svg {
    color: #8b5cf6;
}

/* 主题选项悬停效果 */
.theme-menu-item:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
}

/* 当前选中的主题样式 */
.theme-menu-item[data-active="true"] {
    background: rgba(var(--primary-color-rgb), 0.1);
}

.theme-menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 搜索框样式修复 */
[data-theme="light"] input {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

[data-theme="light"] input::placeholder {
    color: #9ca3af;
}

#searchInput {
    background: var(--card-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
}

#searchInput::placeholder {
    color: var(--text-secondary);
}

/* 排序按钮容器样式 */
.sort-button-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/* 排序按钮样式 */
#sortButton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--card-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

#sortButton:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

#sortButton svg {
    flex-shrink: 0;
}

#sortButton span {
    white-space: nowrap;
}

/* 排序菜单样式优化 */
.sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    width: max-content;
    min-width: 120px;
    max-width: 160px;
    z-index: 100;
}

.sort-menu .theme-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    width: 100%;
    color: var(--text-primary);
    transition: all 0.2s;
    border-radius: 6px;
    font-size: 14px;
}

.sort-menu .theme-menu-item:hover {
    background: var(--primary-color);
    color: white;
}

.sort-menu .theme-menu-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sort-menu .theme-menu-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 语言切换按钮样式 */
.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    width: max-content;
    min-width: 100px;
    z-index: 1001;
}

.language-menu .theme-menu-item {
    padding: 8px 12px;
    gap: 8px;
}

.language-menu .theme-menu-item svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.language-menu .theme-menu-item span {
    flex-grow: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 当前选中的语言样式 */
.language-menu .theme-menu-item[data-active="true"] {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
}

.language-menu .theme-menu-item[data-active="true"]:hover {
    color: white;
    background: var(--primary-color);
}

/* 确保语言切换按钮与主题切换按钮大小一致 */
#languageToggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 输入框和选择框样式优化 */
input, select {
    background: var(--card-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    transition: all 0.2s ease;
    padding: 8px 12px;
}

/* 输入框占位符颜色 */
input::placeholder {
    color: var(--text-secondary);
}

/* 选择框选项样式 */
select option {
    background: var(--card-dark);
    color: var(--text-primary);
    padding: 8px;
}

/* 排序选择框样式 */
#sortSelect {
    background-color: var(--card-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 6px 28px 6px 12px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23b4b9c2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

#sortSelect:hover {
    border-color: var(--primary-color);
}

#sortSelect:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(27, 183, 110, 0.2);
}

/* 暗色主题下的输入框和选择框 */
body:not(.light-theme) input,
body:not(.light-theme) select {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

body:not(.light-theme) input:hover,
body:not(.light-theme) select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

body:not(.light-theme) input:focus,
body:not(.light-theme) select:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

body:not(.light-theme) input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 暗色主题下的选择框选项 */
body:not(.light-theme) select option {
    background: var(--background-dark);
    color: var(--text-primary);
}

/* 亮色主题下的输入框和选择框 */
body.light-theme input,
body.light-theme select {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #333333;
}

body.light-theme input::placeholder {
    color: #9ca3af;
}

body.light-theme input:hover,
body.light-theme select:hover {
    border-color: #d1d5db;
}

body.light-theme input:focus,
body.light-theme select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(27, 183, 110, 0.1);
}

body.light-theme select option {
    background: #ffffff;
    color: #333333;
}

/* 消息通知样式 */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary-color);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification svg {
    width: 20px;
    height: 20px;
}

/* 修复复制按钮点击后的文字颜色 */
[data-theme="light"] .copy-button.success {
    background: #10b981;
    color: #ffffff;
}

[data-theme="light"] .copy-button.copied {
    background: #10b981;
    color: #ffffff;
}

/* 确保复制按钮在所有状态下文字颜色保持一致 */
.copy-button,
.copy-button:hover,
.copy-button:active,
.copy-button.success,
.copy-button.copied {
    color: #ffffff;
}

[data-theme="light"] .copy-button,
[data-theme="light"] .copy-button:hover,
[data-theme="light"] .copy-button:active,
[data-theme="light"] .copy-button.success,
[data-theme="light"] .copy-button.copied {
    color: #ffffff;
}

/* 加载动画容器 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform-origin: center center;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
    display: inline-block;
}

.loading-text::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 亮色主题下的标签页容器样式 */
[data-theme="light"] .tab-container {
    background: #ffffff;
    border-color: #e5e7eb;
}

/* Logo 样式 */
.logo-container {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 50;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

.logo {
    display: inline-flex;
    align-items: center;
    font-family: Arial, sans-serif;
    font-weight: 800;
    font-size: 32px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.logo-av {
    color: #ffffff;
}

.logo-hub {
    color: #000000;
    background-color: #ff9000;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 亮色主题适配 */
[data-theme="light"] .logo-container {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .logo-av {
    color: #000000;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .logo {
        font-size: 24px;
    }
    
    .logo-container {
        padding: 2px 6px;
    }
} 

/* 语言图标样式 */
.lang-icon {
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* 回到顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    pointer-events: none;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* 视频源地址样式 */
.video-source {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.source-url {
    color: var(--text-color);
    padding: 0.25rem 0;
    word-break: break-all;
}

.copy-button {
    background: var(--primary-color);
    color: var(--bg-color);
    transition: all 0.2s;
}

.copy-button:hover {
    opacity: 0.9;
}

.copy-button.copied {
    background: var(--success-color);
}

/* 深色主题适配 */
[data-theme="dark"] .video-source {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .source-url {
    color: rgba(255, 255, 255, 0.9);
}

/* 封面图片区域样式 */
.cover-image-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    min-height: 300px; /* 添加最小高度 */
}

.cover-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.1) 25%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0.1) 75%
    );
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.cover-image {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.cover-image.loaded {
    opacity: 1;
}

/* 大图预览模态框样式 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-modal.hidden {
    display: none;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.1);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

/* 添加键盘操作提示 */
.modal-content::after {
    content: 'ESC 关闭';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* 下一个按钮样式 */
.next-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.next-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.next-button:active {
    transform: translateY(0);
}

/* 视频播放器容器样式 */
#playerTab .max-w-4xl {
    width: 100%;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 视频播放器容器 */
#playerTab .relative {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* 视频播放器过渡动画 */
#videoPlayer {
    max-height: calc(100vh - 300px); /* 减小最大高度，为按钮留出空间 */
    object-fit: contain;
    background-color: #000;
    transition: all 0.3s ease-in-out;
    min-height: 200px;
    width: 100%;
    margin: 0 auto;
}

/* 视频加载中状态 */
#videoPlayer.loading {
    opacity: 0.6;
    filter: brightness(0.8);
}

/* 下一个按钮容器 */
#playerTab .flex.justify-center {
    margin-top: 1rem;
    padding-bottom: 1rem;
    flex-shrink: 0; /* 防止按钮被压缩 */
}

/* 视频播放器过渡动画 */
#videoPlayer {
    max-height: calc(100vh - 300px); /* 减小最大高度，为按钮留出空间 */
    object-fit: contain;
    background-color: #000;
    transition: all 0.3s ease-in-out;
    min-height: 200px;
    width: 100%;
    margin: 0 auto;
}

/* 视频加载中状态 */
#videoPlayer.loading {
    opacity: 0.6;
    filter: brightness(0.8);
}

/* NSFW 警告样式 */
.nsfw-warning {
    color: #dc2626;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0.5rem;
    background-color: rgba(220, 38, 38, 0.1);
    border-radius: 0.375rem;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* 视频控制区域样式 */
.video-controls {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

/* 自动播放开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: #ccc;
    border-radius: 12px;
    transition: all 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

#autoplayToggle:checked + label .toggle-switch {
    background-color: var(--primary-color);
}

#autoplayToggle:checked + label .toggle-switch::after {
    transform: translateX(20px);
}

/* 适配移动端全屏问题 */
#videoPlayer::-webkit-media-controls {
    will-change: transform;
}

#videoPlayer::-webkit-media-controls-panel {
    display: flex !important;
    opacity: 1 !important;
}

#videoPlayer::-webkit-media-controls-play-button {
    display: flex !important;
    opacity: 1 !important;
}

/* 确保视频控件在全屏时可见 */
#videoPlayer:fullscreen::-webkit-media-controls-panel,
#videoPlayer:-webkit-full-screen::-webkit-media-controls-panel {
    display: flex !important;
    opacity: 1 !important;
}

/* 修改消息通知样式，确保在浅色主题下字体为白色 */
[data-theme="light"] .notification {
    background: var(--primary-color);
    color: #ffffff;
}

/* 特殊处理加载中状态的通知 */
[data-theme="light"] .notification.loading {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

[data-theme="light"] .notification.loading svg {
    color: #1f2937;
}

/* 优化视频播放页面在浅色主题下的对比度 */
[data-theme="light"] .video-source {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

[data-theme="light"] .source-url {
    color: #1f2937;
}

[data-theme="light"] .source-label {
    color: #4b5563;
}

[data-theme="light"] .video-controls {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

[data-theme="light"] .toggle-switch {
    background-color: #d1d5db;
}

[data-theme="light"] .nsfw-warning {
    background-color: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

/* 确保复制按钮在浅色主题下的文字颜色为白色 */
[data-theme="light"] .copy-button {
    color: #ffffff;
}

/* 确保下一个按钮在浅色主题下的文字颜色为白色 */
[data-theme="light"] .next-button {
    color: #ffffff;
}

/* 主题图标样式优化 */
[data-theme="dark"] #themeToggle svg {
    color: #94a3b8;
}

[data-theme="light"] #themeToggle svg {
    color: #fbbf24;
}

/* 修改主题菜单中的图标 */
.theme-menu-item[data-theme="dark"] svg {
    /* 月亮图标 */
    color: #94a3b8;
}

.theme-menu-item[data-theme="light"] svg {
    /* 太阳图标 */
    color: #fbbf24;
}

.theme-menu-item[data-theme="emerald"] svg {
    /* 翠绿主题图标 */
    color: #10b981;
}

.theme-menu-item[data-theme="ocean"] svg {
    /* 海蓝主题图标 */
    color: #3b82f6;
}

.theme-menu-item[data-theme="amethyst"] svg {
    /* 紫晶主题图标 */
    color: #8b5cf6;
}

/* 修复日间主题下自动播放文字颜色 */
[data-theme="light"] .autoplay-toggle label {
    color: #1f2937;
}

/* 里番合集描述文本样式 */
.collection-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding: 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    max-width: 6xl;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="light"] .collection-description {
    color: #6b7280;
}
