* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding-top: env(safe-area-inset-top);
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-panel: #ffffff;
    --bg-hover: #e3f2fd;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e0e0e0;
    --accent-color: #2196f3cf;
    --accent-hover: #1976D2;
    --success-bg: #d4edda;
    --success-text: #155724;
    --success-border: #c3e6cb;
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --error-border: #f5c6cb;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #121212;
    --bg-panel: #2a2a2a;
    --bg-hover: #1e3a5f;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #404040;
    --accent-color: #42a5f5;
    --accent-hover: #1e88e5;
    --success-bg: #1b4d2d;
    --success-text: #7ec699;
    --success-border: #2d6a3f;
    --error-bg: #4d1f23;
    --error-text: #f0a0a8;
    --error-border: #6a2c31;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    height: 100vh;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
    overflow: hidden;
}

.container {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
}

.left-panel {
    width: 50%;
    background: var(--bg-panel);
    border-right: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: background 0.3s, border-color 0.3s;
}

.panel-header,
.panel-header-right {
    padding: 10px 15px;
    background: var(--bg-panel);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    top: 0px;
    z-index: 100;
    box-shadow: var(--shadow);
}

.panel-header-right {
    flex: 0 0 100%;
    position: sticky;
    top: 0;
}

.panel-header h2,
.panel-header-right h2 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.theme-toggle {
    padding: 10px;
    background: var(--border-color);
    color: var(--accent-color);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.refresh-btn {
    padding: 10px;
    background: var(--border-color);
    color: var(--accent-color);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.article-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.article-item {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(to right, rgb(33 150 243 / 43%), rgb(178 161 229 / 0%), rgb(163 138 238 / 0%));
    box-shadow: 3px 5px 5px #4baaf521;
}

.article-item:hover {
    background: var(--bg-hover);
    border-left-color: #2196f391;
    border-left-width: 15px;
    transform: translateX(5px);
}

.article-item.selected {
    background: rgb(33 150 243 / 43%);
}

.article-title {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.4;
}

.article-title-en {
    color: var(--text-primary);
    margin-bottom: 4px;
}

.article-title-zh {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.article-filename {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-link {
    font-size: 12px;
    color: var(--accent-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.article-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.resize-handle {
    width: 2px;
    cursor: col-resize;
    background: transparent;
    transition: background 0.2s;
    position: relative;
    z-index: 10;
}

.resize-handle:hover {
    background: var(--accent-color);
}

.resize-handle:active {
    background: var(--accent-hover);
}

.right-panel {
    overflow-y: auto;
    background: var(--bg-panel);
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.function-section {
    background: var(--bg-panel);
    padding: 10px 15px;
    margin: 10px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    flex: 0 1 30%;
    min-width: 200px;
}

.function-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.function-section h3 {
    margin-bottom: 10px;
    color: var(--accent-color);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.btn {
    padding: 6px 12px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 auto;
    display: block;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.message {
    padding: 12px 16px;
    margin-top: 15px;
    border-radius: 12px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.3s, transform 0.3s;
}

.message.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.message.success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.message.error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

.loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    color: var(--accent-color);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .container {
        flex-direction: column;
    }

    .left-panel {
        width: 100% !important;
        height: 100vh;
        border-right: none;
    }

    .resize-handle {
        display: none;
    }

    .right-panel {
        display: block;
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100vh;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s 0.3s;
    }

    .panel-header {
        padding: 10px 25px !important;
        position: sticky !important;
        top: 0;
        z-index: 100 !important;
        /*        padding-top: calc(5px - env(safe-area-inset-top, 0)) !important;*/
    }

    .panel-header h2,
    .panel-header-right h2 {
        font-size: 20px;
        text-align: center;
        margin: 0 auto 5px;
        display: none;
        color: var(--text-primary);
    }

    .function-section {
        padding: 10px 15px;
        margin: 10px 20px;
    }

    .article-list {
        margin: 10px;
    }

    .article-item {
        padding: 12px;
    }

    .header-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .theme-toggle,
    .refresh-btn {
        font-size: 13px;
    }

    .function-section h3 {
        font-size: 16px;
    }

    .btn {
        width: 40%;
        padding: 10px 20px;
        justify-content: center;
    }

    .article-text h1 {
        font-size: 25px !important;
    }

    .article-modal-content {
        border-radius: 0px !important;
        width: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        text-align: justify !important;
    }

    .article-text {
        font-size: 16px !important;
        margin-top: 60px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.login-header h1 {
    margin: 10px 0;
    color: #333;
    font-size: 24px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-form {
    margin-top: 20px;
}

.login-form .form-group {
    margin-bottom: 20px;
}


.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    background: #fee;
    color: #c33;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.logout-btn {
    background: #fee;
    color: #c33;
    padding: 10px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn:hover {
    background: #c33;
    color: white;
}

/* 暗色主题下的登录框 */
[data-theme="dark"] .login-box {
    background: #2a2a2a;
}

[data-theme="dark"] .login-header h1 {
    color: #fff;
}

[data-theme="dark"] .login-header p {
    color: #aaa;
}

[data-theme="dark"] .login-form label {
    color: #fff;
}

[data-theme="dark"] .login-form input {
    background: #3a3a3a;
    border-color: #4a4a4a;
    color: #fff;
}

/* 刷新特效 */
.article-list.refreshing {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.article-list.refreshing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        #667eea 50%,
        transparent 100%);
    animation: loading-bar 1.5s ease-in-out infinite;
    z-index: 10;
}

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

    100% {
        transform: translateX(100%);
    }
}

.article-list.refreshing::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.8) 100%);
    animation: shimmer 1.5s ease-in-out infinite;
    z-index: 5;
}

[data-theme="dark"] .article-list.refreshing::after {
    background: linear-gradient(180deg,
        rgba(42, 42, 42, 0.8) 0%,
        rgba(42, 42, 42, 0.6) 50%,
        rgba(42, 42, 42, 0.8) 100%);
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* 刷新按钮旋转动画 */
.refresh-btn.spinning i {
    animation: spin 0.6s linear;
}

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

    to {
        transform: rotate(360deg);
    }
}

*::-webkit-scrollbar {
    display: none;
}

#latestMessage {
	font-size: 14px;
    word-wrap: break-word;
    transition: opacity 0.3s ease;
    line-height: 1.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    position: fixed;
    align-items: center;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 25px;
    text-align: center;
}

#latestMessage:empty {
    display: none;
}


.article-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.dialog-content {
    padding: 24px;
}

.dialog-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #111827;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.expand-btn {
    padding: 10px;
    background: var(--border-color);
    color: var(--accent-color);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}



/* 图文卡片模式容器 */
#articleList.card-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 20px;
    padding: 10px;
    align-content: start;
}

/* 卡片样式 */
#articleList.card-view .article-card {
    background: var(--bg-panel);
    border-radius: 10px;
    box-shadow: 3px 4px 2px #7e7e7e14;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    /*    height: fit-content;*/
}

#articleList.card-view .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 卡片图片 */
.article-card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 10px 10px 0 0;
}

