/* ===== 桌面端优化样式 ===== */

/* 桌面端网格布局 */
.desktop-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* 桌面端英雄动画 */
.desktop-hero-animation {
    position: relative;
    width: 100%;
    height: 400px;
}

.cyber-shield {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.shield-ring {
    position: absolute;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.ring1 {
    width: 200px;
    height: 200px;
    animation-duration: 25s;
    opacity: 0.3;
}

.ring2 {
    width: 150px;
    height: 150px;
    animation-duration: 20s;
    animation-direction: reverse;
    opacity: 0.2;
    top: 25px;
    left: 25px;
}

.shield-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
}

.data-flow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.flow-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: flow 3s linear infinite;
}

.flow-line:nth-child(1) {
    top: 20%;
    width: 100%;
    animation-delay: 0s;
}

.flow-line:nth-child(2) {
    top: 50%;
    width: 80%;
    left: 10%;
    animation-delay: 1s;
}

.flow-line:nth-child(3) {
    top: 80%;
    width: 60%;
    left: 20%;
    animation-delay: 2s;
}

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

@keyframes flow {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* 桌面端打赏布局 */
.desktop-donate {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* 桌面端联系布局 */
.desktop-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

/* 桌面端悬停效果 */
.desktop-hover-effect {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-hover-effect:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 桌面端平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 桌面端导航栏阴影 */
.main-header {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* 桌面端技能网格悬停 */
.skill-card-desktop:hover .skill-icon-desktop {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s ease;
}

/* 桌面端服务卡片悬停 */
.service-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
}

/* 桌面端打字效果 */
.typed-cursor {
    display: inline-block;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 桌面端进度条动画 */
@keyframes fillProgress {
    from { width: 0; }
    to { width: var(--target-width); }
}

.level-fill {
    animation: fillProgress 1.5s ease-out forwards;
}

/* 桌面端统计数字动画 */
.stat-number {
    transition: all 0.3s ease;
}

/* 桌面端渐变文字效果 */
.gradient-text {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 桌面端3D效果 */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d-inner {
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(10deg) rotateX(5deg);
}

/* 桌面端悬停亮光效果 */
.hover-glow {
    position: relative;
    overflow: hidden;
}

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

.hover-glow:hover::before {
    left: 100%;
}

/* 桌面端视差效果 */
.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 桌面端网格悬停效果 */
.grid-hover {
    position: relative;
}

.grid-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(37, 99, 235, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.grid-hover:hover::after {
    opacity: 1;
}

/* 桌面端工具提示 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: var(--bg-dark);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

/* 桌面端加载动画 */
.loading-animation {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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