* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'HarmonyOS_Regular', 'Helvetica Neue', 'Helvetica', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    /* 背景图片 - 使用Bing每日一图 */
    background-image: url('/img/书房-夜晚.png');  /*默认图片，JS会覆盖 */
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 调整背景遮罩透明度，让图片更清晰 */
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    flex: 1;
}

/* 页眉 - 可用于放置天气或其他顶部信息 */
header {
     /* 固定定位：相对于浏览器窗口定位 */
    position: fixed;
    /* 位置：固定在底部 */
    left: 0;
    top: 0;
    /* 宽度：撑满整个浏览器宽度 */
    width: 100%;
    /* 可选：设置背景色、文字颜色、内边距等 */
    background-color: rgba(0, 0, 0, 0.7); /* 半透明黑色背景 */
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 0.9em;
    /* 确保页脚在最上层（通常不需要，除非有其他绝对定位元素） */
    z-index: 1000;
    /* 移除了之前的 margin: 30px auto 0 auto; 因为 fixed 定位脱离了文档流 */
}

/* 主内容区 - 左右两栏 */
.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    gap: 30px;
    padding: 0; /* 移除内边距 */
    flex: 0; /* 占据剩余空间 */
}

/* 左侧信息卡片 */
.info-card {
    width: 320px;
    /* 磨玻璃效果 */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    /* gap: 25px; */
}

/* 个人信息区 */
.profile-section {
    text-align: center;
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    margin: 0 auto 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    /* 关键：定义动画 */
    animation: rotateAnimation 5s linear infinite; /* 5秒一圈，匀速，无限循环 */
    /* 如果只想旋转一次并在最后停下，可以使用 transition 和 JavaScript 动态添加类 */
}

/* 定义关键帧动画 */
@keyframes rotateAnimation {
    from {
        transform: rotate(0deg); /* 从 0 度开始 */
    }
    to {
        transform: rotate(360deg); /* 到 360 度结束 */
    }
}

.avatar:hover {
    animation-play-state: paused; /* 关键：暂停动画 */
    /* 你可以在这里添加其他悬停效果，比如放大一点 */
    /* transform: scale(1.05); */
    /* 注意：如果同时使用 transform，可能需要调整动画定义 */
    /* 为避免冲突，最好只用 animation-play-state 来控制暂停 */
}

h1 {
    font-size: 1.8em;
    margin-bottom: 8px;
    color: #444;
}

.signature {
    font-size: 0.95em;
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
}

#current-time {
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 1px;
    color: #ffffff;
}

/* 一言模块 */
.hitokoto-container {
    height: 95px;
    background: rgba(0, 0, 0, 0.05);
    padding: 15px;
    border-radius: 12px;
    font-style: italic;
    font-size: 0.95em;
    border-left: 3px solid #6a5acd;
}
.hitokoto-text {
    margin-bottom: 5px;
    color: #555;
}
.hitokoto-from {
    text-align: right;
    font-size: 0.9em;
    color: #888;
}

/* 联系方式 */
.contact-section h2 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #444;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 5px;
}

.contact-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
}
.contact-icon-link {
    font-size: 1.8em;
    color: #666;
    transition: color 0.3s ease, transform 0.3s ease;
}
.contact-icon-link:hover {
    color: #6a5acd;
    transform: scale(1.2);
}

/* 右侧网站链接区 */
.websites-section {
    flex: 1;
    /* 磨玻璃效果 */
    background: rgba(255, 255, 255, 0.4); 
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* 添加滚动条 */
    overflow-y: auto; 
}

.websites-section h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #444;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}

.website-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.website-card:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.website-icon {
    font-size: 2.2em;
    margin-bottom: 12px;
    color: #6a5acd;
}

.website-name {
    font-size: 1em;
    color: #555;
}

/* 页脚 */
footer {
 /* 固定定位：相对于浏览器窗口定位 */
    position: fixed;
    /* 位置：固定在底部 */
    left: 0;
    bottom: 0;
    /* 宽度：撑满整个浏览器宽度 */
    width: 100%;
    /* 可选：设置背景色、文字颜色、内边距等 */
    background-color: rgba(0, 0, 0, 0.7); /* 半透明黑色背景 */
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 0.9em;
    /* 确保页脚在最上层（通常不需要，除非有其他绝对定位元素） */
    z-index: 1000;
    /* 移除了之前的 margin: 30px auto 0 auto; 因为 fixed 定位脱离了文档流 */
}

/* 页脚内的链接样式 */
footer a {
    color: #4da6ff; /* 链接颜色 */
    text-decoration: none; /* 移除下划线 */
}

footer a:hover {
    text-decoration: underline; /* 悬停时显示下划线 */
}


.weather-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-icon {
    font-size: 1.2em;
    color: #FFA500;
}

.weather-temp {
    font-weight: bold;
}

.weather-location {
    font-weight: 500;
}

/* 滚动条美化 */
.websites-section::-webkit-scrollbar {
    width: 8px;
}
.websites-section::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}
.websites-section::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
.websites-section::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    .info-card {
        width: 100%;
        max-width: 500px;
    }
    .websites-section {
        width: 100%;
        max-width: 500px;
    }
    header, footer {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}