.article-card-image i {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 图片加载失败时的处理 */
.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 卡片内容 */
.article-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-title-en {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-title-zh {
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片底部操作栏 */
.article-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-color, #eee);
}

.article-card-buttons {
    display: flex;
    gap: 10px;
}

.card-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted, #999);
    transition: color 0.3s, transform 0.2s;
    padding: 5px;
}

.card-action-btn:hover {
    transform: scale(1.2);
}

.card-action-btn.liked {
    color: #ff4757;
}

.card-action-btn.bookmarked {
    color: #ffa502;
}

.article-card-filename {
    font-size: 11px;
    color: var(--text-muted, #999);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 隐藏列表模式下的文章项 */
#articleList.card-view .article-item {
    display: none;
}

/* 卡片选中状态 */
#articleList.card-view .article-card.selected {
    box-shadow: 0 8px 6px #80808061;
    transform: scale(1.01, 1.01);
}

#articleList.card-view .article-card {
    border: 2px solid transparent;
}


/* 确保图片容器可以包含绝对定位元素 */
.article-card-image {
    position: relative;
    overflow: hidden;
    /* 保持按钮在图片内部 */
}

/* 按钮包装器 - 覆盖在图片顶部 */
.floating-buttons-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px;
    animation: fadeIn 0.3s ease-out;
    width: 100%;
    height: 180px;
}

