* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: linear-gradient(135deg, #C41E3A 0%, #FF6B6B 30%, #FFD93D 60%, #FF6B6B 90%, #C41E3A 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Fireworks Background */
.fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.fireworks::before,
.fireworks::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    box-shadow: 
        100px 100px #FFD700,
        200px 150px #FF6B6B,
        300px 200px #FFD93D,
        150px 250px #FF1744,
        400px 100px #FFA726,
        500px 200px #FFD700,
        250px 350px #FF6B6B,
        450px 300px #FFD93D,
        350px 150px #FF1744,
        550px 250px #FFA726;
    animation: fireworksAnimation 3s ease-in-out infinite;
}

.fireworks::after {
    animation-delay: 1.5s;
}

@keyframes fireworksAnimation {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

/* Falling Petals */
.petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.petals-container::before,
.petals-container::after {
    content: '🌸';
    position: absolute;
    font-size: 20px;
    animation: petalsFall 8s linear infinite;
    opacity: 0.7;
}

.petals-container::before {
    top: -50px;
    left: 20%;
}

.petals-container::after {
    top: -50px;
    left: 70%;
    animation-delay: 4s;
}

@keyframes petalsFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Main Container */
.container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
    max-width: 800px;
    width: 100%;
}

.welcome-screen.active {
    opacity: 1;
    transform: scale(1);
}

/* Horse Mascot */
.horse-mascot {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 40px;
    animation: horseFloat 3s ease-in-out infinite;
}

@keyframes horseFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.horse-body {
    position: relative;
    width: 100%;
    height: 100%;
}

.horse-head {
    position: absolute;
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #F4C430 100%);
    border-radius: 40px 40px 30px 30px;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    animation: headBob 2s ease-in-out infinite;
}

@keyframes headBob {
    0%, 100% { transform: translateX(-50%) rotate(-5deg); }
    50% { transform: translateX(-50%) rotate(5deg); }
}

