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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    position: relative;
}

.envelope-wrapper {
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.envelope {
    width: 200px;
    height: 300px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.envelope:hover {
    transform: scale(1.05);
}

.envelope-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dc143c 0%, #ff0000 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gold-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 215, 0, 0.1) 10px, rgba(255, 215, 0, 0.1) 20px);
    opacity: 0.5;
}

.chinese-text {
    display: none;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -100px;
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-top: 80px solid #8b0000;
    transform-origin: top center;
    transition: transform 0.8s ease;
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.envelope-flap::before {
    content: '';
    position: absolute;
    top: -75px;
    left: -30px;
    width: 60px;
    height: 60px;
    background: #ffd700;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.envelope-flap::after {
    content: '福';
    position: absolute;
    top: -65px;
    left: -15px;
    font-size: 32px;
    font-weight: bold;
    color: #dc143c;
    z-index: 1;
}

.tap-hint {
    font-size: 18px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

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

.message-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 90%;
    max-width: 350px;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 100;
}

.message-card.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.message-content h1 {
    color: #dc143c;
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.message-content p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

.signature {
    text-align: right;
    color: #666;
    font-style: italic;
    margin-top: 20px;
    font-size: 16px;
}

.envelope-wrapper.opened .envelope {
    animation: envelopeFloat 1s ease forwards;
}

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

.envelope-wrapper.opened .tap-hint {
    opacity: 0;
}

@keyframes envelopeFloat {
    to {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .envelope {
        width: 180px;
        height: 270px;
    }
    
    .message-card {
        padding: 25px;
    }
    
    .message-content h1 {
        font-size: 20px;
    }
}

.highlight-box {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 3px solid #dc143c;
    border-radius: 12px;
    padding: 18px;
    margin: 20px 0;
    text-align: center;
    font-weight: bold;
    font-size: 17px;
    color: #8b0000;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
    animation: shimmer 2s infinite;
    letter-spacing: 0.5px;
    line-height: 1.5;
}

@keyframes shimmer {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(220, 20, 60, 0.5);
        transform: scale(1.02);
    }
}
