/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 温馨的儿童色彩调色板 */
    --primary-purple: #B19CD9;
    --soft-mint: #A8E6CF;
    --gentle-blue: #87CEEB;
    --warm-orange: #FFD3A5;
    --lavender: #E6E6FA;
    --peach: #FFDAB9;
    --coral: #FF9999;
    --cream: #F8F8FF;
    --warm-brown: #DEB887;
    
    /* 文本颜色 */
    --text-dark: #4A4A4A;
    --text-medium: #6B6B6B;
    --text-light: #8A8A8A;
    
    /* 阴影和边框 */
    --shadow-soft: 0 4px 20px rgba(177, 156, 217, 0.3);
    --shadow-medium: 0 8px 30px rgba(177, 156, 217, 0.4);
    --border-radius: 20px;
    --border-radius-small: 12px;
}

body {
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--soft-mint) 0%, var(--cream) 50%, var(--peach) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
    border-bottom: 3px solid var(--primary-purple);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 600;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: var(--border-radius-small);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-dark);
    background: var(--primary-purple);
    transform: translateY(-2px);
}

/* 主图展示区域 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.decoration {
    position: absolute;
    font-size: 24px;
    animation: float 6s ease-in-out infinite;
}

.star-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.star-2 {
    top: 30%;
    right: 15%;
    animation-delay: 2s;
}

.star-3 {
    bottom: 25%;
    left: 20%;
    animation-delay: 4s;
}

.rainbow {
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    animation-delay: 1s;
}

.cloud-1 {
    top: 25%;
    right: 20%;
    animation-delay: 3s;
}

.cloud-2 {
    bottom: 30%;
    right: 10%;
    animation-delay: 5s;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-container {
    position: relative;
    display: inline-block;
}

.hero-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--border-radius);
}

.hero-image-container:hover .hero-play-overlay {
    opacity: 1;
}

.hero-play-button {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
}

.hero-play-button:hover {
    background: white;
    transform: scale(1.1);
}

.hero-play-icon {
    font-size: 1.2rem;
}

.main-hero-img {
    width: 100%;
    max-width: 1523px;
    height: 423px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    animation: gentle-bounce 4s ease-in-out infinite;
}

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

.hero-text {
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(255, 182, 193, 0.3);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-medium);
    margin-bottom: 15px;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-bottom: 40px;
    font-weight: 500;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-purple), var(--coral));
    color: white;
    padding: 24px 47px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 700;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 127, 127, 0.4);
}

.cta-button:active {
    transform: translateY(-1px);
}

.button-sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
}

/* 功能介绍区域 */
.features-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--gentle-blue) 0%, var(--lavender) 100%);
    position: relative;
}

.features-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, var(--soft-mint) 0%, var(--cream) 50%, var(--peach) 100%);
    clip-path: ellipse(100% 100% at 50% 0%);
}

.features-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, var(--soft-mint) 0%, var(--soft-mint) 100%);
    clip-path: ellipse(100% 100% at 50% 100%);
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 60px;
    text-shadow: 2px 2px 4px rgba(135, 206, 235, 0.3);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 1;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: gentle-wiggle 3s ease-in-out infinite;
}

@keyframes gentle-wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.feature-description {
    color: var(--text-medium);
    font-size: 1rem;
    line-height: 1.6;
}

/* 绘本示例区域 */
.stories-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--soft-mint) 0%, var(--soft-mint) 100%);
    position: relative;
}

.stories-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, var(--gentle-blue) 0%, var(--lavender) 100%);
    clip-path: ellipse(100% 100% at 50% 0%);
}

.stories-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, var(--peach) 0%, var(--primary-purple) 100%);
    clip-path: ellipse(100% 100% at 50% 100%);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 1;
}

.story-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    cursor: pointer;
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.story-image-container {
    position: relative;
    overflow: hidden;
}

.story-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-card:hover .story-image {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-card:hover .play-overlay {
    opacity: 1;
}

.play-button {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.play-button:hover {
    background: white;
    transform: scale(1.1);
}

.story-content {
    padding: 25px;
}

.story-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.story-description {
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.6;
}

.story-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: var(--primary-purple);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 联系方式区域 */
.contact-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--peach) 0%, var(--primary-purple) 100%);
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, var(--soft-mint) 0%, var(--soft-mint) 100%);
    clip-path: ellipse(100% 100% at 50% 0%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(255, 218, 185, 0.3);
}

.contact-subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 40px;
    font-weight: 500;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-medium);
}

.contact-icon {
    font-size: 2.5rem;
    animation: gentle-pulse 2s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.contact-details h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.contact-link {
    color: var(--text-medium);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--text-dark);
}

.contact-decoration {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 300px;
}

.decoration-element {
    position: absolute;
    font-size: 3rem;
    animation: float 4s ease-in-out infinite;
}

.rainbow-arc {
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.balloon {
    top: 40%;
    left: 20%;
    animation-delay: 1s;
}

.star-big {
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.heart {
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 3s;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, var(--warm-brown) 0%, var(--text-dark) 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-text {
    font-size: 1rem;
    font-weight: 500;
}

.footer-decoration {
    display: flex;
    gap: 15px;
    font-size: 1.5rem;
}

.footer-decoration span {
    animation: twinkle 2s ease-in-out infinite;
}

.footer-decoration span:nth-child(2) {
    animation-delay: 0.5s;
}

.footer-decoration span:nth-child(3) {
    animation-delay: 1s;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 音频播放模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, var(--soft-mint), var(--cream));
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-medium);
    animation: modal-appear 0.3s ease;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: var(--primary-purple);
    color: white;
    padding: 20px 25px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.close-button {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-button:hover {
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
}

.audio-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.story-cover img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow-soft);
}

.audio-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.play-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 182, 193, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-purple);
    width: 35%;
    border-radius: 4px;
    transition: width 0.3s ease;
    animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 600;
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.control-btn {
    background: var(--gentle-blue);
    border: none;
    padding: 15px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
}

.audio-description {
    text-align: center;
    color: var(--text-medium);
    font-style: italic;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .main-hero-img {
        height: auto;
        max-height: 250px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
}