        :root {
            --color-primary: #1E2A4A; /* Marino */
            --color-secondary: #D4B16A; /* Dorado */
            --color-accent: #2E5D50; /* Verde */
            --color-light: #EDE3D2; /* Crema */
            --envelope-width: min(90vw, 90vh * 1.33); /* Mantiene proporción 4:3 */
            --envelope-height: calc(var(--envelope-width) / 1.33);
            --flap-height: calc(var(--envelope-height) * 0.6);
            --flap-side: calc(var(--envelope-width) * 0.5);
        }
        
        * {
            box-sizing: border-box;
        }
        
        body {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            width: 100vw;
            background-color: var(--color-primary);
            font-family: 'Georgia', serif;
            margin: 0;
            overflow: hidden;
            color: var(--color-light);
            text-align: center;
        }
        
        .instructions {
            position: absolute;
            top: 10%;
            width: 80%;
            max-width: 500px;
            margin-bottom: 30px;
            z-index: 1;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.5s ease-in-out 0.5s;
        }
        
        .instructions.show {
            opacity: 1;
            transform: translateY(0);
        }
        
        .instructions h1 {
            font-size: clamp(1.5rem, 4vw, 2rem);
            color: var(--color-primary);
            margin-bottom: 15px;
            font-weight: normal;
        }
        
        .instructions p {
            font-size: clamp(1rem, 2.5vw, 1.2rem);
            line-height: 1.5;
            margin-bottom: 10px;
        }
        
        .click-hint {
            display: inline-block;
            margin-top: 15px;
            padding: 8px 15px;
            background-color: rgba(212, 177, 106, 0.2);
            border-radius: 20px;
            border: 1px solid var(--color-accent);
            font-size: 0.9rem;
            animation: pulse 2s infinite;
            color: var(--color-accent);
        }
        
        .envelope-container {
            position: relative;
            width: var(--envelope-width);
            height: var(--envelope-height);
            perspective: 1000px;
            cursor: pointer;
            margin-top: 20px;
        }
        
        .envelope {
            position: relative;
            width: 100%;
            height: 100%;
            transform-style: preserve-3d;
            transition: transform 1s ease-in-out;
            display: flex !important;
            align-items: center;
            justify-content: center;
        }
        
        .envelope.disappear {
            transform: scale(0);
            opacity: 0;
            transition: all 0.5s ease-in-out;
        }
        
        .envelope-front, .envelope-back {
            position: absolute;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--color-light) 0%, #f5ebd9 100%);
            border: 2px solid var(--color-secondary);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }
        
        .envelope-front {
            z-index: 2;
            transform-origin: top;
        }
        
        .envelope-back {
            background: linear-gradient(to bottom, var(--color-light) 0%, #e0d6c4 100%);
            transform: rotateX(180deg);
        }
        
        .envelope-flap {
            position: absolute;
            width: 0;
            height: 0;
            border-left: var(--flap-side) solid transparent;
            border-right: var(--flap-side) solid transparent;
            border-top: var(--flap-height) solid var(--color-secondary);
            top: 0;
            left: 0;
            transform-origin: 50% 0%;
            transform: rotateX(0deg);
            transition: transform 0.5s ease-in-out;
            z-index: 3;
            filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
        }
        
        .envelope-flap::before {
            content: '';
            position: absolute;
            top: calc(var(--flap-height) * -1);
            left: calc(var(--flap-side) * -1);
            border-left: var(--flap-side) solid transparent;
            border-right: var(--flap-side) solid transparent;
            border-top: var(--flap-height) solid var(--color-secondary);
            transform: translateY(2px);
        }
        
        .envelope.open .envelope-flap {
            transform: rotateX(180deg);
        }
        
        .wax-seal {
            position: absolute;
            width: 120px;
            height: 120px;
            min-width: 40px;
            min-height: 40px;
            margin-top: 110px;
            background-color: var(--color-accent);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            z-index: 4;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.2);
            transition: all 0.5s ease-in-out;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            animation: pulse 1.5s infinite;
        }
        
        .wax-seal:before {
            content: "";
            position: absolute;
            width: 80%;
            height: 80%;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            top: 10%;
            left: 10%;
        }
        
        .wax-seal img {
            width: 60%;
            height: 60%;
            object-fit: contain;
            filter: brightness(0) invert(1);
            z-index: 2;
        }
        
        .envelope.open .wax-seal {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0);
        }
        
        .letter {
            position: absolute;
            width: 90%;
            height: 90%;
            background-color: white;
            top: 5%;
            left: 5%;
            padding: 5%;
            opacity: 0;
            transform: scale(0.8);
            transition: all 0.5s ease-in-out 0.3s;
            z-index: 1;
            text-align: center;
            display: flex;
            flex-direction: column;
            justify-content: center;
            border: 1px solid var(--color-secondary);
            background: linear-gradient(to bottom, white 0%, var(--color-light) 100%);
        }
        
        .envelope.open .letter {
            opacity: 1;
            transform: scale(1);
        }
        
        .letter-content {
            color: var(--color-primary);
        }
        
        .letter-content h2 {
            color: var(--color-accent);
            margin-bottom: 5%;
            font-weight: normal;
            font-style: italic;
            font-size: clamp(1.2rem, 3vw, 1.8rem);
        }
        
        .letter-content p {
            font-size: clamp(0.9rem, 2vw, 1.2rem);
            margin: 0;
        }
        
        .loading {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.9);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 100;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.5s;
        }
        
        .loading.active {
            opacity: 1;
        }
        
        .spinner {
            border: 5px solid var(--color-light);
            border-top: 5px solid var(--color-accent);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes pulse {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.08); opacity: 0.8; }
            100% { transform: scale(1); opacity: 1; }
        }

        @media (max-width:  768px) {
        
        .instructions h1 {
            color: var(--color-secondary);
        }
        
        .click-hint {
            border: 1px solid var(--color-secondary);
            color: var(--color-light)
        }
         .wax-seal {
            width: 90px;
            height: 90px;
            min-width: 40px;
            min-height: 40px;
            margin-top: 0;
        }
        }