/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #fce4ec 0%, #e0f2fe 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #1f2937;
    line-height: 1.6;
    transition: background 0.3s ease;
    min-height: 100vh;
    position: relative;
}

/* 内容区域样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
}

/* 插件卡片样式 */
.plugin-card {
    background: rgba(249, 250, 251, 0.98);
    backdrop-filter: blur(5px);
}

/* 增强横幅区域的不透明度 */

/* 保持横幅的渐变效果 */
.banner {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.95) 0%, rgba(219, 39, 119, 0.95) 100%);
    color: white;
}

/* 确保所有内容区块对齐 */
.header,
.search-sort-container,
.search-container,
.plugins-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* 统一内容区块的对齐 */
.banner,
.search-container {
    width: 100%;
    box-sizing: border-box;
}

/* 搜索和排序容器样式 */
.search-sort-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 24px;
    gap: 8px;
    width: 100%;
    /* 禁止换行，确保所有按钮在同一行 */
    flex-wrap: nowrap;
}

/* 确保PC端三个按钮间距一致 */
@media (min-width: 769px) {
    .sort-container {
        display: flex;
        gap: 8px;
    }
    
    .submit-btn {
        margin-left: 8px;
    }
}

/* 确保搜索框不会占满整个宽度，给按钮留出空间 */
.search-container {
    flex: 1;
    min-width: 150px;
    /* 搜索框自适应大小 */
    max-width: calc(100% - 200px);
}

/* 按钮容器样式，确保所有按钮在最右边显示 */
.buttons-container {
    display: flex;
    align-items: center;
    gap: 8px;
    /* 禁止换行，确保所有按钮在同一行 */
    flex-wrap: nowrap;
    /* 按钮容器靠右 */
    flex-shrink: 0;
}

/* 调整PC端按钮间距，确保三个按钮在同一行 */
@media (min-width: 769px) {
    .buttons-container {
        gap: 8px;
    }
    
    .sort-container {
        display: flex;
        gap: 8px;
    }
    
    .submit-btn {
        margin-left: 0;
    }
}

/* 移动端优化 */
@media (max-width: 767px) {
    .container {
        padding: 0 12px;
        margin: 10px auto;
    }
    
    .search-sort-container {
        /* 保持一行显示，禁止换行 */
        flex-direction: row;
        align-items: center;
        gap: 8px;
        /* 搜索框在左，按钮在右 */
        justify-content: space-between;
    }
    
    .search-container {
        /* 搜索框自适应大小 */
        flex: 1;
        min-width: 100px;
        max-width: calc(100% - 150px);
    }
    
    .sort-container {
        /* 按钮容器靠右 */
        flex: 0 0 auto;
        /* 确保按钮在一行显示 */
        display: flex;
        gap: 8px;
        margin: 0;
    }
    
    .submit-container {
        /* 发布按钮和排序按钮在同一行 */
        flex: 0 0 auto;
        margin: 0;
    }
    
    .banner {
        padding: 24px 16px;
    }
    
    .banner h1 {
        font-size: 2rem;
    }
    
    .plugin-card {
        padding: 16px;
        gap: 12px;
    }
}

/* 搜索容器样式 */
.search-container {
    position: relative;
    margin-bottom: 0;
    max-width: 100%;
    flex: 1;
    min-width: 150px;
    height: 40px;
}

/* 确保搜索框与卡片内容对齐 */
.search-input {
    width: 100%;
    box-sizing: border-box;
}

/* 排序按钮样式 */
.sort-container {
    display: flex;
    gap: 8px;
}

/* 发布按钮容器样式 */
.submit-container {
    display: flex;
    align-items: center;
}

/* 发布按钮样式 - 与排序按钮保持一致 */
.submit-btn {
    padding: 0 18px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 发布按钮悬停效果 */
.submit-btn:hover {
    border-color: #ec4899;
    color: #ec4899;
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.15);
}

