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

        body {
            font-family: 'Cormorant Garamond', serif;
            background: linear-gradient(135deg, #1a1410 0%, #2d2416 50%, #1a1410 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
            overflow-x: hidden;
            position: relative;
        }

        /* Ambient golden glow */
        body::before {
            content: '';
            position: fixed;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(circle at 30% 40%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
            animation: ambientGlow 8s ease-in-out infinite;
            pointer-events: none;
        }

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

        /* Golden particles */
        .gold-particle {
            position: fixed;
            width: 3px;
            height: 3px;
            background: #ffd700;
            border-radius: 50%;
            box-shadow: 0 0 8px #ffd700;
            animation: particleFloat 20s linear infinite;
            opacity: 0;
        }

        @keyframes particleFloat {
            0% { 
                transform: translateY(100vh) translateX(0);
                opacity: 0;
            }
            10% { opacity: 1; }
            90% { opacity: 1; }
            100% { 
                transform: translateY(-100vh) translateX(100px);
                opacity: 0;
            }
        }

        .gold-particle:nth-child(1) { left: 10%; animation-delay: 0s; }
        .gold-particle:nth-child(2) { left: 25%; animation-delay: 3s; }
        .gold-particle:nth-child(3) { left: 40%; animation-delay: 6s; }
        .gold-particle:nth-child(4) { left: 55%; animation-delay: 9s; }
        .gold-particle:nth-child(5) { left: 70%; animation-delay: 12s; }
        .gold-particle:nth-child(6) { left: 85%; animation-delay: 15s; }

        /* Container */
        .container {
            position: relative;
            z-index: 10;
            max-width: 1000px;
            width: 100%;
        }

        /* Envelope wrapper */
        .envelope-wrapper {
            perspective: 1500px;
            cursor: pointer;
            transition: all 0.6s ease;
        }

        .envelope-wrapper.opened {
            cursor: default;
        }

        .envelope {
            position: relative;
            width: 450px;
            height: 300px;
            margin: 0 auto;
            transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        .envelope.opening {
            transform: scale(0.7);
            opacity: 0;
            pointer-events: none;
        }

        /* Luxury envelope */
        .envelope-body {
            position: absolute;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #2d2416 0%, #3d3020 50%, #2d2416 100%);
            border: 2px solid #d4af37;
            box-shadow: 
                0 30px 80px rgba(0, 0, 0, 0.6),
                inset 0 0 50px rgba(212, 175, 55, 0.1);
            overflow: hidden;
        }

        /* Gold foil pattern */
        .envelope-body::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            background-image: 
                repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(212, 175, 55, 0.03) 20px, rgba(212, 175, 55, 0.03) 40px);
            opacity: 0.5;
        }

        /* Wax seal */
        .wax-seal {
            position: absolute;
            bottom: -25px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 60px;
            background: radial-gradient(circle, #8b0000 0%, #5c0000 100%);
            border-radius: 50%;
            box-shadow: 
                0 5px 20px rgba(139, 0, 0, 0.6),
                inset 0 -5px 10px rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: #d4af37;
            z-index: 10;
            animation: sealPulse 3s ease-in-out infinite;
        }

        @keyframes sealPulse {
            0%, 100% { transform: translateX(-50%) scale(1); }
            50% { transform: translateX(-50%) scale(1.05); }
        }

        /* Envelope flap */
        .envelope-flap {
            position: absolute;
            top: 0;
            left: 0;
            width: 0;
            height: 0;
            border-left: 225px solid transparent;
            border-right: 225px solid transparent;
            border-top: 150px solid #3d3020;
            transform-origin: top center;
            transition: transform 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            z-index: 5;
            filter: brightness(1.2);
            box-shadow: 0 -2px 10px rgba(212, 175, 55, 0.2);
        }

        .envelope-flap::after {
            content: '';
            position: absolute;
            top: -145px;
            left: -220px;
            width: 440px;
            height: 2px;
            background: linear-gradient(to right, transparent, #d4af37, transparent);
        }

        .envelope-wrapper:hover .envelope-flap {
            transform: rotateX(-15deg);
        }

        .envelope-wrapper.opened .envelope-flap {
            transform: rotateX(-180deg);
        }

        /* Letter peeking */
        .letter-peek {
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 95%;
            height: 240px;
            background: linear-gradient(180deg, #f8f3e8 0%, #f0e6d2 100%);
            box-shadow: 
                0 -10px 30px rgba(0, 0, 0, 0.3),
                inset 0 0 50px rgba(139, 69, 19, 0.03);
            transition: transform 0.6s ease;
            border-top: 1px solid #d4af37;
        }

        .envelope-wrapper:hover .letter-peek {
            transform: translateX(-50%) translateY(-30px);
        }

        /* Paper texture on letter */
        .letter-peek::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            background-image: 
                repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 69, 19, 0.01) 2px, rgba(139, 69, 19, 0.01) 4px);
            pointer-events: none;
        }

        .letter-preview {
            position: absolute;
            top: 30px;
            width: 100%;
            text-align: center;
            padding: 0 30px;
        }

        .letter-preview-monogram {
            font-family: 'Cinzel', serif;
            font-size: 48px;
            color: #d4af37;
            font-weight: 900;
            text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
            margin-bottom: 10px;
            animation: shine 3s ease-in-out infinite;
        }

        @keyframes shine {
            0%, 100% { text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3); }
            50% { text-shadow: 0 2px 20px rgba(212, 175, 55, 0.6); }
        }

        .letter-preview-text {
            font-family: 'Playfair Display', serif;
            font-size: 16px;
            color: #8b6914;
            font-style: italic;
            letter-spacing: 1px;
        }

        .letter-preview-divider {
            width: 100px;
            height: 1px;
            background: linear-gradient(to right, transparent, #d4af37, transparent);
            margin: 15px auto;
        }

        /* Click instruction */
        .click-instruction {
            text-align: center;
            margin-top: 50px;
            font-family: 'Cinzel', serif;
            font-size: 14px;
            color: #d4af37;
            letter-spacing: 3px;
            text-transform: uppercase;
            animation: fadeInOut 2s infinite;
        }

        @keyframes fadeInOut {
            0%, 100% { opacity: 0.4; }
            50% { opacity: 1; }
        }

        /* Full birthday card */
        .birthday-card-full {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.97);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 100;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.6s ease;
            overflow-y: auto;
            padding: 20px;
        }

        .birthday-card-full.active {
            opacity: 1;
            pointer-events: all;
        }

        /* Luxury paper card */
        .luxury-paper {
            background: linear-gradient(180deg, #f8f3e8 0%, #f0e6d2 50%, #e8dcc8 100%);
            max-width: 900px;
            width: 100%;
            padding: 0;
            box-shadow: 
                0 50px 150px rgba(0, 0, 0, 0.8),
                0 0 100px rgba(212, 175, 55, 0.3),
                inset 0 0 100px rgba(139, 69, 19, 0.03);
            position: relative;
            transform: scale(0.7) rotateY(-90deg);
            transition: transform 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            max-height: 95vh;
            overflow-y: auto;
            border: 3px solid #d4af37;
        }

        .birthday-card-full.active .luxury-paper {
            transform: scale(1) rotateY(0deg);
        }

        /* Paper texture overlay */
        .paper-texture {
            position: absolute;
            width: 100%;
            height: 100%;
            background-image: 
                repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 69, 19, 0.015) 2px, rgba(139, 69, 19, 0.015) 4px),
                repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(139, 69, 19, 0.015) 2px, rgba(139, 69, 19, 0.015) 4px);
            pointer-events: none;
            opacity: 0.6;
        }

        /* Aged spots */
        .age-spot {
            position: absolute;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(139, 69, 19, 0.03) 0%, transparent 70%);
            pointer-events: none;
        }

        .spot-1 { width: 40px; height: 40px; top: 10%; left: 8%; }
        .spot-2 { width: 50px; height: 50px; top: 65%; right: 10%; }
        .spot-3 { width: 30px; height: 30px; bottom: 15%; left: 15%; }

        /* Gold foil border */
        .gold-border {
            position: absolute;
            top: 30px;
            left: 30px;
            right: 30px;
            bottom: 30px;
            border: 2px solid #d4af37;
            pointer-events: none;
            box-shadow: 
                inset 0 0 30px rgba(212, 175, 55, 0.1),
                0 0 20px rgba(212, 175, 55, 0.2);
        }

        .gold-border::before {
            content: '';
            position: absolute;
            top: 10px;
            left: 10px;
            right: 10px;
            bottom: 10px;
            border: 1px solid rgba(212, 175, 55, 0.4);
        }

        /* Content area */
        .card-content-wrapper {
            position: relative;
            z-index: 2;
            padding: 70px 60px;
        }

        /* Close button */
        .close-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 45px;
            height: 45px;
            background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
            border: 2px solid #8b6914;
            border-radius: 50%;
            color: #2d2416;
            font-size: 28px;
            font-weight: 300;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            z-index: 10;
            box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
        }

        .close-btn:hover {
            transform: rotate(90deg) scale(1.1);
            box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
        }

        /* Header emblem */
        .header-emblem {
            text-align: center;
            margin-bottom: 40px;
            animation: fadeInDown 1s ease-out 0.3s both;
        }

        .emblem-icon {
            font-size: 50px;
            margin-bottom: 15px;
            filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.4));
            animation: float 4s ease-in-out infinite;
        }

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

        .acentral-crest {
            font-family: 'Cinzel', serif;
            font-size: 16px;
            letter-spacing: 6px;
            color: #8b6914;
            text-transform: uppercase;
            margin-bottom: 20px;
        }

        .divider-ornate {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin: 20px 0;
        }

        .divider-line {
            width: 100px;
            height: 1px;
            background: linear-gradient(to right, transparent, #d4af37, transparent);
        }

        .divider-diamond {
            width: 8px;
            height: 8px;
            background: #d4af37;
            transform: rotate(45deg);
        }

        /* Main title */
        .main-title-section {
            text-align: center;
            margin: 40px 0;
            animation: fadeInScale 1s ease-out 0.6s both;
        }

        .happy-title {
            font-family: 'Playfair Display', serif;
            font-size: 72px;
            font-weight: 900;
            color: transparent;
            background: linear-gradient(to bottom, #d4af37 0%, #b8860b 50%, #d4af37 100%);
            -webkit-background-clip: text;
            background-clip: text;
            line-height: 1;
            letter-spacing: 8px;
            text-shadow: 2px 2px 0 rgba(139, 105, 20, 0.1);
            margin-bottom: 15px;
        }

        .birthday-subtitle {
            font-family: 'Italiana', serif;
            font-size: 32px;
            color: #8b6914;
            letter-spacing: 4px;
        }

        /* Photo showcase */
        .photo-showcase {
            margin: 50px 0;
            text-align: center;
            animation: fadeInUp 1s ease-out 0.9s both;
        }

        .photo-frame-luxury {
            width: 350px;
            height: 450px;
            margin: 0 auto;
            position: relative;
            padding: 20px;
            background: linear-gradient(135deg, #d4af37 0%, #b8860b 50%, #d4af37 100%);
            box-shadow: 
                0 30px 80px rgba(0, 0, 0, 0.4),
                inset 0 0 50px rgba(0, 0, 0, 0.2);
        }

        .photo-frame-luxury::before {
            content: '';
            position: absolute;
            top: 8px;
            left: 8px;
            right: 8px;
            bottom: 8px;
            border: 2px solid rgba(255, 215, 0, 0.5);
        }

        .photo-inner-luxury {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 100px;
            color: #999;
            overflow: hidden;
            border: 3px solid #8b6914;
        }

        .photo-inner-luxury img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .name-display {
            margin-top: 30px;
            font-family: 'Playfair Display', serif;
            font-size: 48px;
            font-weight: 700;
            color: #d4af37;
            text-shadow: 2px 2px 4px rgba(139, 105, 20, 0.2);
        }

        /* Wishes elegant */
        .wishes-elegant {
            margin: 50px 0;
            padding: 0 40px;
        }

        .wish-elegant {
            margin: 35px 0;
            padding-left: 50px;
            position: relative;
            opacity: 0;
            transform: translateX(-30px);
            animation: slideInLeft 0.8s ease-out forwards;
        }

        .wish-elegant:nth-child(1) { animation-delay: 1.2s; }
        .wish-elegant:nth-child(2) { animation-delay: 1.5s; }
        .wish-elegant:nth-child(3) { animation-delay: 1.8s; }

        @keyframes slideInLeft {
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .wish-elegant::before {
            content: '◆';
            position: absolute;
            left: 0;
            top: 0;
            font-size: 24px;
            color: #d4af37;
        }

        .wish-title {
            font-family: 'Playfair Display', serif;
            font-size: 22px;
            font-weight: 700;
            color: #8b6914;
            margin-bottom: 8px;
            letter-spacing: 1px;
        }

        .wish-content {
            font-size: 18px;
            line-height: 1.8;
            color: #654321;
            font-weight: 300;
        }

        /* Signature message */
        .signature-section {
            margin: 60px 0 40px;
            padding: 50px;
            border-top: 1px solid rgba(212, 175, 55, 0.3);
            border-bottom: 1px solid rgba(212, 175, 55, 0.3);
            text-align: center;
            animation: fadeIn 1s ease-out 2.1s both;
        }

        .signature-quote {
            font-family: 'Playfair Display', serif;
            font-size: 26px;
            font-style: italic;
            color: #8b6914;
            line-height: 1.8;
            margin-bottom: 30px;
        }

        .signature-from {
            font-family: 'Cinzel', serif;
            font-size: 16px;
            color: #654321;
            letter-spacing: 3px;
        }

        .signature-acentral {
            font-size: 20px;
            color: #d4af37;
            margin-top: 10px;
            font-weight: 600;
        }

        /* Action buttons */
        .action-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            margin-top: 40px;
            animation: fadeInUp 1s ease-out 2.4s both;
        }

        .btn-action {
            padding: 16px 40px;
            font-family: 'Cinzel', serif;
            font-size: 14px;
            letter-spacing: 2px;
            text-transform: uppercase;
            border: 2px solid #d4af37;
            background: transparent;
            color: #8b6914;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .btn-action::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
            transition: left 0.3s ease;
            z-index: -1;
        }

        .btn-action:hover::before {
            left: 0;
        }

        .btn-action:hover {
            color: #2d2416;
            box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
            transform: translateY(-3px);
        }

        .btn-primary {
            background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
            color: #2d2416;
            box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
        }

        .btn-primary:hover {
            box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
        }

        /* Animations */
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-40px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(40px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInScale {
            from {
                opacity: 0;
                transform: scale(0.85);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* Responsive */
        @media (max-width: 768px) {
            .envelope {
                width: 350px;
                height: 240px;
            }

            .envelope-flap {
                border-left: 175px solid transparent;
                border-right: 175px solid transparent;
                border-top: 120px solid #3d3020;
            }

            .card-content-wrapper {
                padding: 50px 30px;
            }

            .happy-title {
                font-size: 52px;
            }

            .photo-frame-luxury {
                width: 280px;
                height: 360px;
            }

            .wishes-elegant {
                padding: 0 20px;
            }

            .action-buttons {
                flex-direction: column;
            }

            .btn-action {
                width: 100%;
            }
        }

        /* Hidden download canvas */
        #downloadCanvas {
            position: fixed;
            top: -10000px;
            left: -10000px;
        }
