body {
    background: linear-gradient(-45deg, #ff9a9e, #fad0c4, #fbc2eb, #a6c1ee);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1, h2, h3 {
    color: #ff1493;
    
}

header {
    background-color: #ff1493;
    color: white;
    padding: 10px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
}

.nav-links {
    display: none;
    list-style: none;
    flex-direction: column;
    background-color: #ff1493;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 50px;
}

.nav-links.show {
    display: flex;
}

.nav-links li {
    margin: 10px 0;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: bold;
}

.start-button {
    display: inline-block;
    margin-top: 20px;
    padding: 15px 30px;
    color: white;
    font-size: 20px;
    background-color: #ff1493;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.start-button:hover {
    background-color: #e01185;
    transform: scale(1.1);
}

/* Animation Styles */
.animation {
    font-size: 60px;
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: shrink-and-replace 4s forwards;
    color: #ff69b4;
    font-family: 'Courier New', Courier, monospace;
}

/* General Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #ffe6f2;
    color: #333;
}

h1, h2, h3 {
    color: #ff1493;
    font-family: 'Georgia', serif;
}

header {
    background-color: #ff1493;
    color: white;
    padding: 10px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
}

.nav-links {
    display: none;
    list-style: none;
    flex-direction: column;
    background-color: #ff1493;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 50px;
}

.nav-links.show {
    display: flex;
}

.nav-links li {
    margin: 10px 0;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: bold;
}

/* Animation Styles */
.animation {
    font-size: 60px;
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: shrink-and-replace 4s forwards;
    color: #ff69b4;
    font-family: 'Courier New', Courier, monospace;
}

.animation.animate {
    animation: shrink-and-replace 4s forwards;
}

@keyframes shrink-and-replace {
    0% {
        font-size: 60px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    100% {
        font-size: 36px;
        top: 60px;
        left: 10px;
        transform: none;
    }
}
.intro-text {
    display: none; /* Hidden initially */
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.intro-text.show {
    display: block;
    opacity: 1; /* Fades in after typing animation */
}

/* Typing Effect */
.typing-effect {
    font-size: 20px;
    line-height: 1.6;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid #ff69b4; /* Blinking cursor */
    width: 0;
    animation: none; /* Animation will be added dynamically */
}

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%; /* Reveal full text */
    }
}

@keyframes blink {
    from {
        border-color: transparent;
    }
    to {
        border-color: #ff69b4; /* Blinking cursor */
    }
}

/* Floating Messages (弹幕样式) */
#floating-messages {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 让弹幕不可点击 */
    overflow: hidden;
    z-index: 10;
}

.floating-message {
    position: absolute;
    font-weight: bold;
    white-space: nowrap;
    animation: float linear infinite; /* 添加浮动动画 */
    pointer-events: none;
}

/* 动画：从右到左漂浮 */
@keyframes float {
    from {
        transform: translateX(100%); /* 从屏幕右侧开始 */
    }
    to {
        transform: translateX(-100%); /* 漂浮到屏幕左侧 */
    }
}



/* Page-Specific Styles */
.page {
    margin: 100px 20px 20px;
}

/* General Video Grid Layout */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
    padding: 0 10px;
}

.video-grid div {
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ff1493;
    border-radius: 5px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-grid div:hover {
    transform: translateY(-5px);
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.2);
}

/* Section Titles */
.video-grid h3 {
    font-size: 18px;
    color: #ff1493;
    margin-bottom: 10px;
}

.video-grid p {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

.video-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.video-item img.thumbnail {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.video-item p {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

#nutrition {
    background-color: #fff5f8;
    padding: 20px;
    border-radius: 5px;
    max-width: 600px;
    margin: 20px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}

#nutrition h2 {
    color: #ff1493;
    text-align: center;
    margin-bottom: 15px;
}

#nutrition-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#nutrition-form input, #nutrition-form button {
    padding: 10px;
    border: 2px solid #ff1493;
    border-radius: 5px;
    font-size: 16px;
}

#nutrition-form button {
    background-color: #ff1493;
    color: white;
    cursor: pointer;
}

#nutrition-form button:hover {
    background-color: #ff69b4;
}

#nutrition-results {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.nutrition-item {
    margin-bottom: 10px;
}

#nutrition-tips {
    margin-top: 30px;
    background-color: #fff5f8;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#nutrition-tips h3 {
    color: #ff1493;
    font-size: 24px;
    margin-bottom: 15px;
}

#nutrition-tips ul {
    list-style-type: disc;
    margin-left: 20px;
}

#nutrition-tips li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}


#contact {
    background-color: #ffebf2;
    padding: 20px;
    border-radius: 5px;
}

/* Letter Styles */
.letter-wrapper {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    margin-top: 80px;
}

.letter {
    width: 500px;
    height: 300px;
    background: #fff;
    border: 2px solid #ff1493;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 1s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.letter.open {
    transform: rotateX(180deg);
}

.letter-text {
    font-size: 24px;
    color: #ff69b4;
    font-weight: bold;
    position: absolute;
    pointer-events: none;
    z-index: 5;
    text-align: center;
}

.letter-top {
    width: 100%;
    height: 50%;
    background: #ff1493;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: bottom;
    transition: transform 1s ease-in-out;
    z-index: 2;
}

.letter.open .letter-top {
    transform: rotateX(-180deg);
}

.letter-bottom {
    width: 100%;
    height: 50%;
    background: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    transform-origin: top;
    transition: transform 1s ease-in-out;
}

.letter.open .letter-bottom {
    transform: rotateX(180deg);
}

.contact-info {
    padding: 10px;
    text-align: center;
    font-size: 16px;
    color: #333;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

.letter.open .contact-info {
    opacity: 1;
    transform: translateY(0);
}


/* Contact Form */
.contact-form {
    margin: 20px auto;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form label {
    font-size: 14px;
    color: #333;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.contact-form button {
    padding: 10px 15px;
    background-color: #ff1493;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #e01380;
}
