/* ===== 宇宙星空入口页面样式 ===== */
@import "https://fonts.googleapis.com/css2?family=Megrim&display=swap";

/* 页面容器 */
#space-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* 提示文字 */
.space-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    text-align: center;
    animation: hintFadeInOut 6s ease-in-out forwards;
    pointer-events: none;
}

.hint-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: hintIconPulse 2s ease-in-out infinite;
}

.hint-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                 0 0 40px rgba(255, 215, 0, 0.5),
                 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.05em;
}

@keyframes hintFadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
        display: none;
    }
}

@keyframes hintIconPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
    }
    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.9));
    }
}

/* Three.js Canvas */
#space-page canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* NOVA 标题文字 */
#word {
    font-family: Megrim, cursive;
    font-size: 20vh;
    position: absolute;
    margin: 10px;
    color: #fc0;
    -webkit-text-stroke: 0.15vh #c0f;
    z-index: 10;
    pointer-events: none;
    user-select: none;
}

/* 内容覆盖层 */
.space-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

/* 标题区域 */
.space-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.space-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 30px rgba(186, 85, 211, 0.6),
                 0 0 60px rgba(186, 85, 211, 0.4);
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 1; }
}

/* 浮动星球容器 */
.floating-planets {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 500px;
    margin: 0 auto;
}

/* 浮动星球 */
.floating-planet {
    position: absolute;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 5;
}

.floating-planet:nth-child(1) {
    top: 10%;
    left: 15%;
    animation: planetFloat 6s ease-in-out infinite;
}

.floating-planet:nth-child(2) {
    top: 15%;
    right: 20%;
    animation: planetFloat 7s ease-in-out infinite 1s;
}

.floating-planet:nth-child(3) {
    top: 50%;
    left: 10%;
    animation: planetFloat 8s ease-in-out infinite 2s;
}

.floating-planet:nth-child(4) {
    top: 55%;
    right: 15%;
    animation: planetFloat 7.5s ease-in-out infinite 1.5s;
}

.floating-planet:nth-child(5) {
    bottom: 15%;
    left: 30%;
    animation: planetFloat 6.5s ease-in-out infinite 0.5s;
}

.floating-planet:nth-child(6) {
    bottom: 10%;
    right: 25%;
    animation: planetFloat 7.2s ease-in-out infinite 2.5s;
}

@keyframes planetFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.floating-planet:hover {
    transform: scale(1.2) !important;
}

.planet-glow-effect {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glowPulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.planet-sphere {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.4),
                inset -10px -10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.floating-planet:hover .planet-sphere {
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.8),
                inset -10px -10px 30px rgba(0, 0, 0, 0.5);
}

.planet-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* 瞬间弹窗 */
.moment-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    animation: fadeIn 0.3s ease;
}

.moment-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.moment-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.moment-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: rgba(20, 15, 35, 0.95);
    border: 1px solid rgba(186, 85, 211, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(186, 85, 211, 0.3);
    animation: slideUp 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.moment-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 2rem;
    line-height: 1;
    font-weight: 300;
}

.moment-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.moment-close i {
    font-size: 1.2rem;
}

.moment-body {
    flex: 1;
    padding: 3rem 2rem 2rem;
    overflow-y: auto;
}

.moment-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
}

.moment-loading i {
    font-size: 2.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.moment-content {
    color: rgba(255, 255, 255, 0.9);
}

.moment-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.moment-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.moment-images img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.moment-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.moment-time i {
    font-size: 1rem;
}

.moment-empty {
    text-align: center;
    padding: 3rem 2rem;
}

.moment-empty p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.moment-link {
    color: #ba55d3;
    text-decoration: none;
    font-weight: 600;
}

.moment-link:hover {
    text-decoration: underline;
}

.moment-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.moment-btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(186, 85, 211, 0.3);
    background: rgba(186, 85, 211, 0.1);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.moment-btn:hover {
    background: rgba(186, 85, 211, 0.2);
    border-color: rgba(186, 85, 211, 0.5);
    transform: translateY(-2px);
}

.moment-btn-primary {
    background: linear-gradient(135deg, #ba55d3, #9370db);
    border-color: transparent;
}

.moment-btn-primary:hover {
    box-shadow: 0 4px 20px rgba(186, 85, 211, 0.4);
}

.moment-btn i {
    font-size: 1.1rem;
}

/* 旧的卡片样式（隐藏） */
.galaxy-card {
    display: none;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
}

.galaxy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.galaxy-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.galaxy-card:hover::before {
    opacity: 1;
}

/* 星系轨道 */
.galaxy-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.galaxy-card:hover .orbit-ring {
    opacity: 1;
}

.ring-1 {
    width: 120px;
    height: 120px;
    animation: rotate 10s linear infinite;
}

.ring-2 {
    width: 150px;
    height: 150px;
    animation: rotate 15s linear infinite reverse;
}

.ring-3 {
    width: 180px;
    height: 180px;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 星系核心 */
.galaxy-core {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    z-index: 1;
}

.core-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    animation: coreGlow 3s ease-in-out infinite;
}

.galaxy-card[data-galaxy="memory"] .core-glow {
    background: radial-gradient(circle, rgba(186, 85, 211, 0.4), transparent);
}

.galaxy-card[data-galaxy="daily"] .core-glow {
    background: radial-gradient(circle, rgba(65, 105, 225, 0.4), transparent);
}

.galaxy-card[data-galaxy="mood"] .core-glow {
    background: radial-gradient(circle, rgba(255, 107, 157, 0.4), transparent);
}

.galaxy-card[data-galaxy="creation"] .core-glow {
    background: radial-gradient(circle, rgba(255, 165, 0, 0.4), transparent);
}

@keyframes coreGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.core-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.3),
                inset 0 0 30px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
}

