/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

/* 右上角唱片图标样式 */
.record-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    transition: transform 0.1s linear;
}

.record-icon.rotate {
    animation: rotateRecord 3s linear infinite;
}

@keyframes rotateRecord {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.record-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 全局模糊背景层 */
.global-blur-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: top center;
    filter: blur(15px);
    -webkit-filter: blur(15px);
    z-index: -2;
    opacity: 0.8;
    transform: scale(1.1);
    transition: background-image 0.5s ease-in-out;
}

body {
    background-color: #f4f5f7;
    color: #333;
    min-height: 100vh;
}

/* 顶部头部区域 */
.header {
    position: relative;
    width: 100%;
    height: 200px;
    color: white;
    display: flex;
    align-items: flex-end;
    padding: 20px 20px 30px 20px;
    background: transparent;
    overflow: hidden;
    z-index: 1;
}

.bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.bg-slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: top center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.bg-slider-item.active {
    opacity: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    overflow: hidden;
    background: #eee;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-text h1 {
    font-size: 24px;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.info-text p {
    font-size: 14px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 主体容器 */
.container {
    max-width: 1200px;
    margin: 40px auto 40px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card h2 {
    font-size: 18px;
    color: #222;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

/* 左侧：歌单展示栏 - 核心修改：自动缩放+正方形 */
.music-section {
    grid-column: 1 / 2;
}

.music-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.music-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 80px;
    align-items: center;
}

.music-item:hover {
    background-color: rgba(0,0,0,0.05);
}

.music-item.active {
    background-color: rgba(0,0,0,0.1);
}

/* 核心：正方形容器 + 图片自动缩放完整显示 */
.music-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #f0f0f0; /* 空白区域填充浅灰色 */
    overflow: hidden;
    flex-shrink: 0; /* 禁止压缩 */
    display: flex;
    align-items: center;
    justify-content: center; /* 图片居中 */
}

/* 关键：object-fit: contain 让图片自动缩放、完整显示 */
.music-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 自动缩放，完整显示在容器内 */
    object-position: center; /* 居中显示 */
}

.music-info {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-info p {
    font-size: 12px;
    color: #666;
}

/* 中间：个人作品展示栏 */
.projects-section {
    grid-column: 2 / 3;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.project-card {
    background: rgba(250, 250, 250, 0.9);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-cover {
    width: 100%;
    height: 160px;
    background: #eee;
    overflow: hidden;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 12px;
}

.project-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.project-info p {
    font-size: 13px;
    color: #666;
}

/* 右侧：个人资料 + 社交媒体 */
.right-section {
    grid-column: 3 / 4;
}

.profile-info p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(240, 240, 240, 0.9);
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.2s;
}

.social-link:hover {
    background: rgba(224, 224, 224, 0.9);
}

/* 响应式适配 */
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }
    .music-section,
    .projects-section,
    .right-section {
        grid-column: 1 / -1;
    }
    .record-icon {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }
    .music-item {
        height: 70px;
    }
    .music-cover {
        width: 50px;
        height: 50px;
    }
}