/* 全局样式重置与基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-space: #2D3436;
    --space-blue: #17223b;
    --nebula-purple: #6c5ce7;
    --star-yellow: #fdcb6e;
    --cosmic-red: #d63031;
    --meteor-orange: #e67e22;
    --moon-gray: #dfe6e9;
    --transition-hover: 0.3s;
    --transition-click: 0.2s;
    --transition-load: 1.5s;
    --easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Orbitron', sans-serif;
    background-color: var(--deep-space);
    color: var(--moon-gray);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.5s var(--easing), color 0.5s var(--easing);
}

/* 动态粒子背景 */
#particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* 工具类 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 智慧导航系统 */
.space-nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 1200px;
    height: 4rem;
    background: rgba(45, 52, 54, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
    border: 1px solid rgba(108, 92, 231, 0.3);
    transition: all var(--transition-hover) var(--easing);
}

.space-nav:hover {
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.4);
}

.nav-logo {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(145deg, var(--nebula-purple), var(--cosmic-red));
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-hover) var(--easing);
}

.nav-logo:hover {
    transform: rotate(30deg);
    filter: brightness(1.2);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--moon-gray);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 1px;
    position: relative;
    transition: all var(--transition-hover) var(--easing);
    padding: 0.5rem 1rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--nebula-purple);
    transition: width var(--transition-hover) var(--easing);
}

.nav-link:hover {
    color: var(--star-yellow);
}

.nav-link:hover::after {
    width: 100%;
}

.theme-toggle button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, var(--space-blue), var(--deep-space));
    cursor: pointer;
    position: relative;
    transition: all var(--transition-hover) var(--easing);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.theme-toggle button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0.6;
}

.theme-toggle button:hover {
    transform: rotate(180deg);
}

/* 主要内容区域 */
main {
    padding: 7rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}

.section-content {
    transform: translateY(20px);
    opacity: 0;
    animation: fadeIn 1s var(--easing) forwards;
    animation-delay: var(--transition-load);
}

@keyframes fadeIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.space-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(to right, var(--nebula-purple), var(--star-yellow));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
}

.space-text {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
}

/* 记忆回廊（照片轮播） */
.projection-pod {
    background: rgba(23, 34, 59, 0.6);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    perspective: 1000px;
    margin: 3rem 0;
}

.pod-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--star-yellow);
}

.carousel-container {
    position: relative;
}

.carousel {
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: translateX(100%) rotateY(30deg) rotateX(15deg) rotateZ(5deg);
    transition: transform 1s var(--easing);
    opacity: 0;
}

.carousel-item.active {
    transform: translateX(0) rotateY(30deg) rotateX(15deg) rotateZ(5deg);
    opacity: 1;
    z-index: 10;
}

.memory-card {
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.4);
}

.memory-content {
    width: 100%;
    height: 90%;
    position: relative;
}

.memory-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.2) contrast(1.1);
    transition: all var(--transition-hover) var(--easing);
}

.memory-card:hover .memory-content img {
    transform: scale(1.05);
}

.memory-location {
    height: 10%;
    padding: 0.5rem;
    background: rgba(23, 34, 59, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.coordinate {
    color: var(--nebula-purple);
}

.carousel-controls {
    position: absolute;
    bottom: -3rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.carousel-control {
    background: transparent;
    border: 2px solid var(--nebula-purple);
    color: var(--nebula-purple);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-hover) var(--easing);
}

.carousel-control:hover {
    background-color: var(--nebula-purple);
    color: var(--moon-gray);
    transform: scale(1.1);
}

/* 星链社交矩阵 */
.social-network {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 3rem 0;
    position: relative;
}

.social-network::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--nebula-purple), transparent);
    z-index: -1;
}

.social-node {
    position: relative;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(23, 34, 59, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-hover) var(--easing);
    border: 1px solid var(--nebula-purple);
}

.social-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.6);
}

.node-icon {
    font-size: 1.5rem;
    color: var(--moon-gray);
}

.node-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--nebula-purple);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

/* 社交图标 */
.social-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.social-icon.instagram {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23dfe6e9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.5" y2="6.5"></line></svg>');
}

