* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(180deg, #87CEEB 0%, #4A90E2 50%, #2E5C8A 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
    -webkit-tap-highlight-color: transparent;
}

.pixelated {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.floating-blocks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.block-float {
    position: absolute;
    font-size: 2.5em;
    opacity: 0.6;
    animation: floatBlock linear infinite;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.block-float:nth-child(1) { left: 5%; animation-duration: 15s; animation-delay: 0s; }
.block-float:nth-child(2) { left: 25%; animation-duration: 18s; animation-delay: 2s; }
.block-float:nth-child(3) { left: 45%; animation-duration: 16s; animation-delay: 4s; }
.block-float:nth-child(4) { left: 65%; animation-duration: 17s; animation-delay: 1s; }
.block-float:nth-child(5) { left: 85%; animation-duration: 19s; animation-delay: 3s; }
.block-float:nth-child(6) { left: 15%; animation-duration: 14s; animation-delay: 5s; }

@keyframes floatBlock {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.grass-ground {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, #7CBA3D 0%, #5A8F2E 50%, #4A7A24 100%);
    z-index: 1;
    border-top: 4px solid #5A8F2E;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.2);
}

.invitation-container {
    background: linear-gradient(135deg, #8B7355 0%, #A0826D 50%, #8B7355 100%);
    max-width: 700px;
    width: 100%;
    border-radius: 0;
    box-shadow: 
        0 0 0 8px #5C4033,
        0 0 0 12px #3D2817,
        0 30px 80px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    position: relative;
    z-index: 10;
    animation: slideIn 0.8s ease-out;
    border: 8px solid #3D2817;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.header {
    background: linear-gradient(180deg, #2C5F2D 0%, #1E4620 100%);
    padding: 25px 20px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 6px solid #1A3518;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, transparent 0px, transparent 15px, rgba(0,0,0,0.1) 15px, rgba(0,0,0,0.1) 16px),
        repeating-linear-gradient(0deg, transparent 0px, transparent 15px, rgba(0,0,0,0.1) 15px, rgba(0,0,0,0.1) 16px);
}

.minecraft-logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 2em;
    color: #FFE600;
    text-shadow: 
        4px 4px 0 #CC6600,
        6px 6px 0 rgba(0, 0, 0, 0.5);
    margin: 10px 0;
    animation: pixelFloat 3s infinite;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

@keyframes pixelFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.header-subtitle {
    font-size: 0.7em;
    color: #A8E6CF;
    margin-top: 10px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.hero-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #000;
    position: relative;
}

.hero-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    border: 4px solid #3D2817;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: scale(1.1);
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 45%, 
        rgba(255,255,255,0.1) 50%, 
        transparent 55%);
    background-size: 200% 200%;
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { background-position: -200% -200%; }
    100% { background-position: 200% 200%; }
}

.content {
    padding: 35px 25px;
    position: relative;
    background: linear-gradient(135deg, #C4A484 0%, #A89070 100%);
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, transparent 0px, transparent 31px, rgba(0,0,0,0.05) 31px, rgba(0,0,0,0.05) 32px),
        repeating-linear-gradient(0deg, transparent 0px, transparent 31px, rgba(0,0,0,0.05) 31px, rgba(0,0,0,0.05) 32px);
    pointer-events: none;
}

.guest-section {
    text-align: center;
    margin-bottom: 25px;
    padding: 25px 20px;
    background: linear-gradient(135deg, #4A7C59 0%, #3D6B4A 100%);
    border: 6px solid #2D4A35;
    position: relative;
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.2),
        0 8px 20px rgba(0, 0, 0, 0.4);
}

.guest-section::before {
    content: '⛏️';
    position: absolute;
    top: -35px;
    left: 30px;
    font-size: 55px;
    animation: pickaxeSwing 2s infinite;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

.guest-section::after {
    content: '🗡️';
    position: absolute;
    top: -35px;
    right: 30px;
    font-size: 55px;
    animation: swordSwing 2.5s infinite;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

@keyframes pickaxeSwing {
    0%, 100% { transform: rotate(-20deg); }
    50% { transform: rotate(20deg); }
}

@keyframes swordSwing {
    0%, 100% { transform: rotate(20deg); }
    50% { transform: rotate(-20deg); }
}

.guest-section h2 {
    font-size: 1.2em;
    color: #FFE600;
    margin-bottom: 15px;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

.guest-section p {
    font-size: 0.65em;
    color: #FFF;
    margin: 10px 0;
    line-height: 1.8;
}

.birthday-boy {
    font-size: 2em;
    color: #FFD700;
    text-align: center;
    margin: 20px 0;
    text-shadow: 
        4px 4px 0 #FF6B35,
        6px 6px 0 rgba(0, 0, 0, 0.5);
    animation: blockBounce 2s infinite;
    line-height: 1.4;
}

@keyframes blockBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.edad-celebrada {
    font-size: 1.3em;
    color: #FFF;
    text-align: center;
    margin: 15px auto;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #CC6600 0%, #FF8800 100%);
    padding: 15px 25px;
    display: inline-block;
    border: 5px solid #994D00;
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.2),
        0 8px 20px rgba(0, 0, 0, 0.4);
    line-height: 1.6;
}

.energy-divider {
    text-align: center;
    margin: 25px 0;
    font-size: 50px;
    animation: crystalSpin 3s linear infinite;
}

@keyframes crystalSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.event-details {
    background: linear-gradient(135deg, #DEB887 0%, #C9A775 100%);
    padding: 25px;
    margin: 20px 0;
    border: 6px solid #8B7355;
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.2),
        0 8px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.event-details::before {
    content: '💎';
    position: absolute;
    top: -35px;
    right: 40px;
    font-size: 60px;
    animation: diamondPulse 2s infinite;
}

@keyframes diamondPulse {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1) drop-shadow(0 0 10px rgba(0,255,255,0.5));
    }
    50% { 
        transform: scale(1.2);
        filter: brightness(1.5) drop-shadow(0 0 20px rgba(0,255,255,1));
    }
}

.detail-item {
    margin: 18px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.2);
    border-left: 6px solid #8B4513;
    transition: all 0.3s ease;
    border: 3px solid rgba(0,0,0,0.1);
}

.detail-item:hover {
    transform: translateX(8px);
    background: rgba(255,255,255,0.3);
    border-left-color: #FFD700;
}

.detail-icon {
    font-size: 40px;
    min-width: 50px;
    text-align: center;
    animation: iconBob 2s infinite;
}

@keyframes iconBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.detail-text {
    flex: 1;
}

.detail-text strong {
    display: block;
    color: #2D4A35;
    font-size: 0.7em;
    margin-bottom: 8px;
    line-height: 1.5;
}

.detail-text span {
    color: #1A1A1A;
    font-size: 0.6em;
    line-height: 1.8;
    display: block;
}

.mensaje-personalizado {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255,165,0,0.2);
    border-left: 5px solid #FF8800;
    border: 3px solid rgba(0,0,0,0.1);
}

.mensaje-personalizado small {
    color: #2D1810;
    font-size: 0.55em;
    line-height: 1.9;
    display: block;
}

.buttons {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    position: relative;
    z-index: 2;
}

.btn {
    flex: 1;
    padding: 18px 20px;
    border: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 
        inset 0 -4px 0 rgba(0,0,0,0.3),
        0 6px 20px rgba(0, 0, 0, 0.4);
    border: 4px solid rgba(0,0,0,0.2);
    line-height: 1.5;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 
        inset 0 -4px 0 rgba(0,0,0,0.3),
        0 10px 30px rgba(0, 0, 0, 0.5);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 
        inset 0 -2px 0 rgba(0,0,0,0.3),
        0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-confirm {
    background: linear-gradient(180deg, #5CB85C 0%, #4CAF50 50%, #45A049 100%);
    color: white;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.btn-location {
    background: linear-gradient(180deg, #FFD700 0%, #FFC700 50%, #FFB700 100%);
    color: #2D1810;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.btn.confirmed {
    background: linear-gradient(180deg, #888 0%, #666 50%, #555 100%);
    cursor: not-allowed;
}

.footer {
    background: linear-gradient(180deg, #2D1810 0%, #1A0F0A 100%);
    padding: 35px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 6px solid #000;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, transparent 0px, transparent 15px, rgba(255,255,255,0.02) 15px, rgba(255,255,255,0.02) 16px);
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    font-size: 45px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.footer-icon {
    animation: iconFloat 2.5s infinite;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

.footer-icon:nth-child(1) { animation-delay: 0s; }
.footer-icon:nth-child(2) { animation-delay: 0.3s; }
.footer-icon:nth-child(3) { animation-delay: 0.6s; }
.footer-icon:nth-child(4) { animation-delay: 0.9s; }

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(10deg); }
}

.footer p {
    color: #A8E6CF;
    font-size: 0.7em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
    margin: 12px 0;
    line-height: 1.8;
}

.footer .slogan {
    color: #FFD700;
    font-size: 0.8em;
    margin-top: 15px;
    animation: textGlow 2s infinite;
    line-height: 1.6;
}

@keyframes textGlow {
    0%, 100% { 
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    50% { 
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8),
                    0 0 10px rgba(255, 215, 0, 0.6);
    }
}

.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #5CB85C 0%, #4CAF50 100%);
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 
        inset 0 -4px 0 rgba(0,0,0,0.3),
        0 8px 25px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    border: 5px solid #2D5F2D;
}

.music-control:hover {
    transform: scale(1.15);
}

.music-control.playing {
    animation: musicPulse 1s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.mobile-audio-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 15, 10, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    text-align: center;
    padding: 20px;
}

.mobile-audio-overlay.hidden {
    display: none !important;
}

.mobile-audio-overlay h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2em;
    margin-bottom: 25px;
    color: #FFD700;
    line-height: 1.8;
}

.mobile-audio-overlay p {
    font-size: 0.6em;
    line-height: 2;
    max-width: 350px;
}

.mobile-audio-btn {
    background: linear-gradient(135deg, #5CB85C 0%, #4CAF50 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    font-size: 0.8em;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    box-shadow: 
        inset 0 -4px 0 rgba(0,0,0,0.3),
        0 8px 25px rgba(0, 0, 0, 0.5);
    margin-top: 25px;
    border: 4px solid #2D5F2D;
    line-height: 1.5;
}

.loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-block {
    font-size: 80px;
    animation: blockSpin 1.5s infinite;
}

@keyframes blockSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
}

.loading p {
    margin-top: 25px;
    color: #4CAF50;
    font-size: 0.8em;
    line-height: 1.8;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@media (max-width: 600px) {
    .minecraft-logo {
        font-size: 1.3em;
    }

    .header-subtitle {
        font-size: 0.55em;
    }

    .hero-images {
        grid-template-columns: 1fr;
    }

    .hero-image {
        height: 220px;
    }

    .buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        font-size: 0.6em;
    }

    .music-control {
        width: 55px;
        height: 55px;
        font-size: 28px;
    }

    .content {
        padding: 25px 18px;
    }

    .footer-icons {
        font-size: 38px;
    }

    .birthday-boy {
        font-size: 1.5em;
    }

    .edad-celebrada {
        font-size: 1em;
        padding: 12px 18px;
    }

    .guest-section::before,
    .guest-section::after {
        font-size: 45px;
    }

    .detail-text strong {
        font-size: 0.65em;
    }

    .detail-text span {
        font-size: 0.55em;
    }
}