/* PanBox - 网盘链接管理插件样式 */
/* Version: 1.5.0 */

/* ========== 下载信息栏 ========== */
.pb-download-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin: 20px 0;
    overflow: hidden;
}

/* ========== 头部（可点击展开/闭合）========== */
.pb-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.pb-bar-header:hover {
    background: rgba(99,102,241,0.04);
}

.pb-bar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.pb-bar-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #94a3b8;
}

.pb-bar-toggle svg {
    transition: transform 0.3s;
}

.pb-download-bar.open .pb-bar-toggle svg {
    transform: rotate(180deg);
}

/* ========== 内容区（可折叠）========== */
.pb-bar-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 20px;
}

.pb-download-bar.open .pb-bar-body {
    max-height: 600px;
    padding: 0 20px 20px;
}

/* ========== 元信息 ========== */
.pb-download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.pb-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.pb-meta-label {
    color: #94a3b8;
    font-size: 12px;
}

.pb-meta-value {
    color: #334155;
    font-weight: 500;
}

/* ========== 下载卡片网格 ========== */
.pb-download-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

/* ========== 单个下载卡片 ========== */
.pb-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    text-align: center;
    cursor: pointer;
    position: relative;
    min-height: 100px;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s cubic-bezier(.4,0,.2,1);
}

/* 光泽叠加层 */
.pb-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

.pb-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    color: #fff;
    text-decoration: none;
}

.pb-card:hover::before {
    left: 100%;
}

/* 按下效果 */
.pb-card:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 图标 */
.pb-card-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 6px;
    fill: currentColor;
    opacity: 0.95;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
    transition: transform 0.25s;
}

.pb-card:hover .pb-card-icon {
    transform: scale(1.15);
}

/* 网盘名称 */
.pb-card-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* 提取码 */
.pb-card-passwd {
    font-size: 12px;
    opacity: 0.92;
    background: rgba(255,255,255,0.22);
    padding: 2px 10px;
    border-radius: 4px;
    margin-top: 5px;
    user-select: all;
    cursor: text;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.pb-card:hover .pb-card-passwd {
    background: rgba(255,255,255,0.32);
}

.pb-card-passwd::before {
    content: "提取码 ";
    opacity: 0.7;
}

/* 下载次数 */
.pb-card-count {
    font-size: 10px;
    opacity: 0.65;
    margin-top: 3px;
}

/* 无提取码 */
.pb-card-nopasswd {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 3px;
}

/* ========== 深色模式 ========== */
[data-theme="dark"] .pb-download-bar {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .pb-bar-header:hover {
    background: rgba(99,102,241,0.06);
}
[data-theme="dark"] .pb-bar-title {
    color: #e2e8f0;
}
[data-theme="dark"] .pb-meta-label {
    color: #94a3b8;
}
[data-theme="dark"] .pb-meta-value {
    color: #e2e8f0;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .pb-download-buttons {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    .pb-card {
        padding: 12px 8px 10px;
        min-height: 85px;
    }
    .pb-card-name {
        font-size: 12px;
    }
    .pb-card-icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .pb-download-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

