/* 友情链接页面样式 - 现代化毛玻璃设计 */

.links-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 100px);
}

.links-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 50px;
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        0 0 100px rgba(87, 180, 1, 0.05);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

/* 暗色主题适配 */
[data-theme="dark"] .links-content {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(148, 163, 184, 0.1) inset;
}

.links-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        rgba(87, 180, 1, 0.1) 0deg,
        rgba(110, 217, 5, 0.15) 90deg,
        rgba(74, 222, 128, 0.1) 180deg,
        rgba(34, 197, 94, 0.15) 270deg,
        rgba(87, 180, 1, 0.1) 360deg
    );
    animation: rotate 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

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

.links-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.links-title {
    font-size: 3.2em;
    background: linear-gradient(135deg, 
        #57b401 0%, 
        #6ed905 30%, 
        #4ade80 60%, 
        #22c55e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 0 4px 8px rgba(87, 180, 1, 0.3);
    position: relative;
    display: inline-block;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.links-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(87, 180, 1, 0.2) 0%, 
        rgba(110, 217, 5, 0.2) 30%, 
        rgba(74, 222, 128, 0.2) 60%, 
        rgba(34, 197, 94, 0.2) 100%);
    filter: blur(10px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.links-title:hover::before {
    opacity: 1;
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(87, 180, 1, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(110, 217, 5, 0.5));
    }
}

.links-subtitle {
    font-size: 1.3em;
    color: var(--text-secondary);
    margin-bottom: 30px;
    opacity: 0.9;
}

.links-info {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    border-left: 5px solid var(--primary-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .links-info {
    background: rgba(51, 65, 85, 0.8);
    border: 1px solid rgba(100, 116, 139, 0.6);
}

.links-info::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(87, 180, 1, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.links-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.links-info p {
    line-height: 1.8;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1.05em;
}

.links-info .highlight {
    color: var(--primary-color);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-info {
    background: linear-gradient(135deg, 
        rgba(87, 180, 1, 0.9) 0%, 
        rgba(110, 217, 5, 0.9) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(87, 180, 1, 0.3);
}

.contact-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(120deg); }
    66% { transform: translate(-5px, 5px) rotate(240deg); }
}

.contact-info .email {
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.contact-info .email:hover {
    text-decoration: underline;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.links-section h3 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.6em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.link-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .link-item {
    background: rgba(51, 65, 85, 0.7);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary-color), 
        var(--secondary-color), 
        #6366f1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(87, 180, 1, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.link-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(87, 180, 1, 0.2) inset;
    border-color: rgba(87, 180, 1, 0.4);
}

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

.link-item:hover::after {
    width: 200px;
    height: 200px;
}

.link-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.link-name:hover {
    color: var(--secondary-color);
    transform: translateX(3px);
}

.link-name i {
    opacity: 0.7;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.link-item:hover .link-name i {
    opacity: 1;
    transform: translateX(2px);
}

/* 悬停时文字变绿色效果 */
.link-item:hover .link-name {
    color: #22c55e !important;
    background: linear-gradient(135deg, #57b401, #6ed905, #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(87, 180, 1, 0.3);
}

.link-item:hover .link-name i {
    color: #22c55e !important;
    background: linear-gradient(135deg, #57b401, #6ed905, #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 4px rgba(87, 180, 1, 0.4));
}

.link-item:hover .link-description {
    color: #16a34a !important;
    opacity: 1;
}

.link-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9em;
    position: relative;
    z-index: 2;
    opacity: 0.85;
    transition: all 0.3s ease;
}

.links-loading {
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
}

.links-error {
    text-align: center;
    padding: 50px;
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    margin: 20px 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(87, 180, 1, 0.2);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin: 0 auto 20px;
}

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

/* 空状态样式 */
.links-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
    background: rgba(248, 250, 252, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px dashed rgba(203, 213, 225, 0.8);
    border-radius: 16px;
    position: relative;
}

[data-theme="dark"] .links-empty {
    background: rgba(51, 65, 85, 0.6);
    border-color: rgba(100, 116, 139, 0.8);
}

.links-empty i {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.4;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .links-container {
        padding: 15px;
    }
    
    .links-content {
        padding: 30px;
        border-radius: 20px;
    }
    
    .links-title {
        font-size: 2.4em;
    }
    
    .links-subtitle {
        font-size: 1.1em;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .link-item {
        padding: 16px;
    }
    
    .contact-info {
        padding: 20px;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .links-content {
        padding: 20px;
        margin: 10px;
    }
    
    .links-title {
        font-size: 1.8em;
    }
    
    .links-info {
        padding: 20px;
    }
    
    .contact-info {
        padding: 18px;
    }
    
    .link-item {
        padding: 18px;
    }
}

/* 动画效果 */
.links-content {
    animation: fadeInUp 0.8s ease-out;
}

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

.link-item {
    animation: fadeInScale 0.6s ease-out;
    animation-fill-mode: both;
}

.link-item:nth-child(1) { animation-delay: 0.1s; }
.link-item:nth-child(2) { animation-delay: 0.2s; }
.link-item:nth-child(3) { animation-delay: 0.3s; }
.link-item:nth-child(4) { animation-delay: 0.4s; }
.link-item:nth-child(5) { animation-delay: 0.5s; }
.link-item:nth-child(6) { animation-delay: 0.6s; }
.link-item:nth-child(n+7) { animation-delay: 0.7s; }

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

/* 背景装饰效果 */
.links-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(87, 180, 1, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(110, 217, 5, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 60% 20%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
    animation: backgroundShift 15s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -2;
}

@keyframes backgroundShift {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-10px, -10px) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate(10px, 10px) scale(0.95);
        opacity: 0.8;
    }
}

/* 特殊效果：多重粒子动画 */
.links-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(87, 180, 1, 0.4), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(110, 217, 5, 0.4), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(74, 222, 128, 0.4), transparent),
        radial-gradient(1px 1px at 60% 10%, rgba(34, 197, 94, 0.4), transparent),
        radial-gradient(2px 2px at 80% 80%, rgba(99, 102, 241, 0.3), transparent);
    background-repeat: no-repeat;
    background-size: 300px 300px, 400px 400px, 200px 200px, 350px 350px, 250px 250px;
    animation: particles 12s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes particles {
    0% {
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
        opacity: 0.3;
    }
    25% {
        background-position: 20% 20%, 40% 10%, 60% 30%, 80% 20%, 90% 40%;
        opacity: 0.6;
    }
    50% {
        background-position: 40% 40%, 80% 20%, 120% 60%, 160% 40%, 180% 80%;
        opacity: 0.4;
    }
    75% {
        background-position: 60% 60%, 120% 30%, 180% 90%, 240% 60%, 270% 120%;
        opacity: 0.7;
    }
    100% {
        background-position: 100% 100%, 200% 100%, 300% 200%, 400% 300%, 500% 400%;
        opacity: 0.3;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(248, 250, 252, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: rgba(51, 65, 85, 0.5);
}

/* 链接悬停时的光晕效果 */
.link-item:hover {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(87, 180, 1, 0.2) inset,
        0 0 20px rgba(87, 180, 1, 0.1);
}

/* 增强对比度确保文字可读性 */
[data-theme="light"] .contact-info .email {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .contact-info .email {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
} 