* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f8f1f1;
    color: #5d4c2b;
    overflow-x: hidden;
}

header {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://fe.guirrugo.com/1.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    text-align: center;
    color: white;
    position: relative;
    padding-bottom: 50px;
}

header h1 {
    font-size: 4rem;
    font-family: 'Great Vibes', cursive;
    animation: heartbeat 2s infinite;
}

header p {
    font-size: 1.5rem;
    margin-top: 10px;
}

#countdown {
    font-size: 1.3rem;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.countdown-item {
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.countdown-item span {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #d5961f;
}

.countdown-item label {
    font-size: 0.9rem;
    color: #333;
}

.flip {
    animation: flip 0.6s ease-in-out;
}

@keyframes flip {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-100%);
    }
    51% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(0);
    }
}

#music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ddbd80;
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #d4a5a5;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    font-size: 1rem;
    max-width: 300px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#toast.show {
    opacity: 1;
}

nav {
    background-color: #ddbd80;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #f8f1f1;
}

section {
    padding: 60px 20px;
    text-align: center;
}

#sobre-nos {
    background-color: #fff;
}

#sobre-nos h2, #detalhes h2, #cronologia h2, #galeria h2, #felicitacoes h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #d2942a;
    font-family: 'Great Vibes', cursive;
}

#sobre-nos p {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 1.1rem;
}

#detalhes {
    background-color: #fffbec;
}

.detalhes-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.detalhe-card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
}

.detalhe-card a {
    color: #d2942a;
    text-decoration: none;
    font-weight: bold;
}

.detalhe-card a:hover {
    text-decoration: underline;
}

#cronologia {
    background-color: #fff;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

#cronologia h2 {
    text-align: center;
    color: #d5961f;
    font-size: clamp(2em, 6vw, 3em);
    margin-bottom: 50px;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(255,255,255,0.8), 0 0 10px #ffe5b6; }
    to { text-shadow: 2px 2px 4px rgba(255,255,255,0.8), 0 0 20px #ffd869; }
}

.cronologia-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}

.cronologia-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #ffeab6, #ffca69, #c76f15);
    transform: translateX(-50%);
    border-radius: 2px;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; box-shadow: 0 0 10px #ffdcb6; }
}

.cronologia-item {
    display: flex;
    align-items: center;
    margin: 40px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
    position: relative;
}

.cronologia-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.cronologia-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: #d5961f;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 15px #ffca69;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.cronologia-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.2);
    background: #ffca69;
    box-shadow: 0 0 25px #ffca69;
}

.content {
    width: 45%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(219 188 131 / 25%);
    transition: all 0.3s ease;
    position: relative;
    border-left: 4px solid #dbbc83;
}

.cronologia-item:nth-child(even) .content {
    border-left: none;
    border-right: 4px solid #ddbd80;
    margin-left: auto;
}

.cronologia-item:hover .content {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 182, 193, 0.5);
}

.hora {
    font-size: 1.5em;
    color: #d5961f;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.descricao {
    font-size: 1.1em;
    color: #8f4800;
    line-height: 1.5;
    text-align: center;
}

.petal-float {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffc0cb;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    opacity: 0.7;
    animation: floatPetal 4s linear infinite;
    pointer-events: none;
}

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

#galeria {
    background-color: #fffbec;
}

/* Animação de Dança na Galeria (mantida) */
.swiper-slide {
    transition: transform 0.3s;
}

.swiper-slide:hover {
    animation: danceSlide 2s ease-in-out;
}

@keyframes danceSlide {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(2deg) translateY(-5px); }
    75% { transform: rotate(-2deg) translateY(-5px); }
}

.swiper {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    overflow: hidden;
    box-sizing: border-box;
}

.swiper-slide {
    width: 300px;
    max-width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.swiper-slide img:hover {
    transform: scale(1.1);
}

.swiper-button-next, .swiper-button-prev {
    color: #d4a5a5;
}

#felicitacoes {
    padding: 60px 20px;
    overflow: hidden;
    position: relative;
}

