@font-face {
    font-family: "fonts";
    src: url("https://cdn-yp-cos-static.hecady.com/cloud%2Fyp-static%2Ffonts%2F2023008020%2FYeZiGongChangChuanQiuShaXingKai-2.ttf") format("truetype");
}

/* 全局样式 */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --text-color: #2d3436;
    --background-color: #f9f9f9;
    --card-background: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --container-padding: clamp(1rem, 5vw, 2rem);
    --section-spacing: clamp(2rem, 10vh, 4rem);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

li {
    list-style-type: none;
}

a {
    text-decoration: none;
}

h1 {
    font-size: 16px;
    font-weight: normal;
}

::-webkit-scrollbar {
    display: none;
}

.hidden {
    opacity: 0;
}

.index {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    color: #fff;
    font-size: 36px;
    font-family: fonts, serif;
    z-index: 9999;
    cursor: pointer;
}

.ourTime {
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.ourTime {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    overflow-x: hidden;
    width: 100%;
    height: 100vh;
    background-color: #c0ecff;
    text-align: center;
    font-family: "fonts", serif;
}

.ourTime .title {
    flex-direction: column;
}

.ourTime .myTell li, .title, .stopTimeBox {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    scroll-snap-align: start;
}

.title {
    height: 100vh;
    margin: 20px auto;
}

.title h1 {
    padding: 10px 0;
    font-size: 64px;
    letter-spacing: 10px;
}

.title p {
    margin: 20px;
    font-size: 32px;
    letter-spacing: 5px;
}

.title #nowTime {
    opacity: 0;
    transition: 6s ease-out;
}

.title #myTell {
    opacity: 0;
    transition: 6s ease-out;
}

.timeBox {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    scroll-snap-align: start;
}

.timeBox ul {

}

.timeBox li {
    margin: 10px;
    font-size: 26px;
    letter-spacing: 5px;
}

.myTell li {
    width: 50vw;
    margin: 0 auto;
    text-align: left;
    font-size: 26px;
    line-height: 1.6em;
    letter-spacing: 5px;
}

.stopBtn {
    padding: 16px;
    color: white;
    font-size: 24px;
    font-family: fonts, serif;
    letter-spacing: 5px;
    border-radius: 20px;
    background-color: hotpink;
    cursor: pointer;
}

@media screen and (max-width: 992px) {
    .myTell li {
        font-size: 4vw;
    }

    .timeBox li {
        font-size: 6vw;
    }

    .stopBtn {
        font-size: 6vw;
        padding: 32px;
    }
}

/* 导航菜单 */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem var(--container-padding);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    transition: var(--transition);
    padding: 0.5rem;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* 主内容区 */
.main-content {
    padding-top: 4rem;
}

/* 欢迎区域 */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--container-padding);
    background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 2rem;
    color: var(--text-color);
    max-width: 600px;
}

.hero-counter {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    margin: 2rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.counter-number {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: bold;
    color: var(--primary-color);
}

.counter-label {
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: var(--text-color);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    animation: bounce 2s infinite;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
}

/* 时间线区域 */
.timeline-section {
    padding: var(--section-spacing) var(--container-padding);
    background-color: var(--background-color);
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 1rem;
}

.timeline-track {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background-color: var(--primary-color);
    height: 100%;
}

.timeline-items {
    position: relative;
}

.timeline-item {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.timeline-item.active {
    opacity: 1;
    transform: translateY(0);
}

.timeline-content {
    background-color: var(--card-background);
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: relative;
    width: calc(50% - 2rem);
    margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: auto;
}

.timeline-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.timeline-text p {
    color: var(--text-color);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

/* 留言区域 */
.message-section {
    padding: var(--section-spacing) var(--container-padding);
    background-color: #fff5f5;
}

.message-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.message-card {
    background-color: var(--card-background);
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.message-card:hover {
    transform: translateY(-5px);
}

.message-card.highlight {
    background-color: var(--primary-color);
    color: white;
}

.message-content {
    text-align: center;
}

.message-icon {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.message-card.highlight .message-icon {
    color: white;
}

.message-date {
    margin-top: 1rem;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    color: #666;
}

.message-card.highlight .message-date {
    color: rgba(255, 255, 255, 0.8);
}

/* 留言表单 */
.message-form {
    max-width: min(600px, 90%);
    margin: 0 auto;
    background-color: var(--card-background);
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.form-header p {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.message-input {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: 8px;
    resize: vertical;
    transition: var(--transition);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.message-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.char-counter {
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    color: #666;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: clamp(0.8rem, 2vw, 1rem);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.submit-btn:hover {
    background-color: #ff5252;
}

/* 音乐控制 */
.music-control {
    position: fixed;
    bottom: clamp(1rem, 3vw, 2rem);
    right: clamp(1rem, 3vw, 2rem);
    z-index: 1000;
}

.music-toggle {
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 2vw, 1.2rem);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.music-toggle:hover {
    transform: scale(1.1);
}

.music-toggle.playing {
    animation: rotate 3s linear infinite;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: clamp(1rem, 3vw, 2rem);
    left: clamp(1rem, 3vw, 2rem);
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 2vw, 1.2rem);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        padding: 0.5rem 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .timeline-track {
        display: none;
    }

    .timeline-content {
        width: 100%;
        margin-left: 0 !important;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .nav-logo span {
        display: none;
    }

    .hero-counter {
        flex-wrap: wrap;
        justify-content: center;
    }

    .counter-item {
        width: 45%;
    }

    .message-form {
        padding: 1rem;
    }
}

/* 动画 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

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