/* 基础样式和字体 */
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');

:root {
    --primary-color: #4a86e8;
    --accent-color: #6aa84f;
    --background-color: #f9f7e8;
    --text-color: #333;
    --border-color: #d0e0e3;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 主要内容区域布局 */
.main-content {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.content-left {
    flex: 4;
    padding-right: 20px;
}

.content-right {
    flex: 1;
    padding-left: 10px;
}

body {
    font-family: 'Ma Shan Zheng', cursive, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    padding-bottom: 50px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    animation: backgroundFade 20s infinite alternate;
}

/* 添加缓慢切换的背景动画 */
@keyframes backgroundFade {
    0% {
        background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    }
    33% {
        background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    }
    66% {
        background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    }
    100% {
        background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    }
}

/* 添加覆盖整个页面的半透明层，使内容更易读 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 100%);
    z-index: -1;
}

/* 添加漂浮的灰尘精灵效果 */
body::after {
    content: '';
    position: fixed;
    top: -50px;
    left: -50px;
    width: calc(100% + 100px);
    height: calc(100% + 100px);
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    background-size: 50px 50px;
    background-repeat: repeat;
    opacity: 0.05;
    pointer-events: none;
    animation: dustFloat 60s linear infinite;
    z-index: -1;
}

@keyframes dustFloat {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(50px) translateX(50px);
    }
}

/* 导航栏样式 */
.main-nav {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-bottom: 2px solid rgba(74, 134, 232, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    animation: bounce 3s ease-in-out infinite;
}

.nav-logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #5b8c46;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #4a86e8, #6aa84f);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: #4a86e8;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

@media screen and (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-logo {
        margin-bottom: 10px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-around;
        gap: 10px;
    }
    
    .nav-links a {
        font-size: 1rem;
    }
}

/* 龙猫光标 */
.totoro-cursor {
    position: fixed;
    width: 30px;
    height: 30px;
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    display: none;
}

/* 页眉样式 */
header {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 15px;
}

.header-content {
    position: relative;
    z-index: 2;
}

header h1 {
    font-size: 3rem;
    color: #3a76d8;
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2), 0 0 15px rgba(74, 134, 232, 0.3);
    animation: float 3s ease-in-out infinite;
    font-weight: bold;
    letter-spacing: 2px;
    background-image: linear-gradient(to right, #4a86e8, #6aa84f, #4a86e8);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientText 6s linear infinite, float 3s ease-in-out infinite;
}

@keyframes gradientText {
    to {
        background-position: 200% center;
    }
}

/* 云朵装饰 */
header::before,
header::after {
    content: '';
    position: absolute;
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    width: 150px;
    height: 80px;
    z-index: 1;
}

header::before {
    top: 10px;
    left: 10%;
    animation: float 4s ease-in-out infinite;
}

header::after {
    top: 20px;
    right: 10%;
    animation: float 5s ease-in-out infinite 1s;
}

/* 倒计时样式 */
.countdown-container {
    margin: 0 0 20px 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.countdown-container::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    background-size: 200px auto;
    background-repeat: no-repeat;
    background-position: right bottom;
    opacity: 0.1;
    z-index: -1;
}

.countdown-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #5b8c46;
    text-align: center;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.countdown-title::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, #6aa84f, transparent);
}

.countdown-subtitle {
    font-size: 1rem;
    color: #666;
    text-align: center;
    margin: 5px 0 10px;
    font-style: italic;
}

#countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(145deg, #5691f1, #4076cf);
    color: white;
    padding: 10px 15px;
    border-radius: 12px;
    min-width: 75px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.countdown-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 0 0;
}

.countdown-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.countdown-box span:first-child {
    font-size: 2rem;
    font-weight: bold;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.countdown-label {
    font-size: 1rem;
    margin-top: 8px;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* 消息和按钮样式 */
.message {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 20px 30px;
    margin: 15px 0;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1), 0 8px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.message::before, .message::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.05;
    z-index: -1;
}

.message::before {
    top: -50px;
    left: -50px;
    transform: rotate(-30deg);
}

.message::after {
    bottom: -50px;
    right: -50px;
    transform: rotate(30deg);
}

.message p {
    margin-bottom: 20px;
    line-height: 2;
    position: relative;
}

.message p:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(106, 168, 79, 0.3), transparent);
}