/* 发布按钮激活状态 */
.submit-btn.active {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    border-color: #ec4899;
    color: white;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.sort-btn {
    padding: 0 18px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    backdrop-filter: blur(5px);
}

.sort-btn:hover {
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

/* 最新按钮 - 浅绿色 */
.sort-btn:nth-child(1):hover {
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

.sort-btn:nth-child(1).active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* 热门按钮 - 橙黄色 */
.sort-btn:nth-child(2):hover {
    border-color: #f59e0b;
    color: #f59e0b;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.sort-btn:nth-child(2).active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* 头部横幅样式 */
.header {
    margin-bottom: 20px;
}

.banner {
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    padding: 32px 20px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    z-index: 0; /* 确保伪元素在底层 */
}

.banner h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.banner p {
    font-size: 1.1rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* 确保主题切换器在banner内容之上 */
.banner .theme-switcher {
    z-index: 1001;
}

/* 警告提示样式已移除 */

/* 搜索栏样式 */
.search-container {
    position: relative;
    margin-bottom: 0;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    height: 40px;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 16px;
    font-size: 0.95rem;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.search-input:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* 插件容器样式 */
.plugins-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(calc(100% - 20px), 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* 平板端优化 */
@media (min-width: 768px) {
    .plugins-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

/* 桌面端优化 */
@media (min-width: 1024px) {
    .plugins-container {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 24px;
    }
}

/* 大屏桌面端 */
@media (min-width: 1400px) {
    .plugins-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 插件卡片样式 */
.plugin-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    min-height: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.plugin-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.95);
}

/* 顶部行：图标和标题 */
.plugin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    width: 100%;
}

/* 插件卡片头部内容区域 */
.plugin-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 插件名称和作者的容器 */
.plugin-name-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.plugin-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.6rem;
    color: #1f2937;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.plugin-icon:hover::before {
    left: 100%;
}

.plugin-icon:hover {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 标题和内容区域 */
.plugin-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plugin-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    flex: 1;
}

.plugin-author {
    font-size: 0.75rem;
    color: #4b5563;
    margin: 0;
    padding: 2px 8px;
    text-align: right;
    background: rgba(243, 244, 246, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: inline-block;
    white-space: nowrap;
}

/* 多个作者容器样式 */
.plugin-author-multiple {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #4b5563;
    margin: 0;
    padding: 2px 8px;
    text-align: right;
    background: rgba(243, 244, 246, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    max-width: 200px;
}

/* 作者徽章样式 */
.author-badge {
    position: relative;
    background: rgba(156, 163, 175, 0.8);
    color: white;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.author-badge:hover {
    background: rgba(107, 114, 128, 0.8);
    transform: scale(1.05);
}

/* 作者提示框样式 */
.author-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    min-width: 150px;
    max-width: 200px;
    padding: 8px;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* 提示框显示 */
.author-badge:hover .author-tooltip {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* 提示框内作者项样式 */
.author-tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-item {
    font-size: 0.75rem;
    color: #374151;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    text-align: left;
}

.author-item:hover {
    background: rgba(236, 72, 153, 0.1);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

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

/* 图标预览和操作样式 */
.icon-preview {
    margin-bottom: 12px;
}

.icon-display {
    width: 60px;
    height: 60px;
    background: rgba(236, 72, 153, 0.1);
    border: 2px dashed #ec4899;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 12px;
}

.icon-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-cancel:hover {
    background: #e5e7eb;
    color: #374151;
}

.btn-save {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

/* 夜间模式适配 */
body.dark .plugin-author-multiple {
    background: rgba(47, 61, 83, 0.8);
    color: #b0b0b0;
}

body.dark .author-badge {
    background: rgba(107, 114, 128, 0.8);
}

body.dark .author-badge:hover {
    background: rgba(156, 163, 175, 0.8);
}

body.dark .author-tooltip {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(51, 65, 85, 0.3);
}

body.dark .author-item {
    color: #ffffff;
}

body.dark .author-item:hover {
    background: rgba(37, 99, 235, 0.2);
}

/* 描述左对齐 */
.plugin-description {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    flex-shrink: 0;
}

/* 底部区域：包含更新时间和安装按钮 */
.plugin-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    width: 100%;
    gap: 12px;
    flex-wrap: wrap;
}

/* 更新时间左对齐 */
.update-time {
    text-align: left;
    font-size: 0.8rem;
    color: #9ca3af;
    margin: 0;
    padding: 0;
    align-self: flex-end;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 安装按钮行：右对齐 */
.install-row {
    display: flex;
    justify-content: flex-end;
    align-self: flex-end;
    flex-shrink: 0;
}

/* 安装按钮样式 */
.install-btn {
    background: rgba(252, 231, 178, 0.95);
    color: #b45309;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    align-self: center;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.15);
    min-width: 60px;
    text-align: center;
}

.install-btn:hover {
    background: rgba(252, 211, 77, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.2);
}

.install-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .banner {
        padding: 24px 16px;
    }
    
    .banner h1 {
        font-size: 2rem;
    }
    
    .banner p {
        font-size: 1rem;
    }
    
    /* 搜索和排序容器响应式调整 */
    .search-sort-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .search-container {
        flex: 1;
        min-width: 150px;
    }
    
    .sort-container {
        flex: 0 0 auto;
        margin-right: auto;
        margin-left: 8px;
    }
    
    .submit-container {
        flex: 0 0 auto;
        margin-left: auto;
    }
    
    .sort-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    /* 移动端恢复单列布局 */
    .plugins-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .plugin-card {
        padding: 18px;
        min-height: auto;
    }
    
    .plugin-header {
        gap: 14px;
    }
    
    .plugin-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .plugin-name {
        font-size: 1.15rem;
    }
    
    .plugin-description {
        -webkit-line-clamp: 2;
        font-size: 0.9rem;
    }
    
    .plugin-meta {
        /* 移动端保持水平布局，时间左对齐，按钮右对齐 */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        margin-top: 8px;
    }
    
    .update-time {
        font-size: 0.75rem;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .install-btn {
        align-self: center;
        padding: 8px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    /* 安装按钮行在移动端的处理 */
    .install-row {
        align-self: center;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #6b7280;
}

.loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top-color: #ec4899;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #374151;
}

.empty-state p {
    font-size: 0.95rem;
}

/* 主题切换按钮样式 */
.theme-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1001; /* 确保在最上层 */
}

.theme-btn {
    background: rgba(249, 250, 251, 0.98);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: scale(1.1);
}

/* 主题图标样式 */
.theme-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* 夜间主题样式 */
body.dark {
    background: #000000;
    color: #ffffff;
}

body.dark .banner {
    background: rgba(33, 33, 33, 0.95);
    color: #ffffff;
    border-color: rgba(66, 66, 66, 0.3);
}

body.dark .plugin-card {
    background: #1e1e1e;
    border-color: #333333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark .plugin-card:hover {
    background: #252525;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark .search-sort-container {
    background: #000000;
    border-radius: 8px;
    padding: 8px;
}

body.dark .search-container {
    background: #000000;
}

body.dark .sort-container {
    background: #000000;
}

body.dark .sort-btn {
    background: #1e1e1e;
    border-color: #333333;
    color: #b0b0b0;
}

body.dark .sort-btn:hover {
    background: #252525;
    border-color: #444444;
    color: #ffffff;
}

body.dark .search-input {
    background-color: #1e1e1e;
    border-color: #333333;
    color: #ffffff;
}

body.dark .search-input::placeholder {
    color: #888888;
}

body.dark .plugin-icon {
    background: #2a2a2a;
    border-color: #444444;
    color: #ffffff;
}

body.dark .plugin-name {
    color: #ffffff;
}

body.dark .plugin-author {
    background: #2a2a2a;
    color: #b0b0b0;
}

body.dark .plugin-description {
    color: #a0a0a0;
}

body.dark .update-time {
    color: #888888;
}

body.dark .install-btn {
    background: #2563eb;
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

body.dark .install-btn:hover {
    background: #3b82f6;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

body.dark .theme-btn {
    background: #1e1e1e;
    border-color: #333333;
    color: #b0b0b0;
}

body.dark .theme-btn:hover {
    background: #252525;
}

body.dark .theme-dropdown-menu {
    background: #1e1e1e;
    border-color: #333333;
}

body.dark .theme-dropdown-item {
    background: transparent;
    color: #b0b0b0;
}

body.dark .theme-dropdown-item:hover {
    background: #252525;
    color: #ffffff;
}

body.dark .theme-dropdown-item.active {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

body.dark .empty-state {
    color: #888888;
}

body.dark .empty-state h3 {
    color: #ffffff;
}

/* 夜间模式适配 */
body.dark .sort-btn:nth-child(1).active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

body.dark .sort-btn:nth-child(2).active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* 自定义成功提示弹窗样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 90%;
    width: 400px;
    z-index: 3000;
    animation: toastSlideIn 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 弹窗显示动画 */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 弹窗内容样式 */
.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* 弹窗图标样式 */
.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* 弹窗消息样式 */
.toast-message {
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
}

/* 关闭按钮样式 */
.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* 关闭按钮悬停效果 */
.toast-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* 夜间模式下的弹窗样式 */
body.dark .toast {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(51, 65, 85, 0.3);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body.dark .toast-message {
    color: #ffffff;
}

body.dark .toast-close {
    color: #9ca3af;
}

body.dark .toast-close:hover {
    background: #374151;
    color: #e5e7eb;
}

/* 夜间模式下的发布插件模态框样式 */
body.dark .modal {
    background: rgba(0, 0, 0, 0.7);
}

body.dark .modal-content {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(51, 65, 85, 0.3);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body.dark .modal-header h2 {
    color: #ffffff;
}

body.dark .close-btn {
    color: #9ca3af;
}

body.dark .close-btn:hover {
    background: #374151;
    color: #e5e7eb;
}

body.dark .form-group label {
    color: #ffffff;
}

body.dark .form-group input,
body.dark .form-group textarea {
    background: #1e293b;
    border-color: #334155;
    color: #ffffff;
}

body.dark .form-group input:focus,
body.dark .form-group textarea:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

body.dark .form-group input::placeholder,
body.dark .form-group textarea::placeholder {
    color: #94a3b8;
}

body.dark .modal-footer {
    background: #1e293b;
    border-top-color: #334155;
}

body.dark .btn {
    border-color: #334155;
}

body.dark .btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

body.dark .btn-secondary {
    background: #334155;
    color: #ffffff;
    border-color: #475569;
}

body.dark .btn-secondary:hover {
    background: #475569;
}

body.dark .btn-cancel {
    background: #334155;
    color: #94a3b8;
    border-color: #475569;
}

body.dark .btn-cancel:hover {
    background: #475569;
    color: #ffffff;
}

body.dark .btn-save {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

body.dark .icon-preview {
    color: #ffffff;
}

body.dark .icon-display {
    background: rgba(30, 41, 59, 0.8);
    border-color: #475569;
    color: #ffffff;
}

/* 夜间模式下的发布按钮样式 - 与排序按钮保持一致 */
body.dark .submit-btn {
    background: #1e1e1e;
    border-color: #333333;
    color: #b0b0b0;
}

body.dark .submit-btn:hover {
    background: #252525;
    border-color: #444444;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.15);
}

body.dark .submit-btn.active {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    border-color: #ec4899;
    color: white;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}