/* 宇宙场景专用样式 */

/* Hero 视觉区域 - 宇宙场景 */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.space-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(26, 26, 46, 0.3) 0%, rgba(10, 10, 15, 0.5) 70%, transparent 100%);
    overflow: hidden;
}

/* 星空背景 */
.stars-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #fff, transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(0.5px 0.5px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(0.5px 0.5px at 160px 30px, #ddd, transparent),
        radial-gradient(1px 1px at 200px 120px, rgba(255,255,255,0.9), transparent),
        radial-gradient(0.5px 0.5px at 250px 60px, #fff, transparent),
        radial-gradient(1px 1px at 300px 100px, rgba(255,255,255,0.7), transparent);
    background-repeat: repeat;
    background-size: 350px 200px;
    animation: twinkle 3s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* 宇宙物体容器 */
.cosmic-objects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 行星 */
.planet {
    position: absolute;
    border-radius: 50%;
    animation: orbit 20s linear infinite;
}

.planet-1 {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #ee5a24, #c44569);
    top: 10%;
    left: 15%;
    box-shadow:
        inset -10px -10px 20px rgba(0,0,0,0.3),
        0 0 30px rgba(255, 107, 107, 0.4);
    animation-duration: 25s;
}

.planet-2 {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 25% 25%, #4834d4, #686de0, #30336b);
    top: 60%;
    right: 20%;
    box-shadow:
        inset -8px -8px 15px rgba(0,0,0,0.3),
        0 0 25px rgba(72, 52, 212, 0.4);
    animation-duration: 30s;
    animation-direction: reverse;
}

.planet-3 {
    width: 45px;
    height: 45px;
    background: radial-gradient(circle at 35% 35%, #f0932b, #eb4d4b, #6c5ce7);
    bottom: 15%;
    left: 60%;
    box-shadow:
        inset -6px -6px 12px rgba(0,0,0,0.3),
        0 0 20px rgba(240, 147, 43, 0.4);
    animation-duration: 18s;
}

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

/* 宇宙飞船 */
.spaceship {
    position: absolute;
    animation: fly 15s linear infinite;
}

.spaceship-1 {
    top: 25%;
    left: -100px;
    animation-duration: 12s;
}

.spaceship-2 {
    bottom: 30%;
    right: -80px;
    animation-duration: 18s;
    animation-direction: reverse;
}

.ship-body {
    width: 40px;
    height: 15px;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    border-radius: 20px 5px 5px 20px;
    position: relative;
    box-shadow: 0 0 15px rgba(116, 185, 255, 0.6);
}

.ship-wing-left,
.ship-wing-right {
    position: absolute;
    width: 15px;
    height: 8px;
    background: linear-gradient(45deg, #636e72, #2d3436);
    top: -3px;
}

.ship-wing-left {
    left: 10px;
    border-radius: 5px 0 0 5px;
}

.ship-wing-right {
    right: 10px;
    border-radius: 0 5px 5px 0;
}

.ship-engine {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 6px;
    background: radial-gradient(circle, #fd79a8, #e84393);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(253, 121, 168, 0.8);
    animation: engine-glow 0.5s ease-in-out infinite alternate;
}

.ship-trail {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 3px;
    background: linear-gradient(90deg, rgba(253, 121, 168, 0.8), transparent);
    border-radius: 50%;
}

@keyframes fly {
    0% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(200px) translateY(-20px); }
    50% { transform: translateX(400px) translateY(10px); }
    75% { transform: translateX(600px) translateY(-15px); }
    100% { transform: translateX(800px) translateY(5px); }
}

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

/* 小行星 */
.asteroid {
    position: absolute;
    background: #636e72;
    border-radius: 50% 40% 60% 30%;
    animation: rotate-asteroid 8s linear infinite;
}

.asteroid-1 {
    width: 25px;
    height: 20px;
    top: 40%;
    left: 80%;
    animation-duration: 6s;
}

.asteroid-2 {
    width: 15px;
    height: 18px;
    top: 70%;
    left: 30%;
    animation-duration: 10s;
}

.asteroid-3 {
    width: 20px;
    height: 15px;
    top: 15%;
    right: 40%;
    animation-duration: 8s;
}

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

/* 能量光束 */
.energy-beam {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(116, 185, 255, 0.8), transparent);
    animation: beam-flow 4s ease-in-out infinite;
}

.beam-1 {
    top: 35%;
    left: 0;
    width: 100%;
    animation-delay: 0s;
}

.beam-2 {
    bottom: 25%;
    left: 0;
    width: 100%;
    animation-delay: 2s;
    background: linear-gradient(90deg, transparent, rgba(253, 121, 168, 0.6), transparent);
}

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

/* 分类图标样式 */
.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.category-icon svg {
    width: 30px;
    height: 30px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background: rgba(74, 144, 226, 0.2);
    transform: scale(1.1);
}

.category-card:hover .category-icon svg {
    color: #fff;
    transform: scale(1.1);
}

/* 关于区域图标 */
.feature svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    margin-right: 1rem;
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .space-container {
        height: 300px;
    }

    .planet-1, .planet-2, .planet-3 {
        transform: scale(0.7);
    }

    .spaceship {
        transform: scale(0.8);
    }

    .asteroid-1, .asteroid-2, .asteroid-3 {
        transform: scale(0.6);
    }
}