.message p:first-child {
    font-size: 1.8rem;
    color: #5b8c46;
    font-weight: bold;
    margin-bottom: 25px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    display: inline-block;
}

.message p:first-child::before, .message p:first-child::after {
    content: "❀";
    position: absolute;
    font-size: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6aa84f;
    opacity: 0.7;
}

.message p:first-child::before {
    left: -30px;
}

.message p:first-child::after {
    right: -30px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    clear: both;
}

button {
    background: linear-gradient(145deg, #5691f1, #4076cf);
    color: white;
    border: none;
    padding: 8px 20px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Ma Shan Zheng', cursive, sans-serif;
    box-shadow: 0 6px 15px rgba(74, 134, 232, 0.3);
    position: relative;
    overflow: hidden;
}

button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px 50px 0 0;
}

button::after {
    content: "";
    position: absolute;
    left: -50%;
    top: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: all 0.75s ease;
    opacity: 0;
}

button:hover {
    background: linear-gradient(145deg, #4a86e8, #3a76d8);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(74, 134, 232, 0.4);
}

button:hover::after {
    left: 120%;
    opacity: 1;
}

button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(74, 134, 232, 0.3);
}

/* 图库样式 */
.gallery-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 15px;
    color: #5b8c46;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.gallery-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, transparent, #6aa84f, transparent);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    aspect-ratio: 1 / 1;
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.gallery-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.95);
}

.gallery-item:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.05);
    border-color: rgba(255, 255, 255, 1);
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

/* 全屏幻灯片 */
#fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#slideshow {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#slideshow::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
    z-index: 5;
    pointer-events: none;
}

#slideshow::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    z-index: 5;
    pointer-events: none;
}

#slideshow-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#slideshow-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease, opacity 0.5s ease;
    animation: fadeIn 0.5s ease;
}

.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1rem;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#close-slideshow, #prev-btn, #next-btn {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#close-slideshow {
    top: 20px;
    right: 20px;
}

#prev-btn {
    left: 20px;
}

#next-btn {
    right: 20px;
}

#close-slideshow:hover, #prev-btn:hover, #next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.hidden {
    display: none !important;
}

/* 页脚样式 */
footer {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 10px 0;
    text-align: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    border-top: 2px solid #4a86e8;
    font-size: 1rem;
}

footer p {
    position: relative;
    display: inline-block;
    color: #555;
    padding-bottom: 3px;
    margin: 3px 0;
}

footer p::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 2px;
    background: linear-gradient(to right, transparent, #4a86e8, transparent);
}

.character-container {
    display: flex;
    justify-content: space-around;
    max-width: 600px;
    margin: 8px auto 0;
    padding: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.character {
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: bounce 3s ease-in-out infinite;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.character:hover {
    transform: scale(1.2) rotate(5deg);
}

.totoro {
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    animation-delay: 0s;
}

.soot-sprite {
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    animation-delay: 0.5s;
}

.no-face {
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    animation-delay: 1s;
}

/* 互动宠物样式 - 看板娘效果 */
.interactive-pets {
    position: fixed;
    bottom: 5px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    z-index: 100;
    pointer-events: none;
    padding: 0 10px;
}

.live2d-container {
    position: relative;
    width: 180px;
    height: 200px;
    pointer-events: auto;
}

#live2d-left {
    left: 20px;
}

#live2d-right {
    right: 20px;
}

.pet-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: bottom center;
    animation: float 3s ease-in-out infinite;
}

.pet {
    width: 180px;
    height: 180px;
    position: relative;
    cursor: pointer;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
    z-index: 10;
}

.pet-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pet-name {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    line-height: 1.2;
    z-index: 5;
}

.live2d-container:hover .pet-name {
    opacity: 1;
}

.pet-dialog {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0;
    transition: all 0.4s ease;
    text-align: center;
    min-width: 120px;
    z-index: 15;
}

.dialog-bubble {
    background-color: white;
    border-radius: 15px;
    padding: 10px 15px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 2px solid #f2f2f2;
    max-width: 150px;
}

.dialog-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.dialog-text {
    font-size: 0.9rem;
    font-weight: bold;
    color: #000;
    text-align: center;
}

