/* 表白网站 - 简化可靠版 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #5a3d5c;
    background: #fef5f7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景容器 */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
}

.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffebee, #fce4ec);
}

/* 雪花效果 */
.snowflakes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
}

.snowflake {
    position: absolute;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    animation: snowFall linear infinite;
}

@keyframes snowFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 爱心效果 */
.hearts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-heart {
    position: absolute;
    color: #ff6b9d;
    font-size: 24px;
    animation: floatHeart linear infinite;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(1);
        opacity: 0;
    }
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 头部 */
.header {
    text-align: center;
    padding: 40px 20px;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo-heart {
    font-size: 48px;
    color: #ff6b9d;
    animation: heartbeat 1.5s ease-in-out infinite;
}

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

.logo h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 36px;
    background: linear-gradient(45deg, #ff6b9d, #ff8e53);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.highlight {
    color: #ff6b9d;
}

.subtitle {
    font-size: 18px;
    color: #8a6d8b;
    font-style: italic;
}

/* 主内容区 */
.main-content {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 封面区 */
.hero-section {
    margin: 40px 0;
}

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

.love-letter-container {
    width: 100%;
    max-width: 400px;
}

.envelope {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 200px;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.5s ease;
}

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

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 100px solid #ffb8d9;
    z-index: 2;
    transform-origin: top;
    transition: transform 0.5s ease;
}

.envelope.open .envelope-flap {
    transform: rotateX(180deg);
}

.envelope-body {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #ffd6e7, #ffb8d9);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
    overflow: hidden;
}

.letter {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: white;
    padding: 20px;
    border-radius: 5px;
    transform: translateY(150px);
    transition: transform 0.5s ease 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.envelope.open .letter {
    transform: translateY(0);
}

.letter-header h2 {
    color: #ff6b9d;
    font-size: 20px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.letter-date {
    color: #8a6d8b;
    font-size: 14px;
}

.letter-content {
    line-height: 1.6;
    color: #5a3d5c;
    margin-top: 15px;
}

.letter-content p {
    margin-bottom: 10px;
}

.letter-signature {
    text-align: right;
    margin-top: 20px;
    font-style: italic;
}

.signature-name {
    font-weight: bold;
    color: #ff6b9d;
    font-size: 18px;
    margin-top: 5px;
}

/* 英雄文字 */
.hero-text {
    text-align: center;
}

.hero-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #ff6b9d, #ff8e53);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: #8a6d8b;
    margin-bottom: 25px;
}

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

.cta-button {
    background: linear-gradient(135deg, #ff6b9d, #ff8e53);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.6);
}

/* 最终表白 */
.final-section {
    padding: 60px 20px;
}

.final-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.final-message {
    background: linear-gradient(135deg, #ff6b9d, #9d4edd);
    color: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.3);
}

.final-line-1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

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

.final-line-2 {
    font-size: 24px;
    opacity: 0.9;
}

/* 页脚 */
.footer {
    padding: 40px 20px;
    text-align: center;
    color: #8a6d8b;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 182, 193, 0.3);
}

.footer-heart {
    font-size: 32px;
    color: #ff6b9d;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

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

.footer-text {
    font-size: 18px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 15px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .hero-title {
        font-size: 26px;
    }
    
    .final-line-1 {
        font-size: 36px;
    }
    
    .final-line-2 {
        font-size: 20px;
    }
    
    .envelope {
        max-width: 280px;
        height: 187px;
    }
    
    .envelope-flap {
        border-left: 140px solid transparent;
        border-right: 140px solid transparent;
        border-bottom: 93px solid #ffb8d9;
    }
    
    .envelope-body {
        width: 280px;
        height: 140px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 24px;
    }
    
    .hero-title {
        font-size: 22px;
    }
    
    .final-line-1 {
        font-size: 32px;
    }
    
    .cta-button {
        padding: 12px 25px;
        font-size: 16px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .envelope:hover {
        transform: none;
    }
    
    .cta-button:hover {
        transform: none;
    }
    
    .cta-button:active {
        transform: scale(0.98);
    }
}