/* 星光边框效果 - 复刻示例代码 */

.star-border-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

/* 渐变边框动画 */
.border-gradient-bottom,
.border-gradient-top {
    position: absolute;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: -1;
}

.border-gradient-bottom {
    bottom: -50%;
    left: -50%;
    animation: rotate-gradient 8s linear infinite;
}

.border-gradient-top {
    top: -50%;
    right: -50%;
    animation: rotate-gradient 8s linear infinite reverse;
}

@keyframes rotate-gradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 按钮样式 - 简约白色风格 */
.hero-button-simple {
    position: relative;
    padding: 12px 28px;
    min-width: 140px; /* 统一最小宽度 */
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center; /* 居中对齐 */
    gap: 8px;
    text-decoration: none;
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: buttonBreath 4s ease-in-out infinite; /* 呼吸灯效果 */
}

/* 按钮背景光效 */
.hero-button-simple::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 70%
    );
    animation: buttonShine 3s linear infinite;
    pointer-events: none;
}

/* 光效移动动画 */
@keyframes buttonShine {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
    }
}

/* 呼吸灯动画 */
@keyframes buttonBreath {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
    }
}

.hero-button-simple:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    animation: none; /* 悬停时停止呼吸灯 */
}

.hero-button-simple:active {
    transform: translateY(-1px) scale(1);
}

.hero-button-simple i {
    font-size: 16px;
    transition: all 0.3s ease;
    animation: iconPulse 2s ease-in-out infinite; /* 图标脉动 */
    position: relative;
    z-index: 1;
}

/* 图标脉动动画 */
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.hero-button-simple:hover i {
    transform: scale(1.3) rotate(10deg);
    animation: iconSpin 0.6s ease; /* 悬停时旋转 */
}

/* 图标旋转动画 */
@keyframes iconSpin {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.3) rotate(180deg);
    }
    100% {
        transform: scale(1.3) rotate(360deg);
    }
}

/* 按钮文字 */
.hero-button-simple span {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.hero-button-simple:hover span {
    letter-spacing: 1px;
}

/* 社交平台链接 - 增强动态效果 */
.platform-link-simple {
    position: relative;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    backdrop-filter: blur(8px);
    animation: platformFloat 3s ease-in-out infinite;
    width: 75px;
    min-width: 75px;
    max-width: 75px;
    box-sizing: border-box;
    overflow: hidden;
}

/* 社交平台按钮背景光效 */
.platform-link-simple::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 70%
    );
    animation: platformGlow 4s ease-in-out infinite;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 光晕动画 */
@keyframes platformGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* 每个按钮不同的延迟和颜色 */
.platform-link-simple:nth-child(1) {
    animation-delay: 0s;
}

.platform-link-simple:nth-child(1):hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%);
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.platform-link-simple:nth-child(2) {
    animation-delay: 0.2s;
}

.platform-link-simple:nth-child(2):hover {
    background: linear-gradient(135deg, rgba(254, 202, 87, 0.2) 0%, rgba(254, 202, 87, 0.1) 100%);
    border-color: rgba(254, 202, 87, 0.5);
    box-shadow: 0 10px 30px rgba(254, 202, 87, 0.4);
}

.platform-link-simple:nth-child(3) {
    animation-delay: 0.4s;
}

.platform-link-simple:nth-child(3):hover {
    background: linear-gradient(135deg, rgba(72, 219, 251, 0.2) 0%, rgba(72, 219, 251, 0.1) 100%);
    border-color: rgba(72, 219, 251, 0.5);
    box-shadow: 0 10px 30px rgba(72, 219, 251, 0.4);
}

.platform-link-simple:nth-child(4) {
    animation-delay: 0.6s;
}

.platform-link-simple:nth-child(4):hover {
    background: linear-gradient(135deg, rgba(29, 209, 161, 0.2) 0%, rgba(29, 209, 161, 0.1) 100%);
    border-color: rgba(29, 209, 161, 0.5);
    box-shadow: 0 10px 30px rgba(29, 209, 161, 0.4);
}

