:root {
    --primary-50: #f5f3ff;
    --primary-100: #ede9fe;
    --primary-200: #ddd6fe;
    --primary-300: #c4b5fd;
    --primary-400: #a78bfa;
    --primary-500: #8b5cf6;
    --primary-600: #7c3aed;
    --primary-700: #6d28d9;
    --primary-800: #5b21b6;
    --primary-900: #4c1d95;

    --secondary-50: #fdf2f8;
    --secondary-100: #fce7f3;
    --secondary-200: #fbcfe8;
    --secondary-300: #f9a8d4;
    --secondary-400: #f472b6;
    --secondary-500: #ec4899;
    --secondary-600: #db2777;
    --secondary-700: #be185d;
    --secondary-800: #9d174d;
    --secondary-900: #831843;

    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;

    --accent-blue: #0ea5e9;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-gradient-start: #e0f2fe;
    --bg-gradient-middle: #f0f9ff;
    --bg-gradient-end: #fdf4ff;

    --surface-01: rgba(255, 255, 255, 0.95);
    --surface-02: rgba(255, 255, 255, 0.85);

    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;

    --border-light: rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --blur-background: blur(20px);
    --transition-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-mode {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111827;
    --bg-gradient-start: #1e1b4b;
    --bg-gradient-middle: #1e293b;
    --bg-gradient-end: #312e81;

    --surface-01: rgba(30, 41, 59, 0.95);
    --surface-02: rgba(30, 41, 59, 0.85);

    --text-primary: #f9fafb;
    --text-secondary: #e5e7eb;
    --text-tertiary: #d1d5db;

    --border-light: rgba(255, 255, 255, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-middle) 50%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    transition: all 0.5s var(--transition-standard);
    position: relative;
    overflow-x: hidden;
}

/* 动态背景 */
.grid-background {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, var(--primary-500) 0%, transparent 15%),
        radial-gradient(circle at 80% 70%, var(--secondary-500) 0%, transparent 15%),
        radial-gradient(circle at 40% 80%, var(--accent-blue) 0%, transparent 15%);
    opacity: 0.05;
    z-index: -3;
}

.geometric-shapes {
    position: fixed;
    inset: 0;
    z-index: -2;
    opacity: 0.15;
}

.geometric-shapes .shape {
    position: absolute;
    background: linear-gradient(45deg, var(--primary-500), var(--secondary-500));
    opacity: 0.2;
    animation: shapeFloat 20s infinite linear;
}

.shape:nth-child(1) {
    width: 300px;
    height: 300px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.shape:nth-child(3) {
    width: 200px;
    height: 200px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    top: 40%;
    left: 80%;
    animation-delay: -10s;
}

@keyframes shapeFloat {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(100px, 50px) rotate(360deg);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.avatar-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 24px;
}

.avatar-glow {
    position: absolute;
    inset: -8px;
    background: linear-gradient(45deg, var(--primary-500), var(--secondary-500), var(--accent-blue));
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.4;
    animation: glowRotate 8s linear infinite;
    z-index: 0;
}

@keyframes glowRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.avatar {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 4px solid var(--surface-01);
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar:hover {
    transform: scale(1.05);
}

.verified-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--accent-blue);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--surface-01);
    z-index: 2;
    font-size: 0.8rem;
    box-shadow: var(--shadow-md);
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--secondary-600) 50%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.tech-badge {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-item {
    background: var(--surface-01);
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    backdrop-filter: var(--blur-background);
    -webkit-backdrop-filter: var(--blur-background);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.badge-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-500);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-primary);
    font-weight: 700;
}

/* ============================
   全新跑马灯 (Marquee) 支持滑动
   ============================ */
