/* 超紧凑多列标签样式 - 彩虹浅色版 */
.minimal-tags-section {
    padding: 0 0 var(--section-margin-xs);
    margin-bottom: var(--section-margin-xs);
    width: 100%;
}

.minimal-tags-section .container {
    padding: 0 var(--container-padding-xs);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 576px) {
    .minimal-tags-section .container { padding: 0 var(--container-padding-sm); }
    .minimal-tags-section { padding: 0 0 var(--section-margin-sm); margin-bottom: var(--section-margin-sm); }
}

@media (min-width: 768px) {
    .minimal-tags-section .container { padding: 0 var(--container-padding-md); }
    .minimal-tags-section { padding: 0 0 var(--section-margin-sm); margin-bottom: var(--section-margin-sm); }
}

@media (min-width: 992px) {
    .minimal-tags-section .container { padding: 0 var(--container-padding-lg); }
    .minimal-tags-section { padding: 0 0 var(--section-margin-md); margin-bottom: var(--section-margin-md); }
}

@media (min-width: 1200px) {
    .minimal-tags-section .container { padding: 0 var(--container-padding-xl); }
    .minimal-tags-section { padding: 0 0 var(--section-margin-md); margin-bottom: var(--section-margin-md); }
}

.tags-header {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding-left: 8px;
}

.tags-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 2px;
}

.tags-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags-subtitle-right {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.7;
    font-weight: 400;
    text-align: right;
    white-space: nowrap;
}

.tags-title i { color: var(--primary-color); font-size: 14px; }

.tags-grid {
    display: grid;
    width: 100%;
    gap: 12px;
    grid-template-columns: repeat(6, 1fr);
}

/* 按钮基础样式 - 无填充色，仅边框和浅阴影 */
.minimal-tag {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    min-height: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    opacity: 1;
    visibility: visible;
}

.minimal-tag .tag-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.minimal-tag .tag-label { display: block; color: inherit; }

/* 左侧颜色竖条 - 彩虹浅色 */
.minimal-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--tag-color);
    border-radius: 0 2px 2px 0;
    transition: all 0.2s ease;
    z-index: 1;
}

.minimal-tag:hover::before {
    width: 5px;
    height: 24px;
}

.minimal-tag.active::before {
    width: 5px;
    height: 28px;
}

/* hover效果 - 仅边框变色和轻微上浮，无背景填充 */
.minimal-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--tag-color);
    background: var(--bg-card);
}

/* 激活状态 - 仅边框加粗变色，无背景填充 */
.minimal-tag.active {
    border: 2px solid var(--tag-color);
    background: var(--bg-card);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    padding: 11px 15px;
}

/* 图标样式 - 默认继承彩虹色，激活时不变色 */
.tag-icon {
    color: var(--tag-color);
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.minimal-tag:hover .tag-icon { transform: scale(1.1); color: var(--tag-color); }
.minimal-tag.active .tag-icon { transform: scale(1.1); color: var(--tag-color); }

/* 文字样式 - 不随状态改变颜色 */
.tag-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: none;
}

