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

:root {
    --cream: #FFF8E7;
    --peach: #FFD1B3;
    --mint: #B8E0D2;
    --pink: #FFB7B2;
    --brown: #5D4037;
    --light-brown: #8D6E63;
}

body {
    font-family: 'Fredoka', sans-serif;
    background: var(--cream);
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

.sun {
    position: fixed;
    top: -60px;
    right: -60px;
    width: 120px;
    height: 120px;
    z-index: 100;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.rsvp .sun:hover {
    transform: translate(-20px, 20px);
}

body.rsvp .sun-inner {
    width: 100%;
    height: 100%;
    animation: wiggle 8s ease-in-out infinite;
}

@keyframes wiggle {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(-2deg); }
    20% { transform: rotate(-5deg); }
    30% { transform: rotate(-4deg); }
    40% { transform: rotate(-6deg); }
    50% { transform: rotate(-3deg); }
    60% { transform: rotate(-6deg); }
    70% { transform: rotate(-4deg); }
    80% { transform: rotate(-5deg); }
    90% { transform: rotate(-2deg); }
    100% { transform: rotate(0deg); }
}

.sun-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: #FFB347;
    border-radius: 50%;
    box-shadow: 0 0 15px #FFB347;
}

.sun-ray {
    position: absolute;
    top: 60px;
    right: 60px;
    width: 8px;
    height: 28px;
    background: #FFB347;
    transform-origin: center center;
    border-radius: 4px;
}

.ray-1 { transform: rotate(0deg) translateY(-80px); }
.ray-2 { transform: rotate(45deg) translateY(-80px); }
.ray-3 { transform: rotate(90deg) translateY(-80px); }
.ray-4 { transform: rotate(135deg) translateY(-80px); }
.ray-5 { transform: rotate(180deg) translateY(-80px); }
.ray-6 { transform: rotate(225deg) translateY(-80px); }
.ray-7 { transform: rotate(270deg) translateY(-80px); }
.ray-8 { transform: rotate(315deg) translateY(-80px); }

@keyframes sun-pulse {
    0% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(18deg) scale(1.01); }
    20% { transform: rotate(36deg) scale(1.02); }
    30% { transform: rotate(54deg) scale(1.03); }
    40% { transform: rotate(72deg) scale(1.04); }
    50% { transform: rotate(90deg) scale(1.05); }
    60% { transform: rotate(108deg) scale(1.04); }
    70% { transform: rotate(126deg) scale(1.03); }
    80% { transform: rotate(144deg) scale(1.02); }
    90% { transform: rotate(162deg) scale(1.01); }
    100% { transform: rotate(180deg) scale(1); }
}

.sun {
    animation: sun-glow 8s ease-in-out infinite;
}

.sun-ray {
    animation: ray-pulse 8s ease-in-out infinite;
}

.ray-1 { animation-delay: 0s; }
.ray-2 { animation-delay: 0.5s; }
.ray-3 { animation-delay: 1s; }
.ray-4 { animation-delay: 1.5s; }
.ray-5 { animation-delay: 2s; }
.ray-6 { animation-delay: 2.5s; }
.ray-7 { animation-delay: 3s; }
.ray-8 { animation-delay: 3.5s; }

@keyframes sun-glow {
    0% { filter: brightness(1); }
    10% { filter: brightness(1.02); }
    20% { filter: brightness(1.04); }
    30% { filter: brightness(1.06); }
    40% { filter: brightness(1.08); }
    50% { filter: brightness(1.1); }
    60% { filter: brightness(1.08); }
    70% { filter: brightness(1.06); }
    80% { filter: brightness(1.04); }
    90% { filter: brightness(1.02); }
    100% { filter: brightness(1); }
}

