/* 基础容器 */
body  {
    padding: 70px;
}
.container {
    max-width: 1200px;
    margin: 30px auto;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.image-container {
    flex: 0 0 600px;
    height: 400px;
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text-content {
    flex: 1;
    padding: 15px;
}

h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.text-content p {
    margin-bottom: 15px;
    color: #666;
}

/* 我最喜欢的电影 */
.movie-section {
    max-width: 300px;
    margin: 20px auto;
    text-align: center;
}

.movie-section .movie-title {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
}

.movie-section img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.movie-section .quote {
    margin-top: 15px;
    font-style: italic;
    color: #555;
    font-size: 1.1em;
}

/* 图片画廊 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
    text-align: center;
}

.gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    opacity: 1;
}

.gallery img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* 动画定义 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.lightbox.show {
    display: block;
    animation: fadeIn 0.3s ease-out forwards;
}

.lightbox.hide {
    animation: fadeOut 0.3s ease-out forwards;
}

/* 灯箱样式 */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox img {
    margin: 5% auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 20px #000;
    animation: fadeIn 0.3s ease-out;
}

.lightbox p {
    text-align: center;
    color: white;
    font-size: 1.2em;
    margin-top: -20px;
    margin-bottom: 40px;
}

.lightbox::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

/* 导航栏样式 */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 10px 20px;
    z-index: 9999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}

/* 主体内容下移，避免被 topbar 挡住 */
.container,
.movie-section,
.music-section,
.gallery,
.doing-section {
    margin-top: 70px; /* 略大于 topbar 高度 */
}

/* Logo 样式 */
.logo-link {
    display: inline-block;
}

.logo-link img {
    width: 85px;
    height: auto;
}
.logo-link .top-menu {
    margin-left: 20px;
    display: flex;
    gap: 15px;
}

.logo-link .top-menu a {
    color: #f0f0f0;
    text-decoration: none;
    font-size: 16px;
}

/* 我最喜欢做的事情 */
.doing-section {
    max-width: 300px;
    margin: 20px auto;
    text-align: center;
}

.doing-section .doing-title {
    font-size: 2.0em;
    color: #333;
    margin-bottom: 15px;
}

.doing-section p {
    width: 100%;
    height: auto;
    border-radius: 10px;
    text-align: left;
    font-size: 20px;
}

.doing-section iframe {
    width: auto;
    height: auto;
}

.doing-section .quote {
    margin-top: 15px;
    font-style: italic;
    color: #555;
    font-size: 1.1em;
}

/* 我最喜欢的音乐 */
.music-section {
    max-width: 300px;
    margin: 20px auto;
    text-align: center;
}

.music-section .music-title {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
}

.music-section iframe {
    width: auto;
    height: auto;
}

.music-section .quote {
    margin-top: 15px;
    font-style: italic;
    color: #555;
    font-size: 1.1em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 15px;
    }

    .image-container {
        width: 100%;
        height: 300px;
    }

    .movie-section,
    .music-section,
    .doing-section {
        padding: 0 15px;
    }

    .movie-section .movie-title,
    .movie-section .quote,
    .music-section .music-title,
    .music-section .quote,
    .doing-section .doing-title,
    .doing-section .quote {
        font-size: 1.2em;
    }

    .gallery {
        margin-top: 20px;
        justify-content: center;
    }

    .gallery img {
        height: 200px;
    }
}
