* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --wood-dark: #5d4037;
    --wood-light: #8d6e63;
    --burlap: #d4b896;
    --cream: #f5f3ef;
    --red-plaid: #c62828;
    --brown-text: #4e342e;
    --gold: #d4a574;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #f5f3ef;
    color: var(--brown-text);
    overflow-x: hidden;
}

/* Fondo de madera */
.wood-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(93, 64, 55, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(93, 64, 55, 0.1) 1px, transparent 1px);
    background-size: 100px 15px;
    background-color: #8d6e63;
    z-index: -2;
}

/* Textura de arpillera */
.burlap-texture {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: 
        repeating-linear-gradient(90deg, #d4b896 0px, #c9ab84 2px, #d4b896 4px),
        repeating-linear-gradient(0deg, #d4b896 0px, #c9ab84 2px, #d4b896 4px);
    background-blend-mode: multiply;
    z-index: -1;
    border-top: 20px solid var(--red-plaid);
    border-bottom: 20px solid var(--red-plaid);
}

.burlap-texture::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 40px;
    background: repeating-linear-gradient(
        90deg,
        var(--red-plaid) 0px,
        var(--red-plaid) 10px,
        #ffffff 10px,
        #ffffff 20px
    );
}

/* Luces colgantes */
.string-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    z-index: 100;
    pointer-events: none;
}

.light-bulb {
    position: absolute;
    width: 18px;
    height: 28px;
    background: linear-gradient(180deg, #ffd54f 0%, #ffb300 100%);
    border-radius: 0 0 50% 50%;
    box-shadow: 0 0 25px rgba(255, 193, 7, 0.8);
    animation: lightGlow 2s ease-in-out infinite;
}

.light-bulb::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 8px;
    background: #616161;
    border-radius: 2px;
}

.light-bulb::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 20px;
    background: #333;
}

@keyframes lightGlow {
    0%, 100% { opacity: 1; box-shadow: 0 0 25px rgba(255, 193, 7, 0.8); }
    50% { opacity: 0.8; box-shadow: 0 0 35px rgba(255, 193, 7, 1); }
}

/* Cable de las luces */
.light-string-cable {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #333;
}

/* Botón de música */
.music-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: rgba(93, 64, 55, 0.9);
    border: 3px solid var(--cream);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    z-index: 10000;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.music-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.music-toggle.active {
    animation: musicPulse 1s ease infinite;
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Contenedor principal */
.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    position: relative;
    z-index: 2;
}

/* Tarjeta principal con forma especial */
.invitation-card {
    background: var(--cream);
    padding: 60px 40px;
    position: relative;
    margin-top: 100px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    clip-path: polygon(
        10% 0%, 90% 0%, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0% 90%, 0% 10%
    );
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.invitation-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Decoración superior */
.top-banner {
    text-align: center;
    margin-bottom: 30px;
}

.join-us {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 3px;
    color: var(--brown-text);
    margin-bottom: 20px;
}

.main-title {
    font-family: 'Crimson Text', serif;
    font-size: 68px;
    font-weight: 700;
    color: var(--red-plaid);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hosted-banner {
    margin: 25px 0;
}

.hosted-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: var(--brown-text);
    background: var(--gold);
    padding: 8px 30px;
    display: inline-block;
    position: relative;
    letter-spacing: 2px;
}

.hosted-text::before,
.hosted-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: var(--gold);
}

.hosted-text::before { right: 100%; }
.hosted-text::after { left: 100%; }

.family-name {
    font-family: 'Dancing Script', cursive;
    font-size: 56px;
    font-weight: 700;
    color: var(--gold);
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Divisor decorativo */
.decorative-divider {
    text-align: center;
    margin: 30px 0;
    color: var(--gold);
    font-size: 20px;
}

.decorative-divider::before,
.decorative-divider::after {
    content: '─────';
    margin: 0 15px;
    opacity: 0.6;
}

/* Detalles del evento */
.event-details {
    text-align: center;
    margin: 40px 0;
    font-family: 'Montserrat', sans-serif;
    line-height: 2;
}

.event-details p {
    font-size: 18px;
    color: var(--brown-text);
    margin: 8px 0;
}

.event-details strong {
    font-weight: 600;
    color: var(--red-plaid);
}

/* Secciones de contenido */
.content-section {
    background: rgba(255, 255, 255, 0.7);
    padding: 50px 30px;
    margin: 60px 0;
    border: 3px solid var(--burlap);
    position: relative;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.content-section.visible {
    opacity: 1;
    transform: translateX(0);
}

.content-section:nth-child(even) {
    transform: translateX(50px);
}

.content-section:nth-child(even).visible {
    transform: translateX(0);
}

.section-title {
    font-family: 'Crimson Text', serif;
    font-size: 38px;
    font-weight: 700;
    color: var(--red-plaid);
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    line-height: 1.8;
    color: var(--brown-text);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Galería de fotos */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    border: 8px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transform: rotate(0deg);
    transition: all 0.5s ease;
}

.photo-item:nth-child(odd) {
    transform: rotate(-2deg);
}

.photo-item:nth-child(even) {
    transform: rotate(2deg);
}

.photo-item:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.photo-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ubicación */
.location-map {
    margin-top: 40px;
    border: 8px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    height: 350px;
}

.location-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Botones de acción */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

.action-btn {
    padding: 18px 40px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 3px solid var(--brown-text);
    background: var(--cream);
    color: var(--brown-text);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.action-btn:hover {
    background: var(--brown-text);
    color: var(--cream);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.action-btn.primary {
    background: var(--red-plaid);
    color: white;
    border-color: var(--red-plaid);
}

.action-btn.primary:hover {
    background: #a31d1d;
    border-color: #a31d1d;
}

.action-btn.confirmed {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
    cursor: not-allowed;
}

.action-btn.confirmed:hover {
    transform: none;
}

/* Mensaje de estado */
.status-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(93, 64, 55, 0.95);
    color: white;
    padding: 18px 35px;
    border: 2px solid var(--gold);
    z-index: 10001;
    font-size: 15px;
    display: none;
    max-width: 90%;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

#youtubePlayer { display: none; }

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 48px;
    }

    .family-name {
        font-size: 42px;
    }

    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .content-section {
        padding: 40px 20px;
    }

    .section-title {
        font-size: 32px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .music-toggle {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 38px;
    }

    .family-name {
        font-size: 36px;
    }

    .photo-gallery {
        grid-template-columns: 1fr;
    }

    .invitation-card {
        padding: 40px 25px;
    }
}