/* ==================== 
   全局基础设置 
   ==================== */
html {
    font-family: "HarmonyOS_Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    background-color: #202124;
    background: url('../img/background.png') no-repeat center center fixed;
    background-size: cover;
    overflow-x: hidden;
    cursor: default;
    z-index: -5;
    animation: image-fade-in 1s ease;
    min-height: 100vh; /* 保证至少有一屏高 */
}

/* ==================== 
   核心布局区
   ==================== */
.big-title-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* 强制占满整个屏幕高度 */
    
    /* Flex 布局 */
    display: flex;
    flex-direction: column; /* 从上往下排 */
    justify-content: center; /* 垂直居中 */
    align-items: center;     /* 水平居中 */
    
    pointer-events: none; /* 可穿透 */
    text-align: center;
}

/* 标题样式 */
.title {
    /* 恢复普通定位，不再飘在半空 */
    position: relative; 
    top: auto; 
    pointer-events: auto; /* 恢复文字可选中 */
    
    color: #FFF;
    font-size: 5vw; /* 保持响应式字体 */
    font-weight: normal;
    line-height: 1.2;
    letter-spacing: 0em;
    
    /* 玻璃拟态效果 */
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px 32px; 
    margin-bottom: 20px; /* 标题和副标题之间的距离 */
    
    animation: text-fade-in 1.5s;
}

/* 副标题样式 */                                                                
.sub-title {
    /* 恢复普通定位 */
    position: relative;
    top: auto; 
    left: auto;
    pointer-events: auto;
    padding-top: 0; /* 去掉原来巨大的 padding */
    
    color: #dedede;
    font-weight: normal;
    font-size: 2vw;
    letter-spacing: 0em;
    
    animation: text-fade-in 1.5s;
}

/* ==================== 
   移动端适配
   ==================== */
@media screen and (max-width: 768px) {
    /* 手机上字体稍微大一点，不然看不清 */
    .title {
        font-size: 8vw; 
        padding: 12px 24px;
    }
    
    .sub-title {
        font-size: 4.5vw;
    }
    
}

/* ==================== 
   动画 
   ==================== */
@keyframes header-fade-in {
    from { opacity: 0; }
    to { opacity: 0.6; }
}

@keyframes text-fade-in {
    from { opacity: 0; transform: translateY(20px); } /* 加了一点上浮效果 */
    to { opacity: 1; transform: translateY(0); }
}

@keyframes image-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== 
   Header & Footer （基本没动）
   ==================== */
header {
    background-color: black !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 50px;
    opacity: 0.6;
    z-index: 5;
    padding-top: 10px;
    padding-bottom: 10px;
    /* 加上 box-sizing 防止 padding 把宽度撑爆 */
    box-sizing: border-box; 
    font-size: 20px;
    animation: header-fade-in 2s;
    transition: all 1s ease;
}

header:hover {
    opacity: 0.9;
}

header .left {
    position: static;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 18px;
    color: #FFF;
    animation: text-fade-in 2s;
}

header .left img {
    border-radius: 50%;
}

header a { color: #FFF; text-decoration: none; }

header #time {
    position: absolute;
    width: 100%;
    left: 0;
    top: 10px;
    color: #FFF;
    text-align: center;
    pointer-events: none; /* 防止挡住链接点击 */
    animation: text-fade-in 2s;
}

.arrow {
    position: absolute;
    width: 100%;
    bottom: 20px; /* 改成像素更稳 */
    left: 0;
    text-align: center; /* 居中箭头 */
    animation: text-fade-in 3s;
}

/* ==================== 
   Main & Content 
   ==================== */
main {
    display: block;
    position: relative;
    z-index: 5;
    width: 100%;
}

main .blank {
    position: relative;
    margin-top: 100vh; /* 直接顶到第二屏 */
    text-align: center;
    border-radius: 43px 43px 0 0; /* 只圆上面两个角 */
    width: 100%;
    background-color: transparent;
    color: white !important;
    overflow: hidden; /* 防止圆角溢出 */
}


main .blank .regular_color .info-container {
    background-color: transparent;
    padding: 20px;
    display: flex;
    justify-content: center; /* 水平居中子项 */
    align-items: center;     /* 垂直居中子项 */
    gap: 20px;
    flex-wrap: wrap;        /* 小屏幕时换行 */
    text-align: center;
}

main .blank .regular_color .info-container .about-me {
    background-color: transparent;
    margin: 0 auto;        /* 在可用空间内水平居中 */
    flex: 0 1 360px;       /* 响应式宽度，允许缩放 */
    max-width: 720px;
}

main .blank .regular_color .info-container .about-metrics {
    background-color: transparent;
    margin: 0 auto;
    flex: 0 1 240px;
}

main .blank .regular_color .repos-container {
    background-color: transparent;
    padding: 20px;
    display: flex;
    gap: 20px;
    justify-content: center; /* 居中 repo 项 */
    align-items: center;
    flex-wrap: wrap; 
    width: 100%;
    text-align: center;
}
main .blank .regular_color  { background-color: #202124; padding: 20px; }
main .blank .alternate_color { background-color: #2B2C2F; padding: 20px; }
main .blank .transparent { background-color: transparent; padding: 20px; }

@media screen and (max-width: 768px) {
    main .blank .regular_color .info-container {
        flex-direction: column; /* 手机上强制上下排列 */
    }
}
/* Small-screen fixes: prevent header time overlap and center about-me/repos */
@media screen and (max-width: 768px) {
    /* Stack header items to avoid overlap with centered time */
    header {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 12px;
        padding-right: 12px;
        min-height: auto;
    }

    header .left {
        align-self: flex-start;
        padding-left: 0;
    }

    /* Make the time flow under the left content instead of being absolutely centered */
    header #time {
        position: relative;
        width: 100%;
        left: auto;
        top: auto;
        margin-top: 6px;
        text-align: center;
        pointer-events: none;
    }
}

/* 标签样式 */
.label {
    display: inline-block;
    background-color: #37393e;
    border-radius: 5px;
    padding: 5px 15px;
    margin: 5px;
    color: #ccc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.label:hover {
    color: #fff;
    background-color: #3e9afc; 
    transform: scale(1.05); /* 稍微放大 */
}

/* 一言样式 */
.hitokoto {
    position: absolute;
    bottom: 12%; /* 稍微往上提一点 */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    text-align: center;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.4); /* 加深一点背景 */
    backdrop-filter: blur(5px); /* 给一言也加个毛玻璃 */
    padding: 10px;
    animation: text-fade-in 1s;
    z-index: 2;
}

.hitokoto #hitokoto_text {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
}

footer {
    display: block;
    text-align: center;
    padding: 20px;
    width: 100%;
    color: #fff;
    opacity: 0.8;
    box-sizing: border-box;
}

a { color: #3e9afc; text-decoration: none; transition: color 0.3s; }
a:hover { color: #6eb5ff; }
