/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    padding: 20px; 
    font-family: Arial, sans-serif; 
    transition: background 0.3s, color 0.3s;
}
body.light {
    background: #f8f9fa;
    color: #333;
}
body.dark {
    background: #121212;
    color: #e0e0e0;
}

/* 主布局 */
.main-layout {
    display: flex;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

/* 播放器区域 */
.player-area {
    flex: 1;
    min-width: 0;
}

/* 侧边栏 - 优化：真正隐藏，不挤占播放页面 */
.sidebar {
    width: 350px;
    background: #fff;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    overflow: hidden;
    transition: transform 0.3s ease;
    transform: translateX(100%);
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    display: block;
    pointer-events: none;
}

.sidebar.show {
    transform: translateX(0);
    pointer-events: auto;
}

/* 确保播放区域不受侧边栏影响 */
.player-area {
    transition: none;
    min-width: 0;
    flex: 1;
}

.main-layout {
    position: relative;
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* 修复播放器对齐样式 */
body.player-align-left .player-wrap {
    margin: 0 0 0 0 !important;
}

body.player-align-center .player-wrap {
    margin: 0 auto !important;
}

body.player-align-right .player-wrap {
    margin: 0 0 0 auto !important;
}

/* 侧边栏切换按钮 - 优化：播放器内左上角 */
.sidebar-toggle {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
    /* 确保按钮在播放器内部 */
    pointer-events: auto;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* 侧边栏历史面板 */
.history-sidebar {
    margin: 0;
    border-radius: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.history-sidebar .log-body {
    flex: 1;
    overflow-y: auto;
    max-height: none;
}

/* 暗色主题适配 */
body.dark .sidebar {
    background: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.dark .sidebar-toggle {
    background: #3367d6;
    box-shadow: -2px 2px 5px rgba(0,0,0,0.3);
}

body.dark .sidebar-toggle:hover {
    background: #2a56c6;
}

/* 播放器容器 */
.player-wrap {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background 0.3s;
}
body.light .player-wrap {
    background: #000;
}
body.dark .player-wrap {
    background: #1e1e1e;
}

/* 视频区域（包含加载遮罩） */
.video-container {
    position: relative;
    touch-action: manipulation; /* 优化移动端触摸 */
}
video {
    width: 100%;
    height: auto;
    display: block;
}

/* 加载提示遮罩 */
.loading-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.loading-mask.show {
    opacity: 1;
    pointer-events: all;
}
.loading-mask .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4285f4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* 自定义控制栏 - 分层布局，适配移动端 */
.custom-controls {
    padding: 15px;
    transition: background 0.3s;
}
body.light .custom-controls {
    background: #1a1a1a;
    color: #fff;
}
body.dark .custom-controls {
    background: #2d2d2d;
    color: #e0e0e0;
}
.control-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.control-group {
    display: flex;
    gap: 8px;
    align-items: center;
}
.control-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
    position: relative;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.light .control-btn {
    background: #4285f4;
    color: #fff;
}
body.light .control-btn:hover {
    background: #3367d6;
}
body.dark .control-btn {
    background: #5c8ef7;
    color: #fff;
}
body.dark .control-btn:hover {
    background: #4a7de8;
}
.control-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.7;
}
.url-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

#url-input {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #333;
    border-radius: 4px;
    outline: none;
    transition: border 0.2s, background 0.3s, color 0.3s;
}

body.light #url-input {
    background: #222;
    color: #fff;
    border-color: #333;
}

body.dark #url-input {
    background: #333;
    color: #e0e0e0;
    border-color: #444;
}

#url-input:focus {
    border-color: #4285f4;
}

.url-clear-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

body.dark .url-clear-btn {
    background: rgba(255, 255, 255, 0.1);
}

.url-clear-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.url-clear-btn:hover {
    background: rgba(255, 0, 0, 0.5);
}

/* 进度条 */
.progress-wrap {
    flex: 1;
    min-width: 200px;
    height: 6px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: background 0.3s;
}
body.light .progress-wrap {
    background: #333;
}
body.dark .progress-wrap {
    background: #444;
}
.progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: background 0.3s;
}
body.light .progress-bar {
    background: #4285f4;
}
body.dark .progress-bar {
    background: #5c8ef7;
}
.progress-loaded {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 3px;
    transition: background 0.3s;
}
body.light .progress-loaded {
    background: #555;
}
body.dark .progress-loaded {
    background: #666;
}

/* 下拉选择器（倍速/画质/语言/主题） */
.select-control {
    padding: 6px 10px;
    border: 1px solid #333;
    border-radius: 4px;
    outline: none;
    font-size: 14px;
    transition: background 0.3s, color 0.3s, border 0.2s;
}
body.light .select-control {
    background: #222;
    color: #fff;
    border-color: #333;
}
body.dark .select-control {
    background: #333;
    color: #e0e0e0;
    border-color: #444;
}
.select-control:focus {
    border-color: #4285f4;
}

/* 对齐控制样式 */
.align-controls {
    display: flex;
    gap: 4px;
}

