:root {
    --text-color: #ffffff;
    --text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
    --link-hover-color: #aee6ff;
}

body {
    font-family: 'Poppins', 'Noto Sans SC', sans-serif;
    background: url('img/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-color);
    margin: 0;
    padding: 2rem;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    text-align: center;
    animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hitokoto-wrapper {
    max-width: 700px;
}

#hitokoto_text {
    font-size: 1.8rem;
    font-weight: 300;
    text-shadow: var(--text-shadow);
    margin: 0;
}

#hitokoto_from {
    margin-top: 1rem;
    font-size: 1rem;
    opacity: 0.8;
    text-shadow: var(--text-shadow);
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    animation: fadeIn 1.5s ease-out;
}

.profile {
    display: flex;
    align-items: center;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
    margin-right: 1rem;
}

.profile-info h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    text-shadow: var(--text-shadow);
}

.profile-info .bio {
    margin: 0;
    opacity: 0.9;
}

/* ====== 社交图标部分 ====== */
.social-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.social-links img {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.4));
}

/* 悬停动画 */
.social-links a:hover img {
    transform: scale(1.15);
}

/* 品牌色 */
.social-links a[title="GitHub"]:hover img {
    filter: brightness(0) saturate(100%) invert(35%) sepia(12%) saturate(179%) hue-rotate(175deg) brightness(90%) contrast(90%);
}

.social-links a[title="Bilibili"]:hover img {
    filter: brightness(0) saturate(100%) invert(56%) sepia(89%) saturate(2497%) hue-rotate(177deg) brightness(100%) contrast(95%);
}

.social-links a[title="个人博客"]:hover img {
    /* target color: #0E83CD */
    filter: brightness(0) saturate(100%) invert(32%) sepia(92%) saturate(1570%) hue-rotate(180deg) brightness(92%) contrast(101%);
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding: 1rem;
        overflow: auto; /* 允许滚动，避免底部被遮挡 */
    }
    footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-bottom: calc(16px + constant(safe-area-inset-bottom));
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
    .profile {
        flex-direction: column;
        margin-bottom: 1rem;
    }
    .avatar {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    .social-links {
        margin-top: 1rem;
    }
    .social-links a {
        margin: 0 0.75rem;
    }
    .copyright {
        margin-top: 1rem;
    }
    #hitokoto_text {
        font-size: 1.4rem;
    }
}

/* 动态视口高度，修正移动端地址栏高度波动 */
@supports (height: 100dvh) {
    body { min-height: 100dvh; }
}
