/* 全局基础样式 */
body { background-color: #f4f7f6; margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* 顶部工具栏 */
.top-bar {
    margin-top: 80px;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.top-dynamic-title { margin: 0; font-size: 1.3rem; color: #2c3e50; font-weight: bold; }

/* 搜索区域 */
.search-box {
    display: flex;
    align-items: center;
    background: #f5f6f7;
    border-radius: 8px;
    padding: 4px 12px;
    border: 1px solid #ddd;
}

.search-box input { border: none; background: transparent; outline: none; width: 220px; padding: 8px 0; font-size: 0.9rem; }

/* 插件卡片容器 */
.script-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 25px;
}

.script-card {
    position: relative; /* 角标定位基准 */
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column; 
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid #efefef;
    transition: all 0.3s ease;
    height: 195px;
    box-sizing: border-box;
}

.script-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: #4a69bd;
}

/* 媒体角标样式 */
.badge-media {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #ff7675, #d63031);
    color: white;
    padding: 3px 12px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 14px 0 14px 0;
    z-index: 5;
}

/* 内容布局 */
.card-top-info { display: flex; flex-direction: row; align-items: flex-start; flex-grow: 1; margin-top: 8px; }
.card-left { flex-shrink: 0; width: 64px; height: 64px; margin-right: 18px; }

.script-logo, .script-avatar,.script-avatar-fenfa {
    width: 64px; height: 64px; line-height: 64px;
    border-radius: 12px; object-fit: cover; display: block;
}

.script-avatar {
    background: linear-gradient(135deg, #6a89cc, #4a69bd);
    color: white; font-size: 26px; font-weight: bold; text-align: center;
}
.script-avatar-fenfa {
    background: linear-gradient(135deg, #1ebbaa, #000000);
    color: white; font-size: 26px; font-weight: bold; text-align: center;
}
.card-right { flex-grow: 1; overflow: hidden; }
.card-right h3 { margin: 0 0 6px 0; font-size: 1.1rem; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-right p { 
    font-size: 0.82rem; color: #7f8c8d; line-height: 1.5; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* 按钮样式 */
.install-btn {
    width: 100%; background: #f8f9fa; color: #4a69bd; border: 1px solid #e1e4e8;
    padding: 9px 0; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; margin-top: 15px; transition: 0.2s;
}

.install-btn:hover { background: #4a69bd; color: #fff; border-color: #4a69bd; }
.install-btn:disabled { background: #eee; color: #bbb; border-color: #ddd; cursor: not-allowed; }

/* 分页 */
.pagination-wrapper { margin: 40px 0; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.total-count-badge { font-size: 0.85rem; color: #95a5a6; background: #eee; padding: 4px 15px; border-radius: 20px; }
.pagination-container { display: flex; justify-content: center; gap: 8px; }
.page-item { padding: 8px 16px; background: #fff; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; }
.page-item.active { background: #4a69bd; color: #fff; border-color: #4a69bd; }

/* 底部 */
.footer-area { margin-top: 20px; padding: 50px 20px; text-align: center; background: #fff; border-top: 1px solid #eee; }
.btn-upload-trigger {
    display: inline-block; padding: 12px 45px; background: #27ae60; color: white;
    text-decoration: none; border-radius: 30px; font-weight: bold; margin-bottom: 25px; transition: 0.3s;
}
.btn-upload-trigger:hover { background: #219150; transform: scale(1.05); }
.copyright-text { color: #bdc3c7; font-size: 0.85rem; }

/* 模态框 */
.modal-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; justify-content: center; align-items: center; z-index: 9999; }
.modal-content { background: #fff; padding: 30px; border-radius: 15px; width: 90%; max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }

.js-hidden { display: none !important; }