/* 三体风格样式表 */
:root {
    --primary-color: #00ffff;
    --secondary-color: #ff00ff;
    --background-dark: #0a0a1a;
    --card-bg: rgba(20, 20, 40, 0.8);
    --text-color: #e0e0ff;
    --text-secondary: #a0a0c0;
    --glow-primary: 0 0 20px rgba(0, 255, 255, 0.5);
    --glow-secondary: 0 0 20px rgba(255, 0, 255, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 1.5s ease-out;
}

.title {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    letter-spacing: 0.2rem;
    font-weight: 300;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
}

.card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease-out;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--glow-primary);
    border-color: var(--primary-color);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-shadow: var(--glow-primary);
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    color: var(--secondary-color);
    text-shadow: var(--glow-secondary);
    transform: scale(1.1);
}

.card-title {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 0.1rem;
}

.card-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.card-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    color: var(--primary-color);
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    transition: all 0.3s ease;
}

.card:hover .card-button {
    background: var(--primary-color);
    color: var(--background-dark);
    box-shadow: var(--glow-primary);
}

.footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
}

/* 动画关键帧 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
        letter-spacing: 0.3rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .header {
        margin-bottom: 2rem;
    }
}

/* 三体元素样式 */
.sophon-container,
.foil-container,
.fleet-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* 智子样式 */
.sophon {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ffff;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 40px #00ffff;
    animation: sophon-pulse 2s ease-in-out infinite;
}

@keyframes sophon-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* 二向箔样式 */
.foil {
    position: absolute;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff00ff, transparent);
    transform-origin: center center;
    animation: foil-float 8s linear infinite;
}

@keyframes foil-float {
    0% {
        transform: rotate(0deg) translateX(0);
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: rotate(360deg) translateX(100px);
        opacity: 0.3;
    }
}

/* 星际舰队样式 */
.fleet-ship {
    position: absolute;
    width: 30px;
    height: 12px;
    background: linear-gradient(90deg, #00ffff, #0088ff, #00ffff);
    clip-path: polygon(0% 50%, 30% 0%, 100% 20%, 100% 80%, 30% 100%);
    animation: fleet-move 15s linear infinite;
    /* 添加飞船细节 */
    background-image: 
        linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(0, 255, 255, 0.2) 50%, transparent 100%);
    /* 添加飞船阴影 */
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
}

/* 飞船引擎效果 */
.fleet-ship::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 2px;
    width: 10px;
    height: 8px;
    background: radial-gradient(circle, #00ffff, #0088ff, transparent);
    border-radius: 50%;
    animation: engine-glow 0.5s ease-in-out infinite alternate;
}

/* 飞船航迹效果 */
.fleet-ship::after {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 15px;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3));
    border-radius: 2px;
}

