* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0f0f0f;
    --text-color: #ffffff;
    --text-secondary: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --hitokoto-from: #ffffff;
    --cursor-color: #5a67d8;
    --particle-color: rgba(102, 126, 234, 0.4);
}



body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    min-height: 100vh;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* 背景图片层 */
.bg-image-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -3;
    transition: opacity 0.5s ease;
}

/* 背景遮罩层 */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    transition: background 0.3s ease;
}

.container {
    width: 100%;
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 1;
}

header {
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4c51bf 0%, #6b46c1 50%, #805ad5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: -1px;
    transition: background 0.3s ease;
}



#user-bio {
    font-size: 1.6rem;
    color: var(--text-color);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.hitokoto-wrapper {
    margin-top: 15px;
    animation: fadeIn 1s ease-out 0.3s both;
}

#hitokoto-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 400;
    min-height: 1.8em;
}

/* 打字机效果样式 */
.typewriter-text {
    display: inline;
}

#hitokoto-from {
    font-size: 0.8rem;
    color: var(--hitokoto-from);
    font-style: italic;
    transition: color 0.3s ease;
}

.socials-section {
    margin: 50px 0;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.socials-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.social-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    transition: color 0.3s ease;
}

.social-wrapper:hover .social-name {
    color: var(--text-color);
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.social-wrapper:hover .social-name {
    color: #ffffff;
}

.social-link svg {
    width: 32px;
    height: 32px;
    fill: var(--text-color);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, fill 0.3s ease;
}

.social-link:hover svg {
    fill: #ffffff;
}

.social-link:hover svg {
    transform: scale(1.1);
}

.tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(0, 0, 0, 0.8);
}



.social-link:hover .tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -50px;
}

/* GitHub贡献图样式 */
.contributions-section {
    margin: 30px 0 50px 0;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.contributions-link {
    text-decoration: none;
    display: inline-block;
}

.contributions-container {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 400px;
    min-height: 120px;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.contributions-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.contributions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--card-border);
}

.contributions-username {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.contributions-username::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23667eea' d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.contributions-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    gap: 12px;
}

.contributions-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: contributions-spin 1s linear infinite;
}

@keyframes contributions-spin {
    to {
        transform: rotate(360deg);
    }
}

.contributions-loading-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.contributions-image {
    display: block;
    width: 100%;
    max-width: 600px;
    height: auto;
    filter: brightness(0.9) contrast(1.1);
    transition: filter 0.3s ease;
}



@media (max-width: 600px) {
    .contributions-container {
        padding: 12px 16px;
        margin: 0 10px;
        min-width: auto;
        min-height: auto;
    }
    
    .contributions-image {
        max-width: 100%;
    }
    
    .contributions-username {
        font-size: 0.9rem;
    }
    
    .contributions-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    animation: fadeIn 1s ease-out 0.7s both;
    transition: color 0.3s ease;
    background: transparent;
    z-index: 100;
    pointer-events: none;
}

footer > * {
    pointer-events: auto;
}

#runtime-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.runtime-label {
    color: var(--text-color);
    margin-right: 6px;
}

.runtime-value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    min-width: 18px;
    text-align: center;
}

.runtime-unit {
    color: var(--text-color);
    font-size: 0.75rem;
    margin-right: 4px;
}

.runtime-unit:last-child {
    margin-right: 0;
}

@media (max-width: 600px) {
    footer {
        bottom: 10px;
        padding: 8px 20px;
    }
    
    #runtime-display {
        font-size: 0.75rem;
    }
    
    .runtime-value {
        font-size: 0.9rem;
        min-width: 16px;
    }
    
    .runtime-unit {
        font-size: 0.7rem;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .hitokoto-card {
        padding: 20px;
    }
    
    #user-bio {
        font-size: 1.3rem;
    }
    
    #hitokoto-text {
        font-size: 0.9rem;
    }
    
    .social-link {
        width: 60px;
        height: 60px;
    }
    
    .social-link svg {
        width: 28px;
        height: 28px;
    }
    
    .social-name {
        font-size: 0.65rem;
        max-width: 70px;
    }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 背景锁定按钮 */
.bg-lock {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    color: var(--text-color);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bg-lock:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.bg-lock.locked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-color: transparent !important;
    color: white !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.bg-lock.locked:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.lock-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.bg-lock:hover .lock-icon {
    transform: scale(1.1);
}

.lock-icon.hidden {
    display: none;
}





.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.theme-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.theme-icon.hidden {
    display: none;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}



/* 粒子轨迹容器 */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* 粒子样式 */
.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--particle-color);
    pointer-events: none;
    box-shadow: 0 0 10px var(--particle-color);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* 移动端按钮位置调整 */
