/*
 * 最终版 style.css
 * 包含：深色透明左侧栏、昵称上下居中、大时钟透明化、壁纸裁切、统一的深色透明卡片
 */

/* --- 1. 壁纸自定义变量与设置 --- */

:root {
    /* 1. 替换这里的路径来修改壁纸 (请确保图片路径正确) */
    --bg-url: url('images/your-local-wallpaper.jpg'); 
    /* 2. 调整这里来控制裁切位置 (例如: 'top center', '50% 50%') */
    --bg-position: center center; 
    /* 3. 调整这里来控制缩放模式 ('cover' 是裁切, 'contain' 是完整显示) */
    --bg-scale: cover; 

    /* 【核心修改 1：提高整体透明度 (alpha=0.3)】 */
    --dark-card-bg: rgba(0, 0, 0, 0.3); 
    
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
    --text-color: #333; /* 仅用于导航项等需要深色文本的地方 */
    --link-color-dark-bg: #fff; /* 针对深色背景和透明区域的链接颜色 */
    --link-hover-color: #777; /* 鼠标悬停字体变灰 */
    --accent-color: #f06; /* 主题强调色 */
}

/* 背景容器样式 */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    
    background-image: var(--bg-url);
    background-position: var(--bg-position);
    background-size: var(--bg-scale);
    background-repeat: no-repeat;
    
    transition: background-image 0.5s ease;
}

/* --- 2. 基础布局与重置 --- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f0f2f5; 
}

a {
    color: var(--link-color-dark-bg);
    text-decoration: none;
    transition: color 0.3s ease; 
}

a:hover {
    color: var(--link-hover-color); 
}

h1, h2, h3 {
    color: var(--text-color);
    margin-bottom: 15px;
}

/* --- 3. 主要布局 (居中并双栏，分区占满页面) --- */

.layout {
    display: flex;
    max-width: 1400px; 
    width: 95%; 
    margin: 40px auto; 
    flex-grow: 1; 
    gap: 30px;
    /* 垂直居中整个内容区 */
    align-items: center; 
}

/* 右侧内容卡片统一为深色背景 */
.card {
    background-color: var(--dark-card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    color: #eee;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card h2 {
    color: #fff;
}

/* --- 4. 左侧 (侧边栏) 样式：【应用深色背景 + 昵称上下居中】 --- */

.left {
    width: 300px;
    flex-shrink: 0;
    text-align: center;
    padding: 40px 25px; 
    
    /* 【核心修改 2：应用深色透明背景和阴影】 */
    background-color: var(--dark-card-bg);
    box-shadow: var(--shadow); 

    border-radius: var(--border-radius);
    /* align-self: flex-start; 侧边栏高度与内容对齐，不需要这个 */
    
    /* 昵称内部居中逻辑 */
    display: flex;
    flex-direction: column;
    /* 默认文本颜色改为浅色 */
    color: #eee;
}

.avatar-box {
    margin-bottom: 20px;
    margin-top: auto; 
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%; 
    object-fit: cover;
    border: none; 
}

.nickname {
    font-size: 1.8em;
    font-weight: bold;
    margin: 25px 0; 
    color: #fff;
    /* 移除阴影，因为背景色已经提供了对比度 */
    text-shadow: none; 
}

.social {
    margin-top: auto; 
}

.social h3 {
    margin-bottom: 15px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5); 
    padding-bottom: 5px;
    text-shadow: none; /* 移除阴影 */
}

.social a { 
    color: var(--link-color-dark-bg); /* 白色 */
    text-shadow: none; /* 移除阴影 */
}

.social a:hover {
    color: var(--link-hover-color); /* 悬停变灰 */
}

.social-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 1.1em;
}

.social-item img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

/* --- 5. 右侧 (内容区) 样式 --- */

.right {
    flex-grow: 1;
    min-width: 0; 
}

/* --- 数字时钟样式 (变大，透明，适应壁纸) --- */

.clock-card {
    text-align: center;
    padding: 30px 0; 
    margin-bottom: 30px; 
    /* 保留文字阴影，因为时钟是全透明悬浮的 */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7), 0 0 5px rgba(0, 0, 0, 0.7); 
}

#time {
    font-size: 5em; 
    font-weight: 700;
    color: #fff; 
    letter-spacing: 5px; 
    margin-bottom: 5px;
    line-height: 1; 
}

#date {
    font-size: 1.5em; 
    color: #ddd; 
}

/* 笔记区 */
.notes ul {
    list-style: none;
    margin-left: 0;
    padding-top: 10px;
}

.notes li {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
}

.notes li:last-child {
    border-bottom: none;
}

.notes a, .more {
    color: var(--link-color-dark-bg);
}

.notes a:hover, .more:hover {
    color: var(--link-hover-color);
}

.more {
    display: block;
    text-align: right;
    margin-top: 15px;
    font-weight: bold;
}

/* 导航区 */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); 
    gap: 15px;
    margin-top: 15px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    
    /* 导航项保持透明 */
    border: none;
    border-radius: var(--border-radius);
    background-color: transparent; 
    box-shadow: none; 
    
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--link-color-dark-bg); 
}

.nav-item span {
    color: var(--link-color-dark-bg);
    font-weight: 500;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.7); /* 保持阴影，因为它在透明背景上 */
}

.nav-item:hover {
    color: var(--link-hover-color); 
    transform: translateY(-3px);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); 
}

.nav-item img {
    width: 32px;
    height: 32px;
    object-fit: contain; 
    margin-bottom: 8px;
    border-radius: 6px; 
}

/* --- 6. 页脚样式 (备案信息) --- */

footer {
    padding: 20px;
    text-align: center;
    font-size: 0.9em;
    color: #aaa;
    margin-top: auto; 
    background-color: var(--dark-card-bg); 
    width: 100%;
}

footer a {
    color: #fff; 
}

footer a:hover {
    color: var(--link-hover-color); 
}

/* --- 7. 响应式设计 --- */

@media (max-width: 768px) {
    .layout {
        flex-direction: column; 
        width: 95%;
        margin: 20px auto;
        /* 移动端恢复顶部对齐 */
        align-items: flex-start;
    }

    .left {
        width: 100%; 
        position: static; 
        margin-bottom: 20px;
        padding: 25px; 
    }

    .nav-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); 
    }
    
    .card {
        padding: 15px;
    }
    
    #time {
        font-size: 3em; 
    }
    #date {
        font-size: 1.2em;
    }
    
    .clock-card {
        text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
    }
}