*{
    padding:0;
    margin:0;

}
body{
    background-color: rgb(82, 4, 102);
}
h1, h4, p, blockquote {
    color: aliceblue;
}

/*border: 5px darkgray dashed;*/
header {
    background-color: rgba(61, 3, 94, 0.764);
    padding: 20px;
    text-align: center;
    background-image: url(../images/微信图片_20251120211255_242_39-modified.png);
    background-position: 65% 50%;
    background-size:contain;
    background-repeat: no-repeat;
    position: relative;
}
/* 添加半透明遮罩调整整体透明度 */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(48, 3, 72, 0.38); /* 调整遮罩透明度 */
    z-index: 1;
}

/* 确保文字在遮罩上方 */
header h1,
header blockquote {
    position: relative;
    z-index: 2;
}

header h1 {
    color: #955cab;
    font-size: 2rem;
    margin-bottom: 10px;
}
header blockquote {
    color: #d6bbd8c8;
    font-style: italic;
    font-size: 1rem;
    margin: 0;
}
nav {
    background-color: rgba(152, 83, 180, 0.727);

    padding: 10px;
    border-radius: 4px;
}

nav li{
    color: rgba(5, 6, 90, 0);
    flex: 1;
    text-align: center;
}

nav a {
    color: rgba(255, 255, 255, 0.757);
    text-decoration: none;
    padding: 12px 0;
    display: block;
    transition: background-color 0.3s;
    border-radius: 5px;
    font-size: 17px;
}

nav ul li a:hover {
    text-decoration:underline;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-around;

}


main {
    padding: 20px;
    margin-bottom: 10px;
    background-image: url(../images/1396850.jpg);
    background-size:cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
}

.welcome {
    margin-top: 30px;
    margin-bottom: 50px;
    text-align: center;
    line-height: 1.8;
    justify-content: center;
    
}
 
.welcome h4 {
    margin-bottom: 15px;
    text-shadow: 0 0 9px rgba(255, 255, 255, 0.8),
                 0 0 18px rgba(255, 255, 255, 0.6),
                 0 0 27px rgba(255, 255, 255, 0.4);
}

.about p {
    width:70% ;
    padding: 30px;
    line-height: 1.8;
    margin-left: 15px;
    margin-right: 15px;
    padding-left: 10px;
    padding-right: 10px;
    background-color: #9a4e9f79;
    border-radius: 8px;
}

.about{
    display: flex;
}

.info {
    background-color: rgba(239, 193, 249, 0.274);
}
/* 小部件容器 */
.widgets-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* 手机端自动换行 */
    padding: 10px;
}

.widget-card {
    background: rgba(164, 125, 175, 0.2); /* 半透明白色 */
    backdrop-filter: blur(10px);         /* 磨砂玻璃效果 */
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

/* 日历样式 */
.calendar-card {
    width: 280px;
    font-family: 'Segoe UI', sans-serif;
}

.cal-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #4a0466; /* 深紫色文字 */
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #644399;
    margin-bottom: 10px;
}

.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.cal-days div {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 5px;
    transition: background 0.3s;
}

/* 今天的日期高亮 */
.cal-days div.today {
    background: #955cab;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.cal-days div:hover:not(.empty) {
    background: rgba(255, 255, 255, 0.4);
    cursor: default;
}

/* 天气小部件样式覆盖 */
.weather-card {
    width: 280px;
    display: flex;
    align-items: center;
    margin-top: 10px;
}

/* 让天气插件背景透明以适应你的卡片 */
.weatherwidget-io {
    background: transparent !important;
}
 .gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 40px;
            padding: 20px 0;
            
        }
        
.gallery-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            
        }
        
.image-frame {
            
    border: 6px solid #64439961;
    width: 100%;
    /* 移除固定高度 */
    /* height: 220px; */
    /* 添加宽高比控制 */
    aspect-ratio: 4/3; /* 默认使用3:4比例 */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 为不同比例的图片添加专门的类 */
.square-image {
    /* 添加最大宽度限制 */
        max-width: 150px;
        margin: 0 auto;
    aspect-ratio: 1/1; /* 正方形图片 */
}

.portrait-image {
    /* 添加最大宽度限制 */
        max-width: 200px;
        margin: 0 auto;
    aspect-ratio: 3/4; /* 纵向图片 */
}

.landscape-image {
    /* 添加最大宽度限制 */
        max-width: 250px;
        margin: 0 auto;
    aspect-ratio: 4/3; /* 横向图片 */
}

.image-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 这个保持不变，很重要 */
    transition: transform 0.5s ease;
}

.image-frame:hover img {
    transform: scale(1.05);
}
        .caption {
            max-width: 280px;
            margin-top: 20px;
            text-align: center;
            width: 100%;
        }
        
        .caption h5 {
            color: #2d3748;
            margin-bottom: 8px;
            font-size: 18px;
            font-weight: 500;
        }
        
        .caption p {
            color: #718096;
            font-size: 1rem;
            line-height: 1.5;
        }
        
.music-player {
    position: fixed; /* 添加这行 */
    bottom: 20px;   /* 添加这行 */
    right: 20px;    /* 添加这行 */
    z-index: 1000;  /* 添加这行 */
}
.music-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 15px;
    border-radius: 20px;
    border: none;
}

.music-toggle {
    background: transparent;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    margin: 0;
    font-family: inherit;
}

.music-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.music-name {
    color: white;
    font-size: 12px;
    font-style: italic;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    padding: 0;
    font-family: inherit;
}

/* 响应式设计 适用于手机
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav a {
        display: block;
        width: 200px;
        text-align: center;
        margin-bottom: 10px;
    }*/