/* Music grid layout */
.section {
    padding-top: 60px; /* Consistent top padding with other pages */
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-md) 0;
}

.music-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer; /* 为整个卡片添加手型光标 */
}

.music-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.music-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    margin-bottom: var(--spacing-md);
}

.music-item-content {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.music-item h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    text-shadow: var(--heading-shadow);
}

.music-item .release-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-sm);
    text-shadow: var(--text-shadow);
}

.music-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: var(--text-shadow);
}

.music-item p:last-child {
    margin-bottom: 0;
}

.music-item a {
    color: #bbbbbb;
    text-decoration: underline;
    transition: color 0.2s;
}

.music-item a:hover,
.music-item a:focus {
    color: #ffffff;
    text-decoration: underline;
}

/* music-description 默认隐藏，通过 JS 添加 .expanded 类来展开 */
.music-description {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

.music-description.expanded {
    max-height: 1000px; /* 确保足够高度展开 */
    opacity: 1;
    pointer-events: auto;
}

/* 应用于介绍内的 P 标签 */
.music-description p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: var(--text-shadow);
}

/* 副标题 P 标签的下边距 */
.music-item > h3 + p {
    font-size: 0.9rem; /* 保持原有字体大小 */
    color: rgba(255, 255, 255, 0.7); /* 保持原有颜色 */
    margin-bottom: var(--spacing-xs); /* 减小下边距 */
    text-shadow: var(--text-shadow);
}

.music-description p:last-child {
    margin-bottom: 0;
}

.music-links {
    display: flex;
    gap: 18px;
    margin-top: 0; /* 设为 0，完全由上方元素控制间距 */
    align-items: center;
}

.music-links a {
    color: #bbbbbb;
    font-size: 1.6rem;
    transition: color 0.2s;
    text-decoration: none;
}
.music-links a:hover {
    color: #fff;
}

.expand-btn {
    /* 修改为类似链接的文本样式 */
    background: none;
    border: none;
    color: #bbbbbb; /* 灰色，同链接 */
    font-size: 0.8rem; /* 再减小字号 */
    font-weight: bold; /* 粗体 */
    text-align: left;
    padding: 0; /* 移除内边距 */
    margin: var(--spacing-xs) 0; /* 上下间距统一为 xs */
    cursor: pointer;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out; /* 添加颜色过渡 */
    outline: none;
    display: inline-block; /* 改为 inline-block 适应左对齐 */
}
/* 悬停卡片 或 按钮已展开时 显示按钮 */
.music-item:hover .expand-btn,
.expand-btn[aria-expanded="true"] {
    opacity: 1;
    pointer-events: auto;
}
/* 按钮悬停效果 - 可选 */
.expand-btn:hover {
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .music-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }

    .music-item-content {
        padding: var(--spacing-sm);
    }

    .music-item h3 {
        font-size: 1.1rem;
    }
} 