#felicitacoes::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><radialGradient id="g" cx="50%" cy="50%"><stop offset="0%" stop-color="white" stop-opacity="0.3"/><stop offset="100%" stop-color="pink" stop-opacity="0.1"/></radialGradient></defs><circle cx="20" cy="20" r="2" fill="url(%23g)"/><circle cx="80" cy="30" r="1.5" fill="url(%23g)"/><circle cx="40" cy="80" r="1" fill="url(%23g)"/><circle cx="70" cy="60" r="2" fill="url(%23g)"/></svg>') repeat;
    animation: twinkle 10s infinite linear;
    z-index: -1;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

#felicitacoes .container {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 95%;
    margin: 0 auto;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

#felicitacoes h1 {
    color: #d5961f;
    font-size: clamp(1.8em, 5vw, 2.5em);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
    animation: heartbeat 2s infinite;
}

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

#message-container {
    position: relative;
    height: 200px;
    margin: 20px 0;
    overflow: hidden;
}

.message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-size: clamp(1em, 4vw, 1.4em);
    color: #91681b;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-in-out;
    text-align: center;
    padding: 0 10px;
}

.message.active {
    opacity: 1;
    transform: translateY(0);
}

.petals {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: -1;
}

.petal {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffc0cb;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: fall 3s linear infinite;
}

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

.heart {
    position: absolute;
    color: #ff69b4;
    font-size: clamp(1.5em, 6vw, 2em);
    animation: float 4s ease-in-out infinite;
    pointer-events: none;
}

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

footer {
    background-color: #ddbd80;
    color: white;
    text-align: center;
    padding: 20px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    header p {
        font-size: 1.2rem;
    }

    #countdown {
        flex-direction: column;
        gap: 10px;
    }

    nav ul {
        align-items: center;
    }

    nav ul li {
        margin: 0px 0;
        padding: 0px 5px 0px 5px;
    }

    .cronologia-item, .cronologia-item:nth-child(even) {
        flex-direction: column;
        text-align: center;
    }

    .content {
        width: 80%;
        margin: 20px auto;
        border-left: 4px solid #dbbc83;
        border-right: none;
    }

    .cronologia-container::before {
        left: 20px;
    }

    .timeline-dot {
        left: 20px;
    }

    .petal-float {
        display: none; /* Otimiza performance no mobile */
    }

    .swiper-slide {
        width: 100%;
        max-width: 300px;
    }

    #toast {
        max-width: 90%;
        left: 5%;
    }

    #felicitacoes .container { 
        padding: 30px 15px; 
        border-radius: 20px; 
    }

    #message-container { 
        height: 180px; 
    }

    .heart { 
        font-size: 1.5em; 
    }
}

/* Estilos para Form de Felicitações */
.write-btn {
    background: linear-gradient(135deg, #ffc5b6, #ffb569);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.2em;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.3s ease;
    font-family: 'Roboto';
}

.write-btn:hover {
    transform: scale(1.05);
}

.form-container {
    max-width: 500px;
    margin: 20px auto 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.form-container.active {
    max-height: 400px;
    opacity: 1;
    margin-top: 20px;
}

#felic-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#felic-form input, #felic-form textarea {
    padding: 12px;
    border: 2px solid #d5961f;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Roboto';
}

#felic-form input:focus, #felic-form textarea:focus {
    outline: none;
    border-color: #ff69b4;
}

#felic-form button {
    background: linear-gradient(135deg, #ffca69, #c76f15);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background 0.3s;
}

#felic-form button:hover {
    background: linear-gradient(135deg, #c71585, #ff69b4);
}

.success-message {
    background-color: #d4f1d4;
    color: #2e7d32;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .form-container {
        margin: 10px;
        padding: 15px;
    }
}

#rsvp {
    background-color: #f8f1f159;
}

#rsvp form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#rsvp input, #rsvp select, #rsvp textarea {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #9f7016;
    border-radius: 5px;
}

#rsvp button {
    padding: 10px;
    background-color: #dbbc83;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
}

#rsvp button:hover {
    background-color: #998359;
}

.success-message, .error-message {
    max-width: 500px;
    margin: 10px auto;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.success-message {
    background-color: #d4f1d4;
    color: #2e7d32;
}

.error-message {
    background-color: #f8d7da;
    color: #d32f2f;
}