.sfx-page-container h2 {
    text-align: center;
    /* 缩小标题上下间距 */
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 28px; /* 略微缩小标题 */
    color: var(--text-color);
}

/* 1. 流体网格布局 */
.sfx-grid {
    display: grid;
    /* 保持响应式设计 */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px; /* 缩小卡片间距 */
    padding: 0;
}

/* 2. 音效卡片样式 */
.sfx-card {
    background-color: #394757;
    border: 1px solid #3b4d67;
    border-radius: 8px;
    padding: 6px 12px 9px 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sfx-card:hover {
    transform: translateY(-2px);
    /* 使用主色调的高光效果 */
    box-shadow: 0 6px 12px rgba(30, 174, 61, 0.1);
}

/* 3. 名称和标签 */
.sfx-header {
    /* 优化：减小标题和标签之间的间距 */
    margin-bottom: 5px;
}

.sfx-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    /* 优化：减小标题和标签组之间的间距 */
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sfx-tags {
    display: flex;
    flex-wrap: wrap;
    margin-left: -2px;
    /* 调整：给标签行与波形图之间留出空间 */
    margin-bottom: 0; /* 标签底部间距将在 .tag 中设置 */
}

.sfx-tags .tag {
    /* 保持 flex-shrink: 0; 确保标签不会被挤压 */
    flex-shrink: 0;
    font-size: 11px;
    padding: 0 3px;
    border-radius: 6px;
    margin: 0 3px 3px 2px;
    /* 美化颜色和背景 */
    background-color: var(--tag-bg-color, #3a3d43);
    color: var(--tag-text-color, #efeeff);
    font-weight: 500;
    /* 可选：轻微阴影，增加层次感 */
    /*box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);*/
    cursor: default;
}
.tag-link-internal{
    color: var(--tag-text-color, #efeeff);
}

/* -------------------------------------- */
/* 5. 试听和下载按钮区域 */
/* -------------------------------------- */
.sfx-actions {
    text-align: right;
    margin-top: auto;
    padding-top: 5px;
}

/* -------------------------------------- */
/* 波形图和进度条样式 */
/* -------------------------------------- */

.sfx-waveform-container {
    position: relative; /* 确保子元素定位准确 */
    margin: 0;
    background-color: #9ac0e4;
    height: 30px; /* 紧凑版高度 */
    border-radius: 4px;
    overflow: hidden;
}

/* 移除波形图上的播放按钮区域 */
.sfx-controls {
    display: none;
}

/* Canvas 容器：用于绘制波形 */
.waveform-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    background-color: #394757; /* 与容器背景一致 */
}

/* 播放进度覆盖层：动态调整宽度，表示已播放部分 */
.playback-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0; /* 初始宽度为 0 */
    /* 浅绿色半透明，覆盖在波形图上 */
    background-color: rgba(39, 234, 77, 0.3);
    pointer-events: none; /* 关键：允许鼠标点击穿透到下面的 canvas */
    z-index: 10;
}

.listen-btn, .download-btn {
    padding: 3px 6px 6px 3px; /* 按钮内边距 */
    border-radius: 9px;
    font-size: 12px; /* 按钮字体 */
    margin-left: 8px; /* 按钮间距 */
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s, color 0.2s;
}

/* 试听按钮默认样式 (未播放) */
.listen-btn {
    background-color: var(--primary-color, #1eae3d);
    color: white;
    border: 1px solid var(--primary-color, #1eae3d);
}

/* 试听按钮播放中状态 */
.listen-btn.playing {
    /* 使用红色或停止色来表示暂停/停止状态 */
    background-color: var(--error-color, #dc3545);
    border: 1px solid var(--error-color, #dc3545);
    color: white;
}

/* 下载按钮样式 */
.download-btn {
    /*background-color: var(--secondary-color, #555);*/
    color: #1a1d20;
    /*border: 1px solid var(--secondary-color, #555);*/
}

.auth-warning a:link, .auth-warning a:visited {
    color: #dc3545;
}
.auth-warning .auth-warning a:hover {
    color: #ffffff;
}

.playback-progress-overlay {
    pointer-events: none; /* 让鼠标点击穿透进度层，直接作用在底部的 Canvas 上 */
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: rgba(168, 219, 168, 0.4); /* 建议带透明度 */
    width: 0%;
}
/* 1. 定位到弹窗中的权限提示文本 */
.download-modal .auth-warning {
    /* 消除原本的段落外观 */
    display: block;
    margin: 20px auto;
    width: fit-content;

    /* 按钮核心样式：绿色背景白字 */
    background-color: #66BB6A !important;
    color: #ffffff !important;

    /* 布局与装饰 */
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    cursor: pointer; /* 鼠标变手型 */

    /* 动画与阴影 */
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: none;

    /* 确保文字不会因为链接属性变色 */
    text-decoration: none !important;
}

/* 2. 悬停效果：模拟按钮反馈 */
.download-modal .auth-warning:link {
    background-color: #fafafa !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 187, 106, 0.4);
}

/* 2. 悬停效果：模拟按钮反馈 */
.download-modal .auth-warning:hover {
    background-color: #4CAF50 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 187, 106, 0.4);
}

/* 3. 点击效果 */
.download-modal .auth-warning:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 4. (进阶) 如果你想在文字后面加个图标，可以使用伪元素 */
.download-modal .auth-warning::after {
    content: ' ➔';
    margin-left: 8px;
    font-size: 14px;
    vertical-align: middle;
}