.horse-ear {
    position: absolute;
    width: 20px;
    height: 35px;
    background: linear-gradient(135deg, #B8860B, #FFD700);
    border-radius: 50% 50% 0 0;
    top: -15px;
}

.horse-ear.left {
    left: 10px;
    transform: rotate(-20deg);
}

.horse-ear.right {
    right: 10px;
    transform: rotate(20deg);
}

.horse-mane {
    position: absolute;
    width: 30px;
    height: 80px;
    background: linear-gradient(180deg, #C41E3A, #FF6B6B);
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 15px;
    box-shadow: 
        10px 5px 0 -5px #FF1744,
        -10px 5px 0 -5px #FF1744,
        15px 15px 0 -5px #FF6B6B,
        -15px 15px 0 -5px #FF6B6B;
}

.horse-eye {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #2C3E50;
    border-radius: 50%;
    top: 30px;
    animation: blink 4s infinite;
}

@keyframes blink {
    0%, 48%, 52%, 100% { height: 12px; }
    50% { height: 2px; }
}

.horse-eye.left-eye {
    left: 18px;
}

.horse-eye.right-eye {
    right: 18px;
}

.horse-nose {
    position: absolute;
    width: 30px;
    height: 20px;
    background: #C41E3A;
    border-radius: 50%;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.horse-neck {
    position: absolute;
    width: 60px;
    height: 80px;
    background: linear-gradient(180deg, #D4AF37, #FFD700);
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.horse-torso {
    position: absolute;
    width: 140px;
    height: 100px;
    background: linear-gradient(135deg, #FFD700, #F4C430, #D4AF37);
    border-radius: 50px;
    top: 160px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.saddle {
    position: absolute;
    width: 80px;
    height: 40px;
    background: linear-gradient(135deg, #C41E3A, #FF1744);
    border-radius: 20px 20px 40px 40px;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid #FFD700;
}

.horse-leg {
    position: absolute;
    width: 25px;
    height: 80px;
    background: linear-gradient(180deg, #D4AF37, #B8860B);
    border-radius: 15px 15px 5px 5px;
    bottom: 20px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

.horse-leg.leg1 {
    left: 80px;
    animation: legMove1 1s ease-in-out infinite;
}

.horse-leg.leg2 {
    left: 115px;
    animation: legMove2 1s ease-in-out infinite;
}

.horse-leg.leg3 {
    right: 115px;
    animation: legMove1 1s ease-in-out infinite;
}

.horse-leg.leg4 {
    right: 80px;
    animation: legMove2 1s ease-in-out infinite;
}

@keyframes legMove1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes legMove2 {
    0%, 100% { transform: translateY(-10px); }
    50% { transform: translateY(0); }
}

.horse-tail {
    position: absolute;
    width: 15px;
    height: 70px;
    background: linear-gradient(180deg, #C41E3A, #FF6B6B);
    right: 70px;
    top: 180px;
    border-radius: 10px;
    transform-origin: top center;
    animation: tailWag 1.5s ease-in-out infinite;
}

@keyframes tailWag {
    0%, 100% { transform: rotate(20deg); }
    50% { transform: rotate(-10deg); }
}

.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.sparkles::before,
.sparkles::after {
    content: '✨';
    position: absolute;
    font-size: 30px;
    animation: sparkleAnimation 2s ease-in-out infinite;
}

.sparkles::before {
    top: 50px;
    left: 20px;
}

.sparkles::after {
    top: 100px;
    right: 30px;
    animation-delay: 1s;
}

@keyframes sparkleAnimation {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* Decorative Lanterns */
.decorative-elements {
    position: relative;
    height: 100px;
    margin-bottom: 20px;
}

.lantern {
    position: absolute;
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, #C41E3A, #FF1744);
    border-radius: 10px;
    border: 3px solid #FFD700;
    top: 0;
    animation: lanternSwing 3s ease-in-out infinite;
}

.lantern::before {
    content: '福';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: #FFD700;
    font-weight: bold;
}

.lantern::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 20px;
    background: #FFD700;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 20px 20px;
}

.lantern.left {
    left: 50px;
}

.lantern.right {
    right: 50px;
    animation-delay: 1.5s;
}

@keyframes lanternSwing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Text Styling */
.tet-greeting {
    font-size: 3.5em;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 
        3px 3px 0 #C41E3A,
        6px 6px 10px rgba(0,0,0,0.5);
    margin-bottom: 15px;
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { text-shadow: 3px 3px 0 #C41E3A, 6px 6px 10px rgba(0,0,0,0.5); }
    50% { text-shadow: 3px 3px 0 #C41E3A, 6px 6px 10px rgba(0,0,0,0.5), 0 0 20px #FFD700; }
}

.subtitle {
    font-size: 1.8em;
    color: #FFF;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 40px;
}

/* Enter Button */
.enter-btn {
    position: relative;
    padding: 18px 50px;
    font-size: 1.3em;
    font-weight: bold;
    color: #C41E3A;
    background: linear-gradient(135deg, #FFD700, #F4C430);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.enter-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.enter-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    animation: btnGlowAnimation 2s ease-in-out infinite;
}

@keyframes btnGlowAnimation {
    0%, 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.5; }
}

/* Message Screen */
.message-screen {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
    display: none;
    max-width: 900px;
    width: 100%;
}

.message-screen.active {
    opacity: 1;
    transform: scale(1);
    display: block;
}

.message-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,240,240,0.95));
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    border: 5px solid #FFD700;
    position: relative;
    overflow: hidden;
}

.message-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,215,0,0.1), transparent);
    animation: cardShine 3s linear infinite;
}

@keyframes cardShine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.card-header h2 {
    font-size: 2.2em;
    color: #C41E3A;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.flower-decoration {
    font-size: 2em;
    animation: flowerSpin 4s linear infinite;
}

@keyframes flowerSpin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.card-body {
    position: relative;
    z-index: 1;
}

.message-content {
    background: rgba(255,255,255,0.7);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 2px solid #FFD700;
}

.main-message {
    font-size: 1.1em;
    line-height: 1.8;
    color: #2C3E50;
    text-align: left;
}

.main-message .highlight {
    color: #C41E3A;
    font-weight: bold;
}

.custom-message-section {
    background: rgba(255,240,240,0.8);
    padding: 25px;
    border-radius: 20px;
    border: 2px solid #FFD700;
}

.custom-message-section h3 {
    color: #C41E3A;
    margin-bottom: 15px;
    font-size: 1.3em;
}

#customMessage {
    width: 100%;
    padding: 15px;
    border: 2px solid #FFD700;
    border-radius: 15px;
    font-size: 1em;
    font-family: 'Segoe UI', Arial, sans-serif;
    resize: vertical;
    background: rgba(255,255,255,0.9);
    color: #2C3E50;
}

#customMessage:focus {
    outline: none;
    border-color: #C41E3A;
    box-shadow: 0 0 15px rgba(196,30,58,0.3);
}

.save-btn {
    margin-top: 15px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #C41E3A, #FF1744);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.card-footer {
    text-align: center;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.signature {
    font-size: 1.2em;
    color: #C41E3A;
    font-style: italic;
    margin-bottom: 20px;
}

.back-btn {
    padding: 10px 25px;
    background: linear-gradient(135deg, #FFD700, #F4C430);
    color: #C41E3A;
    border: none;
    border-radius: 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Floating Hearts */
.floating-hearts::before,
.floating-hearts::after {
    content: '❤️';
    position: fixed;
    font-size: 30px;
    animation: heartsFloat 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 100;
}

.floating-hearts::before {
    bottom: -50px;
    left: 10%;
}

.floating-hearts::after {
    bottom: -50px;
    right: 10%;
    animation-delay: 3s;
}

@keyframes heartsFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tet-greeting {
        font-size: 2.2em;
    }
    
    .subtitle {
        font-size: 1.3em;
    }
    
    .horse-mascot {
        width: 200px;
        height: 200px;
        transform: scale(0.8);
    }
    
    .lantern {
        width: 45px;
        height: 60px;
    }
    
    .lantern::before {
        font-size: 20px;
    }
    
    .message-card {
        padding: 25px;
    }
    
    .card-header h2 {
        font-size: 1.6em;
    }
    
    .main-message {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .tet-greeting {
        font-size: 1.8em;
    }
    
    .enter-btn {
        padding: 15px 35px;
        font-size: 1.1em;
    }
    
    .message-card {
        padding: 20px;
    }
}