/* 移除旧的对话框尾巴 */
.live2d-container:hover .pet-dialog {
    opacity: 1;
    top: -80px;
}

.husky {
    background-image: url("https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/husky.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.samoyed {
    background-image: url("https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/samoyed.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.pet-tail {
    position: absolute;
    width: 25px;
    height: 40px;
    background-color: transparent;
    bottom: 35px;
    left: 20px;
    transform-origin: top center;
    animation: wag-tail 1.2s ease-in-out infinite;
}

.samoyed .pet-tail {
    left: 10px;
    bottom: 50px;
}

.pet-ears {
    position: absolute;
    width: 100%;
    height: 40px;
    top: 20px;
    left: 0;
}

.pet-head {
    position: absolute;
    width: 100%;
    height: 40px;
    top: 40px;
    animation: head-tilt 8s ease-in-out infinite;
}

.pet-body {
    position: absolute;
    width: 100%;
    height: 80px;
    bottom: 0;
    animation: breathe 4s ease-in-out infinite;
}

.live2d-container:hover .pet-wrapper {
    animation-play-state: paused;
}

.live2d-container:hover .pet-tail {
    animation: excited-wag 0.3s ease-in-out infinite;
}

.pet-active {
    animation: jump 0.5s ease-in-out 2;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes wag-tail {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

@keyframes excited-wag {
    0%, 100% {
        transform: rotate(-15deg);
    }
    50% {
        transform: rotate(15deg);
    }
}

@keyframes head-tilt {
    0%, 25%, 50%, 75%, 100% {
        transform: rotate(0deg);
    }
    12.5% {
        transform: rotate(5deg);
    }
    37.5% {
        transform: rotate(-5deg);
    }
    62.5% {
        transform: rotate(3deg);
    }
    87.5% {
        transform: rotate(-3deg);
    }
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

@keyframes jump {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* 动画效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 154, 158, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 154, 158, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 154, 158, 0);
    }
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .main-content {
        flex-direction: column;
    }
    
    .content-left, .content-right {
        width: 100%;
        padding: 0;
    }

    #countdown {
        flex-wrap: wrap;
    }

    .countdown-box {
        min-width: 60px;
        font-size: 0.9rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .message {
        font-size: 1rem;
        padding: 15px;
        width: 100%;
        margin: 10px 0;
    }
    
    .music-player {
        width: 100%;
        margin: 10px 0;
    }
    
    .countdown-container {
        width: 100%;
        margin: 10px 0;
    }
    
    header::before, header::after {
        width: 80px;
        height: 40px;
    }
    
    /* 调整宠物大小和位置 */
    .interactive-pets {
        bottom: 40px;
    }
    
    .live2d-container {
        width: 120px;
        height: 140px;
    }
    
    .pet {
        width: 120px;
        height: 120px;
    }
    
    .pet-dialog {
        top: -60px;
        min-width: 100px;
    }
    
    .dialog-bubble {
        padding: 8px 10px;
        max-width: 120px;
    }
    
    .dialog-text {
        font-size: 0.8rem;
    }
    
    /* 调整导航和页脚 */
    .nav-logo span {
        font-size: 1.2rem;
    }
    
    footer {
        padding: 5px 0;
    }
    
    .character {
        width: 30px;
        height: 30px;
    }
}

/* 小屏幕手机特别优化 */
@media screen and (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .countdown-title {
        font-size: 1.5rem;
    }
    
    .countdown-subtitle {
        font-size: 0.9rem;
    }
    
    .countdown-box {
        min-width: 50px;
        padding: 8px 12px;
    }
    
    .countdown-box span:first-child {
        font-size: 1.6rem;
    }
    
    .countdown-label {
        font-size: 0.8rem;
    }
    
    .message p:first-child {
        font-size: 1.5rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 6px;
    }
    
    /* 调整宠物显示 */
    .interactive-pets {
        position: relative;
        margin-top: 15px;
        display: flex;
        justify-content: space-around;
        bottom: auto;
    }
    
    .live2d-container {
        width: 100px;
        height: 120px;
    }
    
    .pet {
        width: 100px;
        height: 100px;
    }
    
    /* 强制底部留出空间 */
    body {
        padding-bottom: 80px;
    }
}

/* 音乐播放器样式 */
.music-player {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 20px;
    margin: 0 0 15px 0;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.music-player::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    background-size: 50px auto;
    background-repeat: no-repeat;
    background-position: right 20px bottom 20px;
    opacity: 0.07;
    z-index: -1;
}

.music-player h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #5b8c46;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
}

.music-player h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, transparent, #6aa84f, transparent);
}

#song-select {
    width: 90%;
    padding: 8px 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid #d0e0e3;
    font-family: 'Ma Shan Zheng', cursive, sans-serif;
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    color: #444;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url('https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/bg-pattern.jpg');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    padding-right: 40px;
}