.minimal-tag:hover .tag-label,
.minimal-tag.active .tag-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* 彩虹七色 - 浅色柔和版 */
.tag-color-1 { --tag-color: #FF3D3D; --tag-color-rgb: 255, 179, 179; }
.tag-color-2 { --tag-color: #FFA334; --tag-color-rgb: 255, 214, 165; }
.tag-color-3 { --tag-color: #F9FF2C; --tag-color-rgb: 253, 255, 182; }
.tag-color-4 { --tag-color: #59FF36; --tag-color-rgb: 202, 255, 191; }
.tag-color-5 { --tag-color: #32ECFF; --tag-color-rgb: 155, 246, 255; }
.tag-color-6 { --tag-color: #3A84FC; --tag-color-rgb: 160, 196, 255; }
.tag-color-7 { --tag-color: #9F34FF; --tag-color-rgb: 226, 194, 255; }

/* 响应式设计 */
@media (min-width: 1600px) {
    .minimal-tags-section .container { max-width: 1600px; }
    .tags-grid { grid-template-columns: repeat(10, 1fr); gap: 12px; }
    .tag-label { font-size: 14px; }
    .tags-title { font-size: 17px; }
    .tags-subtitle-right { font-size: 13px; }
    .minimal-tag { padding: 14px 18px; min-height: 52px; gap: 10px; border-radius: 6px; }
    .tag-icon { font-size: 18px; width: 26px; height: 26px; }
    .minimal-tag::before { width: 5px; height: 24px; }
    .minimal-tag.active { padding: 13px 17px; }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .tags-grid { grid-template-columns: repeat(8, 1fr); gap: 12px; }
    .tags-title { font-size: 16px; }
    .tags-subtitle-right { font-size: 12px; }
    .tag-label { font-size: 13px; }
    .minimal-tag { padding: 12px 16px; min-height: 48px; border-radius: 6px; }
    .minimal-tag.active { padding: 11px 15px; }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .tags-grid { grid-template-columns: repeat(7, 1fr); gap: 12px; }
    .tags-title { font-size: 15px; }
    .tags-subtitle-right { font-size: 11px; }
    .tag-label { font-size: 13px; }
    .minimal-tag { padding: 11px 15px; min-height: 46px; border-radius: 6px; }
    .minimal-tag.active { padding: 10px 14px; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .minimal-tags-section { padding: 0 0 var(--section-margin-xs); }
    .tags-grid { grid-template-columns: repeat(6, 1fr); gap: 10px; }
    .tags-title { font-size: 15px; }
    .tags-subtitle-right { font-size: 10px; max-width: 180px; white-space: normal; text-align: right; line-height: 1.2; }
    .tag-label { font-size: 12px; }
    .minimal-tag { padding: 10px 14px; min-height: 44px; gap: 8px; border-radius: 6px; }
    .minimal-tag.active { padding: 9px 13px; }
    .minimal-tag::before { height: 18px; width: 4px; }
    .tag-icon { font-size: 15px; width: 22px; height: 22px; }
}

@media (min-width: 576px) and (max-width: 767px) {
    .minimal-tags-section { padding: 0 0 var(--section-margin-xs); }
    .tags-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .tags-title { font-size: 14px; }
    .tags-subtitle-right { font-size: 9px; max-width: 150px; white-space: normal; text-align: right; line-height: 1.2; }
    .tag-label { font-size: 12px; }
    .minimal-tag { padding: 9px 13px; min-height: 42px; gap: 7px; border-radius: 6px; }
    .minimal-tag.active { padding: 8px 12px; }
    .minimal-tag::before { height: 16px; width: 4px; }
    .tag-icon { font-size: 14px; width: 20px; height: 20px; }
}

@media (max-width: 575px) {
    .minimal-tags-section { padding: 0 0 var(--section-margin-xs); }
    .tags-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .tags-title { font-size: 14px; }
    .tags-subtitle-right { font-size: 9px; max-width: 120px; white-space: normal; text-align: right; line-height: 1.2; margin-left: 8px; }
    .tag-label { font-size: 12px; }
    .minimal-tag { padding: 9px 12px; min-height: 40px; gap: 7px; border-radius: 6px; }
    .minimal-tag.active { padding: 8px 11px; }
    .minimal-tag::before { height: 16px; width: 3px; }
    .tag-icon { font-size: 14px; width: 20px; height: 20px; }
}

@media (max-width: 374px) {
    .tags-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .tag-label { font-size: 11px; }
    .tags-title { font-size: 13px; }
    .tags-subtitle-right { font-size: 8px; max-width: 100px; line-height: 1.1; }
    .minimal-tag { padding: 8px 11px; min-height: 38px; gap: 6px; border-radius: 6px; }
    .minimal-tag.active { padding: 7px 10px; }
    .minimal-tag::before { height: 14px; width: 3px; }
    .tag-icon { font-size: 13px; width: 18px; height: 18px; }
}

@media (max-width: 319px) {
    .tags-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tags-header { flex-direction: column; align-items: flex-start; gap: 4px; }
    .tag-label { font-size: 11px; }
    .tags-title { font-size: 13px; }
    .tags-subtitle-right { font-size: 8px; max-width: 100%; text-align: left; padding-left: 4px; margin-left: 0; line-height: 1.2; }
    .minimal-tag { padding: 8px 10px; min-height: 36px; border-radius: 6px; }
    .minimal-tag.active { padding: 7px 9px; }
    .minimal-tag::before { height: 14px; width: 3px; }
    .tag-icon { font-size: 13px; width: 18px; height: 18px; }
}

@media (min-width: 1920px) {
    .minimal-tags-section .container { max-width: 1800px; }
    .tags-grid { grid-template-columns: repeat(12, 1fr); gap: 12px; }
    .tag-label { font-size: 14px; }
    .tags-title { font-size: 18px; }
    .tags-subtitle-right { font-size: 14px; }
    .minimal-tag { padding: 14px 18px; min-height: 52px; gap: 10px; border-radius: 6px; }
    .minimal-tag.active { padding: 13px 17px; }
    .minimal-tag::before { width: 5px; height: 24px; }
    .tag-icon { font-size: 18px; width: 26px; height: 26px; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .minimal-tags-section { padding: 0 0; }
    .tags-grid { grid-template-columns: repeat(8, 1fr); gap: 6px; }
    .tags-subtitle-right { font-size: 9px; margin-bottom: 4px; }
    .minimal-tag { min-height: 36px; padding: 7px 10px; border-radius: 6px; }
    .minimal-tag.active { padding: 6px 9px; }
    .tag-label { font-size: 11px; }
    .tag-icon { font-size: 13px; width: 18px; height: 18px; }
}

/* 加载动画 */
@keyframes tagFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.minimal-tag {
    animation: tagFadeIn 0.3s ease forwards;
    opacity: 0;
}

.minimal-tag:nth-child(1) { animation-delay: 0.01s; }
.minimal-tag:nth-child(2) { animation-delay: 0.02s; }
.minimal-tag:nth-child(3) { animation-delay: 0.03s; }
.minimal-tag:nth-child(4) { animation-delay: 0.04s; }
.minimal-tag:nth-child(5) { animation-delay: 0.05s; }
.minimal-tag:nth-child(6) { animation-delay: 0.06s; }
.minimal-tag:nth-child(7) { animation-delay: 0.07s; }
.minimal-tag:nth-child(8) { animation-delay: 0.08s; }
.minimal-tag:nth-child(9) { animation-delay: 0.09s; }
.minimal-tag:nth-child(10) { animation-delay: 0.1s; }
.minimal-tag:nth-child(11) { animation-delay: 0.11s; }
.minimal-tag:nth-child(12) { animation-delay: 0.12s; }
.minimal-tag:nth-child(13) { animation-delay: 0.13s; }
.minimal-tag:nth-child(14) { animation-delay: 0.14s; }
.minimal-tag:nth-child(15) { animation-delay: 0.15s; }
.minimal-tag:nth-child(16) { animation-delay: 0.16s; }
.minimal-tag:nth-child(17) { animation-delay: 0.17s; }
.minimal-tag:nth-child(18) { animation-delay: 0.18s; }
.minimal-tag:nth-child(19) { animation-delay: 0.19s; }
.minimal-tag:nth-child(20) { animation-delay: 0.20s; }
.minimal-tag:nth-child(21) { animation-delay: 0.21s; }
.minimal-tag:nth-child(22) { animation-delay: 0.22s; }
.minimal-tag:nth-child(23) { animation-delay: 0.23s; }
.minimal-tag:nth-child(24) { animation-delay: 0.24s; }
.minimal-tag:nth-child(25) { animation-delay: 0.25s; }
.minimal-tag:nth-child(26) { animation-delay: 0.26s; }
.minimal-tag:nth-child(27) { animation-delay: 0.27s; }
.minimal-tag:nth-child(28) { animation-delay: 0.28s; }
.minimal-tag:nth-child(29) { animation-delay: 0.29s; }
.minimal-tag:nth-child(30) { animation-delay: 0.30s; }
.minimal-tag:nth-child(31) { animation-delay: 0.31s; }
.minimal-tag:nth-child(32) { animation-delay: 0.32s; }
.minimal-tag:nth-child(33) { animation-delay: 0.33s; }
.minimal-tag:nth-child(34) { animation-delay: 0.34s; }
.minimal-tag:nth-child(35) { animation-delay: 0.35s; }
.minimal-tag:nth-child(36) { animation-delay: 0.36s; }
.minimal-tag:nth-child(37) { animation-delay: 0.37s; }

@media (prefers-color-scheme: dark) {
    .minimal-tag { background: rgba(40, 40, 40, 0.8); border-color: #444; }
    .minimal-tag:hover { background: rgba(40, 40, 40, 0.9); }
    .minimal-tag.active { background: rgba(40, 40, 40, 0.9); }
    .tags-header::before { opacity: 0.9; }
    .tags-subtitle-right { color: #aaa; }
}

.minimal-tag:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
    .minimal-tag { animation: none; opacity: 1; transition: none; }
    .minimal-tag:hover { transform: none; }
    .minimal-tag:hover .tag-icon { transform: none; }
    .minimal-tag.active .tag-icon { transform: none; }
}

.tags-loading {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 767px) {
    .tags-grid { overflow-x: visible; }
}