/* common.css - 公共样式 */


/* 基础样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

a {
    text-decoration: none;
    color: #fff;
}

a:hover {
    color: #8f94fb;
}

body {
    background: #000;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 1s ease, color 1s ease;
}

body.light-theme {
    background: #fff;
    color: #000;
}


/* Logo动画区域 */

#logo-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    z-index: 1000;
    transition: opacity 1s, transform 1.5s;
}

#logo-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.logo-layer {
    position: absolute;
    transition: all 1.5s ease;
}

#logo1 {
    width: 1000px;
    height: 1000px;
    opacity: 0;
    animation: fadeIn 1.5s forwards 0.5s;
    z-index: 2;
}

#logo2 {
    width: 1100px;
    height: 1100px;
    opacity: 0;
    animation: fadeIn 1.5s forwards 1.5s;
    z-index: 5;
}

#logo3 {
    width: 1000px;
    height: 1000px;
    opacity: 0;
    animation: fadeIn 1.5s forwards 2.5s;
    z-index: 1;
}


/* 头部区域 */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.8s ease;
}

header.visible {
    opacity: 1;
    transform: translateY(0);
}

.header-logo {
    background-image: url("ln.png");
    width: 200px;
    height: 200px;
    opacity: 0;
    transition: all 0.8s ease;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

body.light-theme nav a {
    color: #000;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s;
}

body.light-theme nav a::after {
    background: #000;
}

nav a:hover::after {
    width: 100%;
}


/* 粒子背景 */

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}


/* 悬浮按钮 */

.floating-btn {
    position: fixed;
    right: 30px;
    z-index: 200;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.theme-toggle {
    bottom: 30px;
    background: #fff;
    color: #000;
}

body.light-theme .theme-toggle {
    background: #000;
    color: #fff;
}

.floating-btn i {
    font-size: 24px;
}


/* 音乐控制 */

.music-control {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 200;
    transition: all 0.3s;
}

.music-control:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

body.light-theme .music-control {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .music-control:hover {
    background: rgba(0, 0, 0, 0.2);
}


/* 页脚 */

footer {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 14px;
    opacity: 0;
    transition: opacity 1s ease;
}

footer.visible {
    opacity: 0.7;
}

body.light-theme footer {
    color: #999;
}


/* 图片容器（详情弹窗） */

.image-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 80%;
    max-width: 900px;
    max-height: 90vh;
    background: rgba(20, 20, 30, 0.95);
    border-radius: 12px;
    padding: 20px;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

body.light-theme .image-container {
    background: rgba(250, 250, 255, 0.95);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

.image-container.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.image-container img {
    height: 300px;
    max-height: calc(40vh);
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto;
}

.image-title {
    font-size: 28px;
    margin: 20px 0 10px;
    text-align: center;
    color: #4e54c8;
}

body.light-theme .image-title {
    color: #8f94fb;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

body.light-theme .close-btn {
    background: rgba(0, 0, 0, 0.1);
}

body.light-theme .close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

.image-desc {
    font-size: 18px;
    color: #aaa;
    text-align: center;
    margin-bottom: 15px;
    padding: 0 20px;
    line-height: 1.5;
    overflow-y: auto;
    max-height: 40vh;
}

body.light-theme .image-desc {
    color: #666;
}


/* 动画定义 */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 3s infinite;
}


/* 响应式 */

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    .header-logo {
        width: 60px;
        height: 60px;
    }
    nav ul {
        gap: 15px;
    }
    .image-container {
        width: 95%;
        padding: 15px;
    }
    .image-title {
        font-size: 22px;
    }
    .image-desc {
        font-size: 16px;
        max-height: 40vh;
    }
    .image-container img {
        max-height: 30vh;
    }
}

@media (max-width: 480px) {
    .image-title {
        font-size: 20px;
    }
    .image-desc {
        font-size: 15px;
        max-height: 35vh;
    }
    .image-container img {
        max-height: 25vh;
    }
}