/* 浮动按钮容器 */
.floating-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    margin-top: 50px;
}

/* 按钮样式 - 半透明玻璃效果 */
.floating-buttons .btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 25px;
    background: color-mix(in srgb, var(--bg-panel), transparent 30%);
    color: var(--text-primary, #333);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 按钮图标 */
.floating-buttons .btn-icon {
    font-size: 16px;
    margin-top: 5px;
}

.floating-buttons-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: color-mix(in srgb, var(--bg-panel), transparent 30%);
    z-index: 1;
    outline: none;
}

/* 按钮悬停效果 */
.floating-buttons .btn:hover {
    /*    background: rgba(255, 255, 255, 1);*/
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.floating-buttons .btn:active {
    transform: translateY(0);
}

.article-card.selected {
    box-shadow: 0 0 0 2px #007bff;
    border-radius: inherit;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 480px) {
    .floating-buttons {
        gap: 5px;
    }

    .floating-buttons .btn {
        padding: 6px 10px;
        font-size: 12px;
        width: 40%;
    }

    .floating-buttons .btn-text {
        display: none;
    }

    .floating-buttons .btn-icon {
        font-size: 18px;
    }
}

/* 加载特效样式 */
.article-loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(4px);
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

/* 文章弹层样式 */
.article-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.article-modal-content {
    background: var(--bg-primary);
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 98vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: absolute;
}

.article-modal-header {
    padding: 15px;
    border-bottom: 1px solid #7575752b;
}

.article-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    width: 90%;
    margin: 0 auto;
}

.lang-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.lang-btn:hover {
    background: #e8e8e8;
    border-color: #999;
    color: #333;
}

.lang-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.lang-btn i {
    font-size: 14px;
}

.close-btn {
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    flex-shrink: 0;
    background: #9e9e9e47;
    border-radius: 50%;
}

.close-btn:hover {
    color: #000;
}

.article-modal-body {
    flex: 1;
    overflow-y: auto;
}

.article-text {
    line-height: 1.8;
    font-size: 18px;
    color: #333;
}

.article-text h1 {
    margin: 10px 15px;
    line-height: 30px;
    font-size: 28px;
    color: var(--text-primary);
    text-align: center;
}

.article-text .section-title {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: bold;
    color: #222;
}

.article-text .section-author {
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
    padding: 0 15px;
    text-align: center;
}

.article-text .section-image {
    margin-bottom: 20px;
    text-align: center;
}

.article-text .section-image img {
    max-width: 100%;
    height: auto;
}

.article-text .org-line {
    color: var(--text-primary);
    padding-bottom: 5px;
}

.article-text .trans-line {
    margin-bottom: 10px;
    color: #0066cc;
    text-align: justify;
    letter-spacing: 1px;
    border-bottom: 1px #6a6a6a1a solid;
    padding-bottom: 10px;
}

.org-line p,
.trans-line p {
    padding: 0 15px;
    text-autospace: normal;
}

.org-line img {
    display: inline-block;
    width: 100%;
    height: 100%;
}

.org-line span,
.trans-line span {
    display: block;
    font-size: 12px;
    font-style: italic;
    padding: 0 15px;
    margin: 0;
    color: #666666;
}

.article-text .section-link {
    padding: 0 15px;
    margin: 10px 0;
    position: absolute;
    bottom: -10px;
    right: 0;
}

.article-text .section-link a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 14px;
    word-break: break-all;
    transition: text-decoration 0.3s;
}