.align-btn {
    padding: 6px;
    width: 32px;
    height: 32px;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light .align-btn {
    background: #222;
    color: #fff;
    border-color: #333;
}

body.light .align-btn:hover {
    background: #333;
    border-color: #4285f4;
}

body.light .align-btn.active {
    background: #4285f4;
    border-color: #4285f4;
}

body.dark .align-btn {
    background: #333;
    color: #e0e0e0;
    border-color: #444;
}

body.dark .align-btn:hover {
    background: #444;
    border-color: #5c8ef7;
}

body.dark .align-btn.active {
    background: #5c8ef7;
    border-color: #5c8ef7;
}

/* 播放器对齐样式 */
body.player-align-left .player-wrap {
    margin: 0 0 0 0;
}

body.player-align-center .player-wrap {
    margin: 0 auto;
}

body.player-align-right .player-wrap {
    margin: 0 0 0 auto;
}

/* 音量控制 */
.volume-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}
.volume-slider {
    width: 80px;
    height: 4px;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    transition: background 0.3s;
}
body.light .volume-slider {
    background: #333;
}
body.dark .volume-slider {
    background: #444;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}
body.light .volume-slider::-webkit-slider-thumb {
    background: #4285f4;
}
body.dark .volume-slider::-webkit-slider-thumb {
    background: #5c8ef7;
}

/* 状态提示 */
.status-tip {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
    z-index: 100;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.status-tip.show {
    display: block;
}
.status-tip.success {
    background: #e8f5e9;
    color: #2e7d32;
}
.status-tip.loading {
    background: #e3f2fd;
    color: #1976d2;
}
.status-tip.error {
    background: #ffebee;
    color: #c62828;
}
.status-tip.offline {
    background: #fff3e0;
    color: #f57c00;
}
body.dark .status-tip.success {
    background: #1e3a20;
    color: #4ade80;
}
body.dark .status-tip.loading {
    background: #1a365d;
    color: #60a5fa;
}
body.dark .status-tip.error {
    background: #451a1a;
    color: #f87171;
}
body.dark .status-tip.offline {
    background: #43301a;
    color: #fbbf24;
}

/* 截图预览弹窗 */
.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.screenshot-modal.show {
    display: flex;
}
.screenshot-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}
.screenshot-img {
    max-width: 100%;
    max-height: 80vh;
    border: 2px solid #fff;
    border-radius: 4px;
}
.screenshot-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}
.screenshot-download {
    margin-top: 15px;
    padding: 8px 20px;
    background: #4285f4;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 快捷键提示 */
.shortcut-tip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 999;
    display: none;
    padding: 10px 15px;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.shortcut-tip.show {
    display: block;
}
body.light .shortcut-tip {
    background: rgba(0,0,0,0.8);
    color: #fff;
}
body.dark .shortcut-tip {
    background: rgba(30,30,30,0.9);
    color: #e0e0e0;
}
.shortcut-tip ul {
    list-style: none;
    margin: 5px 0;
}
.shortcut-tip li {
    margin: 3px 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.shortcut-tip .key {
    font-weight: bold;
    transition: color 0.3s;
}
body.light .shortcut-tip .key {
    color: #4285f4;
}
body.dark .shortcut-tip .key {
    color: #5c8ef7;
}

/* 日志面板 */
.log-panel {
    max-width: 1200px;
    margin: 15px auto 0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 12px;
    transition: background 0.3s, color 0.3s;
}

/* 日志面板对齐样式 */
body.player-align-left .log-panel {
    margin: 15px 0 0 0;
}

body.player-align-center .log-panel {
    margin: 15px auto 0;
}

body.player-align-right .log-panel {
    margin: 15px 0 0 auto;
}
body.light .log-panel {
    background: #f0f0f0;
    color: #333;
}
body.dark .log-panel {
    background: #2d2d2d;
    color: #e0e0e0;
}
.log-header {
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.history-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.sort-btn {
    position: relative;
    padding: 6px 10px;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
    background: transparent;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 悬停文字显示效果 */
.sort-btn::after {
    content: attr(data-text);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 5px;
    z-index: 1000;
}

.sort-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

body.light .sort-btn {
    color: #fff;
    border-color: #333;
}

body.light .sort-btn:hover {
    background: #333;
    border-color: #4285f4;
}

body.light .sort-btn.active {
    background: #4285f4;
    border-color: #4285f4;
}

body.dark .sort-btn {
    color: #e0e0e0;
    border-color: #444;
}

body.dark .sort-btn:hover {
    background: #444;
    border-color: #5c8ef7;
}

body.dark .sort-btn.active {
    background: #5c8ef7;
    border-color: #5c8ef7;
}
body.light .log-header {
    background: #e0e0e0;
}
body.dark .log-header {
    background: #3d3d3d;
}
.log-body {
    padding: 10px 12px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}
.log-body.show {
    display: block;
}
.log-item {
    margin: 3px 0;
    padding: 2px 0;
    border-bottom: 1px solid #eee;
}
body.dark .log-item {
    border-bottom: 1px solid #444;
}
.log-time {
    color: #888;
    margin-right: 8px;
}
.log-type-info {
    color: #4285f4;
}
.log-type-error {
    color: #ff4444;
}
.log-type-success {
    color: #2e7d32;
}
.log-clear {
    position: relative;
    font-size: 11px;
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    background: #ddd;
    color: #333;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 悬停文字显示效果 */
.log-clear::after {
    content: attr(data-text);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 5px;
    z-index: 1000;
}

.log-clear:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 播放历史项样式 - 优化：增强横线分割，突出当前播放 */
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    border-bottom: 2px solid #f0f0f0;
    transition: all 0.2s ease;
    margin: 0;
    position: relative;
    background: white;
}

body.dark .history-item {
    border-bottom: 2px solid #2a2a2a;
    background: #1e1e1e;
}

/* 更明显的分割线效果 */
.history-item:not(:last-child) {
    margin-bottom: 0;
}

/* 进一步增强当前播放项的分割效果 */
.history-item.current-playing {
    border-bottom: 2px solid #4285f4;
}

/* 突出显示当前播放的视频 */
.history-item.current-playing {
    background: rgba(66, 133, 244, 0.1) !important;
    border-left: 3px solid #4285f4;
    box-shadow: inset 0 0 10px rgba(66, 133, 244, 0.1);
}

body.dark .history-item.current-playing {
    background: rgba(66, 133, 244, 0.2) !important;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark .history-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.history-item-content {
    flex: 1;
    min-width: 0;
}

.history-item-title-container {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.history-item-title {
    font-weight: bold;
    font-size: 13px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-edit {
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 3px;
    background: transparent;
    color: #888;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    opacity: 0;
}

.history-item:hover .history-item-edit {
    opacity: 1;
}

.history-item-edit:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #4285f4;
}

body.dark .history-item-edit {
    color: #aaa;
}

body.dark .history-item-edit:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #5c8ef7;
}

.history-item-meta {
    font-size: 11px;
    color: #888;
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.history-item-playcount {
    color: #4285f4;
    font-weight: bold;
}

body.dark .history-item-playcount {
    color: #5c8ef7;
}

body.dark .history-item-meta {
    color: #aaa;
}

.history-item-url {
    font-size: 10px;
    color: #666;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark .history-item-url {
    color: #888;
}

.history-item-actions {
    display: flex;
    gap: 6px;
    margin-left: 10px;
}

.history-item-play,
.history-item-delete {
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-item-play {
    background: #4285f4;
    color: white;
}

body.light .history-item-play:hover {
    background: #3367d6;
}

body.dark .history-item-play:hover {
    background: #3c78e7;
}

.history-item-delete {
    background: #f44336;
    color: white;
}

body.light .history-item-delete:hover {
    background: #d32f2f;
}

body.dark .history-item-delete:hover {
    background: #e53935;
}

.history-empty {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px 0;
}

body.dark .history-empty {
    color: #aaa;
}

/* 居中播放按钮 */
.center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(66, 133, 244, 0.8);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 1;
    box-shadow: 0 0 20px rgba(66, 133, 244, 0.5);
}

.center-play-btn:hover {
    background: rgba(66, 133, 244, 1);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 30px rgba(66, 133, 244, 0.8);
}

.center-play-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.center-play-btn.hide {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

.center-play-btn i {
    margin-left: 6px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 移动端触摸提示 */
.touch-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.touch-tip.show {
    opacity: 1;
}

/* 图标按钮样式 */
.control-btn.icon-btn {
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* 图标按钮悬停效果 */
.control-btn.icon-btn:hover {
    transform: scale(1.1);
    transition: transform 0.2s, background 0.2s;
}

/* 隐藏控制图标旁的文字，鼠标放置时显示在按钮上方 */
.control-btn span {
    opacity: 0;
    transition: opacity 0.2s ease;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    white-space: nowrap;
    margin-bottom: 5px;
    pointer-events: none;
    z-index: 10;
}

.control-btn:hover span {
    opacity: 1;
}

/* 加载/播放按钮样式 */
#load-play-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light #load-play-btn:hover {
    background: #3367d6;
}

body.dark #load-play-btn {
    background: #5c8ef7;
}

body.dark #load-play-btn:hover {
    background: #4a7de8;
}

#load-play-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 帮助弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 0;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 16px 20px;
    background-color: #4285f4;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    line-height: 1.6;
}

.help-section {
    margin-bottom: 24px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.help-section p {
    margin: 0 0 12px 0;
    color: #666;
}

.help-section ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.help-section li {
    margin-bottom: 8px;
}

.help-section a {
    color: #4285f4;
    text-decoration: none;
    transition: color 0.2s;
}

.help-section a:hover {
    color: #3367d6;
    text-decoration: underline;
}

/* 暗色主题下的弹窗样式 */
body.dark .modal-content {
    background-color: #2d2d2d;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body.dark .help-section h3 {
    color: #fff;
}

body.dark .help-section p,
body.dark .help-section li {
    color: #ccc;
}

body.dark .help-section a {
    color: #5c8ef7;
}

body.dark .help-section a:hover {
    color: #4a7de8;
}
