/* 全局样式 */
:root {
    --text: #eef1f4;
    --primary: #ff4b93;
    --accent: #00d084;
    --glow: rgba(255, 75, 147, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
    --radius: 16px; /* 稍大一点的圆角更柔和 */
    --neon-blue: #00ddeb;
    --neon-purple: #d946ef;
    --greenA: #2be77a;
    --greenB: #0fbe55;
    --track: #1f232a;
    --track2: #2b313b;
    --thumb: #e5eef9;
    --frame-width: 14px;
    --frame-slice: 32;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Noto Sans SC", "Roboto Condensed", system-ui, sans-serif;
    color: var(--text);
    background: #000 url("/static/images/images/ChatGPTImage.png") repeat center/600px;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.25;
    filter: blur(8px);
    z-index: -1;
}

.wrap {
    max-width: 1300px;
    margin-left: 0;
    padding: 40px 20px; /* 增加顶部和底部间距 */
    flex: 1;
}

.section-header {
    text-align: left;
    margin-bottom: 40px; /* 增加间距 */
    position: relative;
}

.section-header h3 {
    font-size: 36px; /* 稍微增大标题 */
    font-weight: 900;
    background: linear-gradient(45deg, var(--neon-purple), var(--neon-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 3px 10px var(--glow);
    position: relative;
}

.section-header h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
    border-radius: 2px;
}

/* 分隔线 */
.section-divider {
    margin: 50px 0;
    height: 2px; /* 减小线条高度 */
    background: linear-gradient(90deg, transparent, var(--neon-purple), var(--neon-blue), var(--neon-purple), transparent);
    border-radius: 1px;
    position: relative;
    overflow: hidden;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: wave 3s linear infinite;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(200%); }
}

/* 无图片联系方式 - 漂浮胶囊 */
.contact-text-list {
    margin-bottom: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: flex-start;
    position: relative;
}

.contact-text-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    animation: particle 20s linear infinite;
}

@keyframes particle {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

.contact-text-item {
    background: var(--glass-bg);
    backdrop-filter: blur(16px); /* 增强模糊效果 */
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    padding: 16px 28px; /* 增加内边距 */
    display: flex;
    flex-direction: row; /* Ensure row layout */
    align-items: center;
    gap: 12px; /* Slightly reduced gap for tighter layout */
    font-size: 16px;
    color: var(--text);
    box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.37),
            inset 0 1px 0 rgba(255, 255, 255, 0.1); /* 添加内阴影 */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 220px;
    max-width: 360px; /* Slightly increased max-width for longer numbers */
    text-align: center;
    position: relative;
    overflow: hidden;
    transform: translateY(0) rotate(1deg); /* 微调旋转角度 */
    white-space: nowrap; /* Prevent text wrapping */
}

.contact-text-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.contact-text-item:hover::before {
    transform: translateX(100%);
}

.contact-text-item:hover {
    transform: translateY(-4px) scale(1.02) rotate(0deg);
    box-shadow:
            0 20px 40px rgba(255, 75, 147, 0.3),
            0 0 30px rgba(0, 221, 235, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 221, 235, 0.5);
}

.contact-text-icon {
    font-size: 20px; /* 增大图标 */
    filter: drop-shadow(0 0 8px rgba(0, 221, 235, 0.3));
    transition: transform 0.3s ease;
}

.contact-text-item:hover .contact-text-icon {
    transform: scale(1.1);
}

.contact-text-type {
    font-weight: 700;
    background: linear-gradient(90deg, var(--text), var(--neon-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.contact-text-item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap; /* Ensure link text doesn't wrap */
}

.contact-text-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--neon-purple));
    transition: width 0.3s ease;
}

.contact-text-item a:hover::after {
    width: 100%;
}

.contact-text-item a:hover {
    color: var(--neon-purple);
    text-shadow: 0 0 10px rgba(217, 70, 239, 0.5);
}

/* 有图片联系方式 - 翻转卡 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* 更灵活的网格 */
    gap: 32px;
    justify-content: center;
}

.contact-card {
    perspective: 1000px;
    background: linear-gradient(135deg, var(--glass-bg), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    height: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow:
            0 30px 60px rgba(0, 221, 235, 0.2),
            0 0 40px rgba(217, 70, 239, 0.15);
}

.contact-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 更平滑的翻转动画 */
    transform-style: preserve-3d;
}

.contact-card:hover .contact-card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius);
    overflow: hidden;
}

.card-front {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--glass-bg), rgba(255, 255, 255, 0.03));
}

.card-back {
    background: linear-gradient(135deg, var(--glass-bg), rgba(255, 255, 255, 0.06));
    backdrop-filter: blur(16px);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    text-align: center;
    position: relative;
}

.card-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.card-image {
    position: relative;
    aspect-ratio: 1/1;
    width: 100%;
    max-width: 260px; /* Increased size for larger QR code display */
    height: 260px; /* Fixed height to ensure clarity */
    margin: 20px auto; /* Increased margin for better spacing */
    overflow: hidden;
    flex: none; /* 不允许伸缩 */
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.02); /* 二维码背景 */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 完整显示二维码 */
    object-position: center;
    transition: all 0.4s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.contact-card:hover .card-image img {
    transform: scale(1.05);
    filter:
            drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3))
            brightness(1.1); /* 轻微提亮增强扫描效果 */
}

.card-content {
    padding: 0 20px 20px;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: flex-end;
}

.contact-type {
    font-size: 20px; /* 稍微减小字体 */
    font-weight: 800;
    background: linear-gradient(90deg, var(--text), var(--neon-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
    text-align: center;
}

.card-back p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 12px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 768px) {
    .wrap {
        padding: 30px 16px;
    }

    .section-header h3 {
        font-size: 28px;
    }

    .contact-type {
        font-size: 18px;
    }

    .contact-text-item {
        min-width: 100%;
        padding: 12px 20px; /* Reduced padding for mobile */
        border-radius: 40px;
        flex-direction: row; /* Keep row layout */
        gap: 8px;
        text-align: center;
        font-size: 14px; /* Slightly smaller font for mobile */
    }

    .contact-text-icon {
        font-size: 16px; /* Slightly smaller icon */
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .contact-card {
        height: 360px;
    }

    .card-image {
        max-width: 240px; /* Slightly smaller for medium screens */
        height: 240px;
    }
}

@media (max-width: 540px) {
    .section-header h3 {
        font-size: 24px;
    }

    .contact-type {
        font-size: 16px;
    }

    .contact-text-item {
        font-size: 13px; /* Further reduced font size */
        padding: 10px 16px; /* Tighter padding for small screens */
        gap: 6px;
    }

    .contact-text-icon {
        font-size: 14px;
    }

    .contact-card {
        height: 320px;
    }

    .card-image {
        max-width: 200px; /* Further adjusted for very small screens */
        height: 200px;
        margin: 15px auto;
    }
}

/* 柔白描边风 */
.pill a {
    color: #ff4d6d;
    font-weight: 600;
    text-decoration: none;
    -webkit-text-stroke: 0.3px #fff;
    transition: color 0.25s ease, transform 0.2s ease;
}

.pill a:hover {
    color: #ff1744;
    transform: scale(1.05);
}