/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #fff;
    color: #000;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.dark-mode {
    background-color: #000;
    color: #ffffff;
}

/* 封面样式 */
#cover {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* 视频背景 */
.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.bg-video.active {
    opacity: 1;
}

/* 粒子容器 */
#particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* 光点样式 */
.particle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    z-index: 3;
    transition: background-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease;
}

.dark-mode .particle {
    background-color: rgba(0, 255, 128, 0.8);
    box-shadow: 0 0 10px rgba(0, 255, 128, 0.8), 0 0 20px rgba(0, 255, 128, 0.5);
}

.particle:hover {
    transform: scale(1.5);
    z-index: 4;
}

/* 封面标题 */
.cover-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    text-align: center;
}

.cover-title h1 {
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* 开始探索按钮 */
#explore-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    padding: 16px 50px;
    font-size: 20px;
    color: #fff;
    background: none;
    border: 2px solid #fff;
    border-radius: 40px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 500;
    letter-spacing: 0.5px;
}

#explore-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#explore-btn.dark-mode {
    border-color: rgba(0, 255, 128, 0.8);
}

.btn-text {
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    z-index: 1;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

#explore-btn:hover .btn-overlay {
    transform: translateY(0);
}

#explore-btn.dark-mode .btn-overlay {
    background-color: rgba(0, 255, 128, 0.2);
}

/* 点击动画 */
#explore-btn.clicked {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    border-radius: 0;
    border: none;
    transform: translateX(-50%) scale(1);
    transition: 
        width 0.8s cubic-bezier(0.86, 0, 0.07, 1),
        height 0.8s cubic-bezier(0.86, 0, 0.07, 1),
        bottom 0.8s cubic-bezier(0.86, 0, 0.07, 1),
        border-radius 0.8s cubic-bezier(0.86, 0, 0.07, 1);
}

#explore-btn.clicked .btn-text {
    opacity: 0;
    transform: translateY(-20px);
}

#explore-btn.clicked .btn-overlay {
    transform: translateY(0);
    transition: transform 0.8s cubic-bezier(0.86, 0, 0.07, 1);
}

/* 主题切换按钮 */
#theme-toggle {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 10;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

#theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

/* 内部页面的主题切换按钮 */
header #theme-toggle {
    position: fixed;
    color: #000;
    text-shadow: none;
}

.dark-mode header #theme-toggle {
    color: #fff;
}

/* 图片预览框 */
#image-preview {
    position: absolute;
    z-index: 5;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 5px;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#image-preview.visible {
    opacity: 1;
    transform: translateY(0);
}

.dark-mode #image-preview {
    background-color: rgba(28, 28, 30, 0.9);
}

#preview-image {
    max-width: 180px;
    max-height: 180px;
    display: block;
    border-radius: 8px;
}

/* 作品悬浮窗样式 */
#project-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#project-popup.visible {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    position: relative;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
}

#project-popup.visible .popup-content {
    transform: scale(1);
}

.dark-mode .popup-content {
    background-color: #1c1c1e;
    color: #fff;
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #000;
    transition: all 0.3s ease;
}

.close-popup:hover {
    transform: scale(1.1) rotate(90deg);
}

.dark-mode .close-popup {
    color: #fff;
}

#popup-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.popup-image-container {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.popup-image-container:hover {
    transform: scale(1.02);
}

#popup-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

#popup-description {
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 16px;
    color: #333;
}

.dark-mode #popup-description {
    color: #ddd;
}

#popup-link {
    display: inline-block;
    padding: 12px 25px;
    background-color: #0071e3;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.3);
    letter-spacing: 0.5px;
}

#popup-link:hover {
    background-color: #0077ed;
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 113, 227, 0.4);
}

.dark-mode #popup-link {
    background-color: #2a84fb;
    box-shadow: 0 4px 10px rgba(42, 132, 251, 0.3);
}

.dark-mode #popup-link:hover {
    background-color: #47a0ff;
    box-shadow: 0 7px 15px rgba(42, 132, 251, 0.4);
}

.hidden {
    display: none;
}

/* 星星背景 */
#stars {
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: 1407px 1507px #FFF, 1545px 425px #FFF, 646px 1390px #FFF;
    animation: animStar 50s linear infinite;
}

#stars:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: 1407px 1507px #FFF, 1545px 425px #FFF, 646px 1390px #FFF;
}

#stars2 {
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 1137px 1004px #FFF, 1608px 1129px #FFF, 362px 339px #FFF;
    animation: animStar 100s linear infinite;
}

#stars2:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 1137px 1004px #FFF, 1608px 1129px #FFF, 362px 339px #FFF;
}

#stars3 {
    width: 3px;
    height: 3px;
    background: transparent;
    box-shadow: 1324px 42px #FFF, 217px 1432px #FFF, 626px 530px #FFF;
    animation: animStar 150s linear infinite;
}

#stars3:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 3px;
    height: 3px;
    background: transparent;
    box-shadow: 1324px 42px #FFF, 217px 1432px #FFF, 626px 530px #FFF;
}

@keyframes animStar {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-2000px);
    }
}

/* 宇航员动画 */
#astronaut {
    position: absolute;
    width: 250px;
    height: 300px;
    z-index: 5;
    animation: float 6s ease-in-out infinite;
}

#astronaut img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(var(--move-x1), var(--move-y1));
    }
    50% {
        transform: translate(var(--move-x2), var(--move-y2));
    }
    75% {
        transform: translate(var(--move-x3), var(--move-y3));
    }
}

/* 图片画廊样式 */
#image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 15px;
    margin-top: 20px;
}

#image-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
}

#image-gallery img:hover {
    transform: scale(1.05);
}

.paused {
    animation-play-state: paused !important;
}

/* 内部页面导航栏样式 - 苹果风格 */
header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #000;
    padding: 16px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(-100%);
}

header.visible {
    opacity: 1;
    transform: translateY(0);
}

body.dark-mode header {
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
}

nav {
    display: flex;
    justify-content: center;
}

nav ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    gap: 24px;
}

nav ul li a {
    color: #000;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 24px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

nav ul li a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

nav ul li a.active {
    background-color: rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

body.dark-mode nav ul li a {
    color: #fff;
}

body.dark-mode nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(var(--move-x1), var(--move-y1));
    }
    50% {
        transform: translate(var(--move-x2), var(--move-y2));
    }
    75% {
        transform: translate(var(--move-x3), var(--move-y3));
    }
}

/* 内容区域样式 */
.content-section, .resume-section, .content-container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 40px;
    background-color: #f5f5f7;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
}

.content-section.visible, 
.resume-section.visible, 
.content-container.visible {
    opacity: 1;
    transform: translateY(0);
}

body.dark-mode .content-section, 
body.dark-mode .resume-section, 
body.dark-mode .content-container {
    background-color: #1c1c1e;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* 页面过渡动画 */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.86, 0, 0.07, 1);
}

.dark-mode .page-transition {
    background-color: #000;
}

.page-transition.active {
    transform: translateY(0);
}

.page-transition.complete {
    transform: translateY(-100%);
} 