#song-select:focus {
    outline: none;
    border-color: #4a86e8;
    box-shadow: 0 4px 12px rgba(74, 134, 232, 0.2);
}

.music-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.music-controls button {
    background: linear-gradient(145deg, #5691f1, #4076cf);
    color: white;
    border: none;
    padding: 8px 15px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 134, 232, 0.3);
    min-width: 80px;
    position: relative;
    overflow: hidden;
    margin: 0 5px;
}

.music-controls button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px 50px 0 0;
}

.music-controls button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 134, 232, 0.4);
    background: linear-gradient(145deg, #4a86e8, #3a76d8);
}

.volume-control {
    display: flex;
    align-items: center;
    margin: 10px auto;
    background: rgba(255, 255, 255, 0.7);
    padding: 5px 15px;
    border-radius: 50px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    max-width: 200px;
}

.volume-control label {
    margin-right: 10px;
    font-size: 1rem;
    color: #555;
}

.volume-control input[type="range"] {
    width: 150px;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #4a86e8, #6aa84f);
    border-radius: 5px;
    outline: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.now-playing {
    margin-top: 10px;
    font-size: 0.9rem;
    padding: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    display: inline-block;
}

#current-song {
    font-weight: bold;
    color: #4a86e8;
    padding: 0 5px;
    position: relative;
    transition: color 0.3s ease;
}

#current-song:not(:empty)::before,
#current-song:not(:empty)::after {
    content: "♪";
    position: absolute;
    top: 0;
    font-size: 0.9rem;
    opacity: 0.7;
    animation: bounce 1s ease-in-out infinite alternate;
}

#current-song:not(:empty)::before {
    left: -15px;
    animation-delay: 0s;
}

#current-song:not(:empty)::after {
    right: -15px;
    animation-delay: 0.5s;
}

/* 响应式样式调整 */
@media screen and (max-width: 768px) {
    .music-player {
        padding: 10px;
    }
    
    #song-select {
        width: 90%;
    }
    
    .music-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .music-controls button {
        margin: 5px;
        font-size: 0.9rem;
        padding: 6px 12px;
        min-width: 70px;
    }
    
    .volume-control {
        width: 100%;
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .music-player h3 {
        font-size: 1.2rem;
    }
    
    #song-select {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .music-controls button {
        font-size: 0.8rem;
        padding: 5px 10px;
        min-width: 60px;
    }
    
    .now-playing {
        font-size: 0.8rem;
    }
} 
/* 烟花动画效果 */
.firework {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: firework 1s ease-out forwards;
    z-index: 100;
    opacity: 0;
}

@keyframes firework {
    0% {
        transform: scale(0.1);
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    50% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.card-husky::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: -1;
    background-image: url("https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/mengmeng.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.card-samoyed::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: -1;
    background-image: url("https://pub-50f68eb5cd44471cb0126a2fd09cdecf.r2.dev/images/ruru.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 加载指示器样式 */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.loading-indicator p {
    margin-top: 15px;
    font-size: 1rem;
    color: #4a86e8;
    font-weight: bold;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(74, 134, 232, 0.3);
    border-radius: 50%;
    border-top-color: #4a86e8;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 幻灯片加载指示器 */
.slideshow-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    z-index: 5;
}

/* 禁用按钮样式 */
button:disabled {
    background: linear-gradient(145deg, #cccccc, #aaaaaa);
    color: #666666;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 确保fullscreen-container在显示时正确显示 */
#fullscreen-container:not(.hidden) {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

/* 修复隐藏类样式 */
.hidden {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