@media (max-width: 600px) {
    .bg-lock {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .lock-icon {
        width: 22px;
        height: 22px;
    }
    
    /* 触摸反馈效果 - 替代hover */
    .social-link:active {
        transform: scale(0.95);
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    }
    
    .social-link:active svg {
        fill: #ffffff;
        transform: scale(1.1);
    }
    
    .bg-lock:active {
        transform: scale(0.9);
    }
    
    .contributions-container:active {
        transform: scale(0.98);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    }
    
    /* 增大点击区域 */
    .social-link {
        min-width: 60px;
        min-height: 60px;
    }
    
    .bg-lock {
        min-width: 50px;
        min-height: 50px;
    }
}

/* Toast消息样式 */
.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    white-space: nowrap;
}

.toast-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.toast-message.hide {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

/* 滑动反馈动画 */
.swipe-feedback {
    position: fixed;
    top: 50%;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    z-index: 9998;
    opacity: 0;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.swipe-left {
    right: 20%;
}

.swipe-right {
    left: 20%;
}

.swipe-feedback.show {
    opacity: 1;
}

.swipe-left.show {
    right: 30%;
}

.swipe-right.show {
    left: 30%;
}

/* 触摸菜单样式 */
.touch-menu {
    position: fixed;
    top: 70px;
    right: 15px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    padding: 8px 0;
    z-index: 10001;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: menuFadeIn 0.2s ease;
    min-width: 160px;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.touch-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.touch-menu-item:active {
    background: rgba(102, 126, 234, 0.3);
}

.touch-menu-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* 禁用文本选择，提升触摸体验 */
@media (max-width: 600px) {
    body {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
    
    /* 允许输入框和代码块选择 */
    input, textarea, code, pre {
        -webkit-user-select: text;
        user-select: text;
    }
}

/* ==================== 骨架屏样式 ==================== */
.skeleton-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.skeleton-container.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 骨架屏头部 */
.skeleton-header {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    max-width: 600px;
}

.skeleton-title {
    width: 280px;
    height: 56px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08) 25%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.08) 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    margin: 0 auto 20px;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-bio {
    width: 200px;
    height: 28px;
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin: 0 auto 25px;
    animation: skeleton-shimmer 1.5s infinite;
    animation-delay: 0.1s;
}

.skeleton-quote {
    width: 90%;
    max-width: 450px;
    height: 22px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin: 0 auto 10px;
    animation: skeleton-shimmer 1.5s infinite;
    animation-delay: 0.2s;
}

.skeleton-author {
    width: 120px;
    height: 16px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin: 0 auto;
    animation: skeleton-shimmer 1.5s infinite;
    animation-delay: 0.3s;
}

/* 骨架屏社交链接 */
.skeleton-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.skeleton-social-item {
    width: 70px;
    height: 70px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08) 25%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.08) 75%);
    background-size: 200% 100%;
    border-radius: 16px;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-social-item:nth-child(1) { animation-delay: 0.1s; }
.skeleton-social-item:nth-child(2) { animation-delay: 0.2s; }
.skeleton-social-item:nth-child(3) { animation-delay: 0.3s; }
.skeleton-social-item:nth-child(4) { animation-delay: 0.4s; }

/* 骨架屏贡献图 */
.skeleton-contributions {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 30px 0 50px;
    width: 100%;
    max-width: 500px;
}

.skeleton-contributions-header {
    width: 140px;
    height: 20px;
    background: linear-gradient(90deg, rgba(255,255,255,0.08) 25%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.08) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 16px;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-contributions-body {
    width: 100%;
    height: 100px;
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: skeleton-shimmer 1.5s infinite;
    animation-delay: 0.1s;
}

/* 骨架屏底部 */
.skeleton-footer {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 20px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s infinite;
}

/* 骨架屏闪烁动画 */
@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 移动端骨架屏适配 */
@media (max-width: 600px) {
    .skeleton-title {
        width: 200px;
        height: 40px;
    }
    
    .skeleton-bio {
        width: 160px;
        height: 24px;
    }
    
    .skeleton-quote {
        width: 85%;
        height: 18px;
    }
    
    .skeleton-author {
        width: 100px;
        height: 14px;
    }
    
    .skeleton-socials {
        gap: 15px;
    }
    
    .skeleton-social-item {
        width: 60px;
        height: 60px;
    }
    
    .skeleton-contributions {
        padding: 12px 16px;
        margin: 20px 10px 40px;
    }
    
    .skeleton-contributions-header {
        width: 120px;
        height: 18px;
    }
    
    .skeleton-contributions-body {
        height: 80px;
    }
    
    .skeleton-footer {
        width: 220px;
        height: 18px;
        bottom: 15px;
    }
}