@keyframes ray-pulse {
    0% { opacity: 0.6; height: 24px; }
    5% { opacity: 0.65; height: 25px; }
    10% { opacity: 0.7; height: 26px; }
    15% { opacity: 0.75; height: 27px; }
    20% { opacity: 0.8; height: 28px; }
    25% { opacity: 0.85; height: 29px; }
    30% { opacity: 0.9; height: 30px; }
    35% { opacity: 0.92; height: 29px; }
    40% { opacity: 0.9; height: 28px; }
    45% { opacity: 0.85; height: 27px; }
    50% { opacity: 0.8; height: 26px; }
    55% { opacity: 0.75; height: 25px; }
    60% { opacity: 0.7; height: 24px; }
    65% { opacity: 0.65; height: 23px; }
    70% { opacity: 0.6; height: 22px; }
    75% { opacity: 0.58; height: 23px; }
    80% { opacity: 0.6; height: 24px; }
    85% { opacity: 0.62; height: 24px; }
    90% { opacity: 0.6; height: 24px; }
    95% { opacity: 0.58; height: 24px; }
    100% { opacity: 0.6; height: 24px; }
}

header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.cloud {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.7;
    animation: float 8s ease-in-out infinite;
}

.cloud-1 {
    top: -10px;
    left: 5%;
    color: white;
    animation-delay: 0s;
}

.cloud-2 {
    top: 20px;
    right: 10%;
    color: white;
    animation-delay: 1s;
}

.cloud-3 {
    top: 50px;
    left: 15%;
    color: white;
    animation-delay: 2s;
}

@keyframes float {
    0% { transform: translateY(0); }
    10% { transform: translateY(-1px); }
    20% { transform: translateY(-3px); }
    30% { transform: translateY(-5px); }
    40% { transform: translateY(-6px); }
    50% { transform: translateY(-8px); }
    60% { transform: translateY(-6px); }
    70% { transform: translateY(-5px); }
    80% { transform: translateY(-3px); }
    90% { transform: translateY(-1px); }
    100% { transform: translateY(0); }
}

h1 {
    font-family: 'Shadows Into Light', cursive;
    font-size: 3.5rem;
    color: var(--brown);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

h2 {
    font-size: 1.5rem;
    color: var(--light-brown);
    font-weight: 400;
}

main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.login-section {
    background: white;
    padding: 2rem;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.1);
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.login-section input {
    text-align: center;
}

.details {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.detail-card {
    background: var(--peach);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.1);
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.detail-card:last-child {
    background: var(--mint);
}

.address, .time {
    font-size: 1.1rem;
    color: var(--brown);
    line-height: 1.6;
}

.rsvp-section, .registry {
    background: white;
    padding: 2rem;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.1);
    text-align: center;
}

.registry {
    background: var(--peach);
}

h3 {
    font-family: 'Shadows Into Light', cursive;
    font-size: 2rem;
    color: var(--brown);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--brown);
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 15px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    transition: box-shadow 0.3s;
    background: var(--cream);
    color: var(--brown);
}

input:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--mint);
}

button {
    width: 100%;
    padding: 15px 30px;
    background: var(--peach);
    border: none;
    border-radius: 25px;
    font-family: 'Shadows Into Light', cursive;
    font-size: 1.5rem;
    color: var(--brown);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(255, 209, 179, 0.5);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 209, 179, 0.7);
}

button:active {
    transform: translateY(0);
}

.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 600;
}

.saved-rsvp {
    background: var(--mint);
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    color: var(--brown);
    font-weight: 600;
}

.saved-rsvp p {
    margin: 0;
}

.message.success {
    background: var(--mint);
    color: var(--brown);
}

.message.error {
    background: var(--pink);
    color: var(--brown);
}

.registry p {
    color: var(--brown);
    font-size: 1.1rem;
}

footer {
    text-align: center;
    margin-top: 2rem;
}

.star {
    font-size: 2rem;
    animation: sparkle 8s ease-in-out infinite;
}

@keyframes sparkle {
    0% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    10% { transform: scale(1.01) rotate(1deg); opacity: 0.82; }
    20% { transform: scale(1.02) rotate(2deg); opacity: 0.84; }
    30% { transform: scale(1.04) rotate(3deg); opacity: 0.88; }
    40% { transform: scale(1.06) rotate(5deg); opacity: 0.92; }
    50% { transform: scale(1.08) rotate(6deg); opacity: 1; }
    60% { transform: scale(1.06) rotate(5deg); opacity: 0.92; }
    70% { transform: scale(1.04) rotate(3deg); opacity: 0.88; }
    80% { transform: scale(1.02) rotate(2deg); opacity: 0.84; }
    90% { transform: scale(1.01) rotate(1deg); opacity: 0.82; }
    100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .cloud {
        display: none;
    }
}