@keyframes fleet-move {
    0% {
        transform: translateX(-100px) translateY(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(30px) rotate(5deg);
        opacity: 0;
    }
}

@keyframes engine-glow {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 舰队编队样式 */
.fleet-formation {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 通信信号效果 */
.fleet-signal {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ffff;
    border-radius: 50%;
    animation: signal-blink 2s ease-in-out infinite;
    box-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

@keyframes signal-blink {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* 三体名句样式 */
.quotes-container {
    margin-top: 2rem;
    text-align: center;
}

.quote {
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1rem;
    opacity: 0.8;
    animation: quote-fade 4s ease-in-out infinite;
}

.quote:nth-child(2) {
    animation-delay: 1.3s;
}

.quote:nth-child(3) {
    animation-delay: 2.6s;
}

@keyframes quote-fade {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

/* 三日凌空样式 */
.three-suns-container {
    position: fixed;
    top: 0;
    right: 150px;
    width: 450px;
    height: 350px;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

/* 轨道容器 */
.orbit {
    position: absolute;
    width: 0;
    height: 0;
    /* 三体星中心点：left: 415px, top: 175px */
    left: 415px;
    top: 175px;
    transform-origin: 0 0;
}

.orbit-1 {
    animation: orbit-1 15s linear infinite;
}

.orbit-2 {
    animation: orbit-2 20s linear infinite;
}

.orbit-3 {
    animation: orbit-3 25s linear infinite;
}

/* 太阳样式 */
.sun {
    position: absolute;
    border-radius: 50%;
    animation: sun-glow 4s ease-in-out infinite;
}

.sun-1 {
    width: 70px;
    height: 70px;
    /* 轨道半径70px，起始角度0° */
    left: 35px;
    top: -35px;
    background: radial-gradient(circle, #ff6600, #ff3300, #cc0000);
    box-shadow: 0 0 40px #ff6600, 0 0 80px #ff3300, 0 0 120px #cc0000;
    animation-delay: 0s;
}

.sun-2 {
    width: 50px;
    height: 50px;
    /* 轨道半径80px，起始角度120° */
    left: -65px;
    top: 44px;
    background: radial-gradient(circle, #ffcc00, #ff9900, #ff6600);
    box-shadow: 0 0 30px #ffcc00, 0 0 60px #ff9900, 0 0 90px #ff6600;
    animation-delay: 1.3s;
}

.sun-3 {
    width: 90px;
    height: 90px;
    /* 轨道半径90px，起始角度240° */
    left: -90px;
    top: -123px;
    background: radial-gradient(circle, #ffff00, #ffcc00, #ff9900);
    box-shadow: 0 0 50px #ffff00, 0 0 100px #ffcc00, 0 0 150px #ff9900;
    animation-delay: 2.6s;
}

@keyframes sun-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* 三体星样式 */
.three-body-planet {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #4a90d9, #2a6cb8, #1a4a9a);
    box-shadow: 0 0 20px rgba(74, 144, 217, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.8);
    animation: planet-pulse 4s ease-in-out infinite;
    top: 155px;
    right: 15px;
    z-index: 1;
}

.three-body-planet::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 8px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
}

@keyframes planet-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(74, 144, 217, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.8);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(74, 144, 217, 0.7), inset 0 0 20px rgba(0, 0, 0, 0.8);
    }
}

/* 三日凌空的热浪效果 */
.heat-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(255, 100, 0, 0.15), transparent 60%);
    animation: heat-wave-pulse 3s ease-in-out infinite;
}

@keyframes heat-wave-pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
}

/* 轨道旋转动画 */
@keyframes orbit-1 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

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

/* 射电天文望远镜样式 */
.radio-telescope-container {
    position: fixed;
    top: 0;
    left: 150px;
    width: 450px;
    height: 350px;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

.telescope-base {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 30px;
    background: linear-gradient(180deg, #4a4a4a, #2a2a2a);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.telescope-arm {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 100px;
    background: linear-gradient(180deg, #6a6a6a, #3a3a3a);
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.telescope-dish {
    position: absolute;
    bottom: 180px;
    left: 50%;
    width: 90px;
    height: 45px;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 5px,
            rgba(0, 255, 255, 0.4) 5px,
            rgba(0, 255, 255, 0.4) 6px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 5px,
            rgba(0, 255, 255, 0.4) 5px,
            rgba(0, 255, 255, 0.4) 6px
        ),
        radial-gradient(ellipse at 50% 0%, #5a5a5a, #2a2a2a, #0a0a0a);
    border-radius: 50% 50% 0 0;
    border: 2px solid rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6), inset 0 0 25px rgba(0, 0, 0, 0.7);
    transform-style: preserve-3d;
    perspective: 200px;
    transform: translateX(-50%) rotate(225deg);
}

.telescope-dish-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 0 0;
    border: 2px solid rgba(0, 255, 255, 0.3);
    background: transparent;
    transform-origin: center center;
}

.telescope-dish-ring:nth-child(1) {
    animation-duration: 6s;
    border-color: rgba(0, 255, 255, 0.4);
    transform: scale(1);
}

.telescope-dish-ring:nth-child(2) {
    animation-duration: 8s;
    animation-delay: -2s;
    border-color: rgba(0, 255, 255, 0.3);
    transform: scale(0.7);
}

.telescope-dish-ring:nth-child(3) {
    animation-duration: 10s;
    animation-delay: -4s;
    border-color: rgba(0, 255, 255, 0.2);
    transform: scale(0.4);
}

.telescope-feed {
    position: absolute;
    bottom: 270px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: radial-gradient(circle, #00ffff, #0088ff);
    border-radius: 50%;
    box-shadow: 0 0 15px #00ffff, 0 0 30px #00ffff;
    animation: feed-glow 2s ease-in-out infinite;
}

.telescope-signal {
    position: absolute;
    bottom: 280px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: #00ffff;
    border-radius: 50%;
    opacity: 0;
    animation: signal-receive 3s ease-out infinite;
}

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

@keyframes dish-rotate-3d {
    0% {
        transform: translateX(-50%) rotate(0deg) scale(0.9);
    }
    25% {
        transform: translateX(-50%) rotate(90deg) scale(1.1);
    }
    50% {
        transform: translateX(-50%) rotate(180deg) scale(1.3);
    }
    75% {
        transform: translateX(-50%) rotate(270deg) scale(1.1);
    }
    100% {
        transform: translateX(-50%) rotate(360deg) scale(0.9);
    }
}

@keyframes ring-rotate {
    0% {
        transform: rotate(0deg) scale(0.5);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(0.5);
    }
}

@keyframes feed-glow {
    0%, 100% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.2);
    }
}

@keyframes signal-receive {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(-10px) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px) scale(0.5);
    }
}

/* 电磁波发射效果 */
.telescope-em-wave {
    position: absolute;
    bottom: 180px; /* 锅直线边缘位置 */
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border: 2px dashed rgba(0, 255, 255, 0.7);
    border-radius: 50%;
    background: transparent;
    opacity: 0;
    animation: em-wave-expand 3s ease-out infinite;
    transform-origin: center center;
}

@keyframes em-wave-expand {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.1);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) rotate(-45deg) translateX(100px) scale(2);
    }
}