@import url('https://fonts.googleapis.com/css2?family=Niconne&family=Noto+Serif+SC:wght@300;400;700&display=swap');

:root {
    --primary-color: #e91e63;
    --secondary-color: #c2185b;
    --text-dark: #333;
    --text-light: #666;
    --bg-gradient-start: #fcebeb;
    --bg-gradient-end: #f0e6e6;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow-light: 0 5px 20px rgba(0, 0, 0, 0.08);
    --transition-speed: 1s ease-out;
    --start-overlay-bg: linear-gradient(to right bottom, #fde4ec, #f0dada);
    --start-button-bg: #d84315;
    --start-button-hover-bg: #bf360c;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Serif SC', serif;
    background: linear-gradient(to right bottom, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    font-weight: 300;
}

/* 通用隐藏类 */
.hidden {
    display: none !important;
}

/* --- 开始界面样式 --- */
.start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--start-overlay-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
    opacity: 1;
    transition: opacity var(--transition-speed) ease-in-out;
}

.start-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.start-content {
    text-align: center;
    padding: 30px;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
}

.start-title {
    font-family: 'Niconne', cursive;
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.05);
}

.start-message {
    font-size: 1.5em;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.start-button {
    background-color: var(--start-button-bg);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.3em;
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.start-button:hover {
    background-color: var(--start-button-hover-bg);
    transform: translateY(-2px);
}

.start-button i {
    font-size: 1.2em;
}

/* --- 视频容器样式 --- */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
}

.video-container.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#introVideo {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

/* --- 视频控制浮层 --- */
.video-controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.3em;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    z-index: 1001;
}

#videoPlayButton {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2em;
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#videoPlayButton:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* --- 视频定格背景 --- */
#frozenBg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-speed) 0.5s;
}

#frozenBg.visible {
    opacity: 1;
}

#frozenBg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(3px);
    pointer-events: none;
}

/* --- 主内容容器样式 (最终稳定版) --- */
.content-container {
    background: var(--card-bg);
    padding: 40px 60px;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    text-align: center;
    max-width: 700px;
    margin: 20px;
    
    /* 初始状态：通过 visibility 和 opacity 隐藏，而不是 display: none */
    display: block; /* 始终在布局中 */
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px);
    
    /* 动画属性 */
    transition: opacity 1.5s var(--transition-speed), transform 1.5s var(--transition-speed);
    
    position: relative;
    z-index: 1001;
}

/* 最终状态：添加 .visible 类来触发动画 */
.content-container.visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.title {
    font-family: 'Niconne', cursive;
    font-size: 3.8em;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.days-together {
    font-size: 2em;
    color: var(--text-dark);
    margin-bottom: 30px;
    font-weight: 400;
}

.days-together .highlight {
    font-family: 'Niconne', cursive;
    font-size: 1.6em;
    color: var(--secondary-color);
    font-weight: 700;
    display: inline-block;
    animation: pulse 1.5s infinite alternate;
    margin: 0 8px;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.romantic-message {
    font-size: 1.5em;
    line-height: 1.7;
    color: var(--text-light);
    font-style: italic;
    margin-top: 35px;
    white-space: pre-line;
    font-weight: 300;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-container {
        padding: 30px;
        margin: 15px;
    }
    .title {
        font-size: 2.8em;
    }
    .days-together {
        font-size: 1.6em;
    }
    .romantic-message {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .start-title {
        font-size: 2.2em;
    }
    .content-container {
        padding: 25px;
    }
    .title {
        font-size: 2.2em;
    }
    .days-together {
        font-size: 1.4em;
    }
    .romantic-message {
        font-size: 1.1em;
    }
}