.platform-link-simple:nth-child(5) {
    animation-delay: 0.8s;
}

.platform-link-simple:nth-child(5):hover {
    background: linear-gradient(135deg, rgba(95, 39, 205, 0.2) 0%, rgba(95, 39, 205, 0.1) 100%);
    border-color: rgba(95, 39, 205, 0.5);
    box-shadow: 0 10px 30px rgba(95, 39, 205, 0.4);
}

/* 平台按钮浮动动画 */
@keyframes platformFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.platform-link-simple i {
    font-size: 20px;
    transition: all 0.3s ease;
    animation: iconWiggle 3s ease-in-out infinite;
    position: relative;
}

/* 图标摆动动画 */
@keyframes iconWiggle {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-5deg) scale(1.05);
    }
    75% {
        transform: rotate(5deg) scale(1.05);
    }
}

.platform-link-simple:hover {
    transform: translateY(-10px) scale(1.1);
    color: #fff;
    animation: none; /* 悬停时停止浮动 */
}

.platform-link-simple:hover::before {
    opacity: 1; /* 悬停时显示光晕 */
}

.platform-link-simple:hover i {
    transform: scale(1.3) rotate(360deg);
    animation: none; /* 悬停时停止摆动 */
}

.platform-link-simple:active {
    transform: translateY(-5px) scale(1.05);
}

/* 圆角卡片 */
.rounded-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
}

.rounded-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 模态框样式 - 优化版 */
.modal-custom {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-custom.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-custom {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95) 0%, rgba(10, 10, 20, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    background-clip: padding-box;
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 40px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    position: relative;
}

/* 弹窗滑入动画 */
@keyframes modalSlideUp {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 自定义滚动条 - 简约白色风格 */
.modal-content-custom::-webkit-scrollbar {
    width: 8px;
}

.modal-content-custom::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 10px 0;
}

.modal-content-custom::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modal-content-custom::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* 弹窗内链接悬停效果 */
.modal-content-custom a:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    transform: translateX(5px) scale(1.01);
}

/* 网站卡片按钮优化 */
.website-card-btn {
    position: relative;
    overflow: hidden;
}

.website-card-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.website-card-btn:hover::before {
    left: 100%;
}

/* 网站卡片图标动画 */
.website-card-btn:hover .fa-globe,
.website-card-btn:hover .fa-blog,
.website-card-btn:hover .fa-github,
.website-card-btn:hover .fa-project-diagram {
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
}

/* 文章卡片滑入动画 */
@keyframes articleSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-close-custom {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-close-custom:hover {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.8) 0%, rgba(255, 50, 50, 0.8) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: rotate(90deg) scale(1.15);
    box-shadow: 0 6px 25px rgba(255, 100, 100, 0.5);
}

.modal-close-custom:active {
    transform: rotate(90deg) scale(0.95);
}

.modal-title-custom {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.2));
}



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

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* 二维码弹窗 */
.qrcode-modal-custom {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.qrcode-modal-custom.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-content-custom {
    background: rgba(20, 20, 20, 0.98);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 45px;
    text-align: center;
    position: relative;
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
}

.qrcode-image-custom {
    width: 240px;
    height: 240px;
    margin: 25px auto;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.qrcode-image-custom:hover {
    transform: scale(1.02);
}

.qrcode-image-custom img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qrcode-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
}

.qrcode-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-top: 15px;
    font-weight: 300;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .modal-content-custom {
        padding: 30px 20px;
        width: 95%;
    }

    .modal-close-custom {
        width: 50px;
        height: 50px;
        font-size: 28px;
        top: 15px;
        right: 15px;
        /* 确保在移动端可点击 */
        z-index: 10002;
        touch-action: manipulation;
    }

    .qrcode-content-custom {
        padding: 30px 20px;
    }

    .qrcode-image-custom {
        width: 200px;
        height: 200px;
    }
}