.social-icon.behance {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23dfe6e9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12h6a3 3 0 0 0 0-6H1v12h6a3 3 0 0 0 0-6H1"></path><path d="M16 6h6"></path><path d="M19 6v12"></path><path d="M16 12h6"></path></svg>');
}

.social-icon.wechat {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23dfe6e9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4C6 4 2 7 2 11c0 2 1 4 3 5l-2 2c6 0 6-3 8-3a9 9 0 0 0 9-5c0-4-4-6-9-6z"></path><path d="M16.5 14.5c-1 0-1.5-.5-1.5-1s.5-1 1.5-1 1.5.5 1.5 1-.5 1-1.5 1z"></path><path d="M10.5 14.5c-1 0-1.5-.5-1.5-1s.5-1 1.5-1 1.5.5 1.5 1-.5 1-1.5 1z"></path></svg>');
}

.social-icon.email {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23dfe6e9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>');
}

.quantum-tunnel {
    position: absolute;
    top: -150%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 150px;
    height: 150px;
    background: rgba(23, 34, 59, 0.9);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.5s var(--easing);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.4);
    z-index: 20;
}

.social-node:hover .quantum-tunnel {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.qr-code {
    width: 130px;
    height: 130px;
    background-color: white;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--deep-space);
    font-size: 0.8rem;
    text-align: center;
}

/* 星辰对话舱（AI交互系统） */
.ai-pod {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 350px;
    height: 450px;
    background: rgba(23, 34, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    transform: translateY(calc(100% - 60px));
    transition: transform 0.5s var(--easing);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.3);
    border: 1px solid rgba(108, 92, 231, 0.3);
    z-index: 100;
}

.ai-pod.open {
    transform: translateY(0);
}

.pod-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(108, 92, 231, 0.3);
    cursor: pointer;
}

.pod-toggle {
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    position: relative;
    cursor: pointer;
}

.pod-toggle::before,
.pod-toggle::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 2px;
    background-color: var(--moon-gray);
    top: 50%;
    transition: transform 0.3s var(--easing);
}

.pod-toggle::before {
    left: 25%;
    transform: translateY(-50%) rotate(45deg);
}

.pod-toggle::after {
    right: 25%;
    transform: translateY(-50%) rotate(-45deg);
}

.ai-pod.open .pod-toggle::before {
    transform: translateY(-50%) rotate(-45deg);
}

.ai-pod.open .pod-toggle::after {
    transform: translateY(-50%) rotate(45deg);
}

.pod-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.conversation {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pod-footer {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid rgba(108, 92, 231, 0.3);
}

.message-input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(45, 52, 54, 0.8);
    border: 1px solid var(--nebula-purple);
    border-radius: 1.5rem;
    color: var(--moon-gray);
    font-family: inherit;
    outline: none;
    transition: all var(--transition-hover) var(--easing);
}

.message-input:focus {
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.4);
}

.send-button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: var(--nebula-purple);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-hover) var(--easing);
}

.send-button::before {
    content: '➔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--moon-gray);
}

.send-button:hover {
    transform: scale(1.1);
    background: var(--star-yellow);
}

.send-button:hover::before {
    color: var(--deep-space);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .space-nav {
        width: 95%;
        padding: 0 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.7rem;
    }
    
    .carousel-item {
        transform: translateX(100%) rotateY(20deg) rotateX(10deg) rotateZ(3deg);
    }
    
    .carousel-item.active {
        transform: translateX(0) rotateY(20deg) rotateX(10deg) rotateZ(3deg);
    }
    
    .ai-pod {
        width: 300px;
        height: 400px;
    }
}

@media (max-width: 576px) {
    .space-nav {
        height: 3.5rem;
    }
    
    .nav-logo {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }
    
    .theme-toggle button {
        width: 2rem;
        height: 2rem;
    }
    
    .space-title {
        font-size: 2rem;
    }
    
    .carousel {
        height: 300px;
    }
    
    .carousel-item {
        transform: translateX(100%);
    }
    
    .carousel-item.active {
        transform: translateX(0);
    }
    
    .ai-pod {
        width: 90%;
        right: 5%;
        left: 5%;
    }
} 