.article-text .section-link a:hover {
    text-decoration: underline;
}

.article-modal-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: center;
}

.article-modal-footer button {
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.article-modal-footer button:hover {
    background: #f0f0f0;
    border-color: #999;
}

.close-modal-btn {
    background: #4CAF50 !important;
    color: white !important;
    border-color: #4CAF50 !important;
}

.close-modal-btn:hover {
    background: #45a049 !important;
}

.article-text h3,
.trans-line h3 {
    font-size: 20px;
    border-left: 3px #ff0000 solid;
    padding-left: 12px;
    line-height: 25px;
}

blockquote {
    display: block;
    margin: 10px 15px 0 25px;
    background: ##575752b;
    border-radius: 10px;
    padding: 10px 0;
    color: var(--text-primary);
    text-align: justify;
    font-size: 15px;
}

blockquote h3 {
    border: none !important;
    padding: 5px 0;
    font-size: 18px !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-modal-header {
        display: inline-table;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 15px !important;
        position: absolute;
        background: var(--bg-panel);
        width: 100%;
    }

    .article-modal-header h2 {
        width: 100%;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }

    .lang-btn {
        font-size: 12px;
        padding: 5px 8px;
    }
}

.summaries {
    display: block;
    margin: 5px 10px 20px;
    border-radius: 10px;
    padding: 10px 1px;
    font-size: 15px;
    position: relative;
    background: #71717124;
}

.summaries::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 7px;
    height: 100%;
    border-radius: 16px 0 0 16px;
    background-color: #71717145;
    z-index: 1;
}

.summaries .org-line,
.summaries .trans-line {
    padding: 0 0 5px 0;
    margin: 0px;
    line-height: 25px;
    letter-spacing: 1px;
    text-align: justify;
    border-bottom: none;
}

.org-line ul,
.trans-line ul {
    margin: 5px 15px 5px 20px;
}

.org-line ul li,
.trans-line ul li {
    margin-left: 15px;
    list-style-type: circle;
}

/* 默认隐藏 */
.show-btn,
.hidden-btn {
    display: none;
    padding: 10px;
    background: var(--border-color);
    color: var(--accent-color);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    font-size: 14px;
    align-items: center;
    gap: 6px;
}

.right-panel.show {
    z-index: 999;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s 0s;
}

/* 移动端自动显示 */
@media screen and (max-width: 768px) {

    .show-btn,
    .hidden-btn {
        display: flex !important;
    }

    .panel-header-right {
        padding: 10px 10px;
    }

    .summaries {
        font-size: 14px !important;
    }

}

.like-filter-btn,
.bookmark-filter-btn {
    padding: 10px;
    background: var(--border-color);
    color: var(--accent-color);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-dialog {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    background: var(--bg-primary);
    color: var(--text-primary);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.article-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.dialog-content {
    padding: 0;
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.dialog-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.close-btn:hover {
    background: #f3f4f6;
}

form {
    padding: 5px 15px 20px;
}

.task-mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 20px;
}

.mode-btn {
    flex: 1;
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    width: fit-content;
    max-width: 36%;
    margin: 0 auto;
}

.mode-btn:hover {
    border-color: #3b82f6;
}

.mode-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.task-count-selector {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #74747414;
    border-radius: 20px;
}

.task-count-selector.active {
    display: flex;
}

.task-count-selector label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.task-count-input {
    width: 80px;
    padding: 6px 12px;
    border: 1px solid #3b82f6;
    border-radius: 20px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db59;
    border-radius: 20px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.input-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.task-inputs {
    display: none;
}

.task-inputs.active {
    display: block;
}

.task-item {
    margin-bottom: 10px;
    padding: 16px;
    background: #7474744f;
    border-radius: 20px;
}

.task-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.task-number {
    font-weight: 600;
    color: #3b82f6;
}

.remove-task-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 4px 8px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.remove-task-btn:hover {
    background: #fecaca;
}

.dialog-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    ;
}

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

    to {
        transform: rotate(360deg);
    }
}