.galaxy-card[data-galaxy="memory"] .core-center {
    background: linear-gradient(135deg, #ba55d3, #9370db);
}

.galaxy-card[data-galaxy="daily"] .core-center {
    background: linear-gradient(135deg, #4169e1, #1e90ff);
}

.galaxy-card[data-galaxy="mood"] .core-center {
    background: linear-gradient(135deg, #ff6b9d, #ff1493);
}

.galaxy-card[data-galaxy="creation"] .core-center {
    background: linear-gradient(135deg, #ffa500, #ff8c00);
}

.galaxy-card:hover .core-center {
    transform: translate(-50%, -50%) scale(1.1) rotate(360deg);
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.6),
                inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.galaxy-emoji {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 星系信息 */
.galaxy-info {
    text-align: center;
    z-index: 1;
}

.galaxy-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.galaxy-card:hover .galaxy-name {
    transform: scale(1.05);
}

.galaxy-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    transition: color 0.3s ease;
}

.galaxy-card:hover .galaxy-desc {
    color: rgba(255, 255, 255, 0.9);
}

/* 响应式 */
@media screen and (max-width: 768px) {
    .floating-planets {
        height: 400px;
    }
    
    .floating-planet:nth-child(1) {
        top: 5%;
        left: 10%;
    }
    
    .floating-planet:nth-child(2) {
        top: 10%;
        right: 10%;
    }
    
    .floating-planet:nth-child(3) {
        top: 40%;
        left: 5%;
    }
    
    .floating-planet:nth-child(4) {
        top: 45%;
        right: 5%;
    }
    
    .floating-planet:nth-child(5) {
        bottom: 10%;
        left: 20%;
    }
    
    .floating-planet:nth-child(6) {
        bottom: 5%;
        right: 15%;
    }
    
    .planet-sphere {
        width: 80px;
        height: 80px;
    }
    
    .planet-icon {
        font-size: 2.5rem;
    }
    
    .planet-glow-effect {
        width: 140px;
        height: 140px;
    }
    
    .moment-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .moment-body {
        padding: 2.5rem 1.5rem 1.5rem;
    }
    
    .moment-text {
        font-size: 1rem;
    }
    
    .moment-actions {
        flex-direction: column;
        padding: 1rem 1.5rem;
    }
    
    .moment-btn {
        width: 100%;
    }
    
    .space-hint {
        padding: 0 1rem;
    }
    
    .hint-icon {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .hint-text {
        font-size: 1.1rem;
    }
    
    .space-content {
        padding: 3rem 1.5rem;
    }
    
    .space-title {
        font-size: 2.5rem;
    }
    
    .space-subtitle {
        font-size: 1rem;
    }
    
    .space-header {
        margin-bottom: 3rem;
    }
    
    .galaxies-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 400px;
    }
    
    .galaxy-card {
        padding: 1.5rem;
    }
    
    .galaxy-core {
        width: 100px;
        height: 100px;
        margin-bottom: 1.5rem;
    }
    
    .core-center {
        width: 80px;
        height: 80px;
    }
    
    .core-glow {
        width: 120px;
        height: 120px;
    }
    
    .galaxy-emoji {
        font-size: 2.5rem;
    }
    
    .orbit-ring {
        display: none;
    }
    
    .galaxy-name {
        font-size: 1.3rem;
    }
    
    .galaxy-desc {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .space-title {
        font-size: 2rem;
    }
    
    .space-subtitle {
        font-size: 0.9rem;
    }
}