.social-marquee-container {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto 40px;
    overflow: hidden;
    position: relative;
    /* 边缘渐隐效果 */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.marquee-wrapper {
    display: flex;
    width: 100%;
    /* 开启原生横向滚动以支持手机端自由滑动 */
    overflow-x: auto;
    padding: 15px 0;
    cursor: grab;
    /* 隐藏滚动条让视觉更干净 */
    scrollbar-width: none;
    /* 针对 Firefox */
    -ms-overflow-style: none;
    /* 针对 IE/Edge */
}

/* 隐藏 Chrome/Safari 滚动条 */
.marquee-wrapper::-webkit-scrollbar {
    display: none;
}

/* 鼠标按下时的抓取手势 */
.marquee-wrapper:active {
    cursor: grabbing;
}

.marquee-track {
    display: flex;
    /* 间距和 Padding 由 JS 重新包装处理，确保无缝衔接不会闪跳 */
    gap: 0;
    padding: 0;
    width: max-content;
}

/* 社交小卡片样式 */
.social-card {
    display: flex;
    align-items: center;
    min-width: 220px;
    background: var(--surface-01);
    backdrop-filter: var(--blur-background);
    -webkit-backdrop-filter: var(--blur-background);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s var(--transition-standard);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    /* 防止拖拽时选中文字或图片 */
    user-select: none;
    -webkit-user-drag: none;
}

.social-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-500);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(236, 72, 153, 0.05));
    z-index: 10;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-right: 15px;
    background: var(--surface-02);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-card:hover .social-icon {
    transform: rotate(8deg) scale(1.1);
}

/* 针对不同平台的 Hover 颜色变化 */
.social-card.facebook:hover .social-icon {
    background: #1877F2;
    color: white;
}

.social-card.instagram:hover .social-icon {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.social-card.messenger:hover .social-icon {
    background: #0084FF;
    color: white;
}

.social-card.twitter:hover .social-icon {
    background: #000000;
    color: white;
}

.social-card.youtube:hover .social-icon {
    background: #FF0000;
    color: white;
}

.social-card.tiktok:hover .social-icon {
    background: #000000;
    color: white;
}

.social-card.telegram:hover .social-icon {
    background: #0088cc;
    color: white;
}

.social-card.twitch:hover .social-icon {
    background: #9146FF;
    color: white;
}

.social-card.linkedin:hover .social-icon {
    background: #0A66C2;
    color: white;
}

.social-card.reddit:hover .social-icon {
    background: #FF4500;
    color: white;
}

.social-card.pinterest:hover .social-icon {
    background: #E60023;
    color: white;
}

.social-card.snapchat:hover .social-icon {
    background: #FFFC00;
    color: #000;
}

.social-card.github:hover .social-icon {
    background: #181717;
    color: white;
}

.social-card.spotify:hover .social-icon {
    background: #1DB954;
    color: white;
}

.social-card.website:hover .social-icon,
.social-card.library:hover .social-icon,
.social-card.google:hover .social-icon,
.social-card.microsoft:hover .social-icon,
.social-card.portfolio:hover .social-icon,
.social-card.speedtest:hover .social-icon,
.social-card.cyberattack:hover .social-icon,
.social-card.qr-code-generator:hover .social-icon,
.social-card.barcode-generator:hover .social-icon,
.social-card.password-generator:hover .social-icon,
.social-card.extract-color:hover .social-icon,
.social-card.lucky-draw:hover .social-icon {
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    color: white;
}

.social-info {
    display: flex;
    flex-direction: column;
}

.social-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
}

.social-handle {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* 主题与辅助按钮 */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--surface-01);
    backdrop-filter: var(--blur-background);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--primary-500);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-500);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-500);
    transform: translateY(-5px);
}

/* ==========================================
   缩小、轻量化的版权胶囊区
   ========================================== */
footer {
    text-align: center;
    padding: 16px 20px;
    max-width: 600px;
    width: calc(100% - 40px);
    background: var(--surface-01);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    backdrop-filter: var(--blur-background);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

footer b {
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }

    .title {
        font-size: 2rem;
    }

    .badge-item {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .theme-toggle {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}