

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    background-image: var(--bg-image, none);
    background-size: cover;
    background-attachment: fixed;
    transition: all 0.3s ease;
}
.profile-img {
  width: 100px;
  height: 100px;
  border-radius: 50%; /* 将图片剪裁为圆形 */
  transition: transform 0.5s; /* 添加旋转过渡效果 */
}

.profile-img:hover {
  transform: rotate(360deg); /* 鼠标悬停时旋转图片 */
}
/* 加载动画 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 汉堡菜单 */
.menu-container {
    display: flex;
    align-items: center;
    background-color: #FFC0CB;
    color: white;
    padding: 1rem;
    position: relative;
}

.hamburger {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
}

.menu-title {
    font-size: 1.2rem;
    margin: 0;
}

.menu {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #FFC0CB;
    transition: left 0.3s ease;
    z-index: 1000;
    padding-top: 60px;
}

.menu.active {
    left: 0;
}

.menu ul {
    list-style: none;
}

.menu li a {
    display: block;
    padding: 1rem;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.menu li a:hover {
    background-color: #555;
}

/* 主要内容 */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 卡片样式 */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    padding: 1rem;
    font-size: 1.5rem;
    border-bottom: 1px solid #eee;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
}

.card-content {
    padding: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: #f9f9f9;
    font-size: 0.9rem;
    color: #666;
}

/* 留言板样式 */
.comments-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.comments-section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
}

button {
    background: #333;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background: #555;
}

.comments-list {
    margin-top: 2rem;
}

.comment-card {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    position: relative;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.comment-content {
    margin: 1rem 0;
    line-height: 1.6;
}

.comment-website a {
    color: #3498db;
    text-decoration: none;
}

.comment-website a:hover {
    text-decoration: underline;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 2rem;
    background: #FFC0CB;
    color: white;
    margin-top: 2rem;
}

/* 音乐播放器 */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.music-player audio {
    width: 40px;
    height: 40px;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.music-player::before {
    content: "♫";
    font-size: 24px;
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 1rem;
    }
}